*BSD News Article 3891


Return to BSD News archive

Path: sserve!manuel!munnari.oz.au!network.ucsd.edu!usc!wupost!darwin.sura.net!Sirius.dfn.de!math.fu-berlin.de!zrz.tu-berlin.de!cs.tu-berlin.de!news.netmbx.de!Germany.EU.net!mcsun!uknet!daresbury!doc.ic.ac.uk!dds
From: dds@doc.ic.ac.uk (Diomidis Spinellis)
Newsgroups: comp.unix.bsd
Subject: Re: Endless boot cycle- suggestions? (SOLUTION)
Message-ID: <16tkqqINN3e6@frigate.doc.ic.ac.uk>
Date: 19 Aug 92 14:11:38 GMT
References: <45240001@hpycla.kobe.hp.com> <Aug.18.17.41.42.1992.4915@action.rutgers.edu> <3l!nmtm.alm@netcom.com>
Organization: Department of Computing, Imperial College, University of London, UK.
Lines: 106
NNTP-Posting-Host: dirty.doc.ic.ac.uk

Many people have reported endless boot cycles after installing 386BSD
on a hard disk.  I had the same problem, and solved it using the
following procedure.  The problems seems to be wrong disklabels on
the disk created by install.  This is can fixed, by doing it manualy.
You milleage may vary.

(1) Boot with the fixit floppy disk

(2) Make floppy writable
	mount -u /dev/fd0a /

(3) Make space to add a new disk label
	rm /[A-Z]* /usr/bin/tip

(4) Create a new disk entry.  The manual pages for disktab 5 should guide
    you.  You need to know the characteristics of your hard disk.
    Look at the disks in the file, and add one for your own disk.
	cd /etc
	vi disktab

(5) Label your disk
	disklabel -r -w diskname

The rest (steps 6-27) comes from article <148ersINNr9t@agate.berkeley.edu>
by Chris Demetriou <cgd@agate.berkeley.edu>.  I just have added a small
modification to make mount and umount executable.

(6) newfs the partitions
(7) mount the new root partition under /mnt
(8) mkdir /mnt/usr
(9) mount the new /usr partition under /mnt/usr
(10) cpio directory-by-directory (recursively -- by hand!) the entire
	contents of the fixit floppy to the hard drive

	you'll do something like:

	cd /
	ls | cpio -pdalmu /mnt
	cd /sbin
	ls | cpio -pdalmu /mnt/sbin
	cd /usr
	ls | cpio -pdalmu /mnt/usr
	cd /usr/bin
	ls | cpio -pdalmu /mnt/usr/bin

	etc.  yes, it's tiring.

(11) copy /usr/distbin/mount and /usr/distbin/umount to /mnt (so that
	they'll be in the new root partition, so you can mount the new
	/usr partition...)

Do this using echo mount | cpio -pmaldu /mnt in order to preserve
the executable flags of the files.  Chmod is not yet on the disk.

(12) shutdown
	and the eject the floppy.

(13) reboot off the hard drive, the fsck -p <root raw device>
	If there are any errors, after the fsck is done, hit
	ctl-alt-delete, and repeat this step.

(14) fsck -p <usr raw device>

(15) mount -u <root device> /

(16) mount <usr device> /usr

(17) insert 0.1 boot/install floppy (dist.fs) into floppy drive
	and "mount /dev/fd0a /mnt"

(18) cd /mnt
	and then
	usr/bin/zcat etc/baselist.Z | usr/bin/cpio -pdalmu /

(19) cd /
	and then
	/mnt/usr/bin/zcat /mnt/etc/baseutils.cpio.Z | /mnt/usr/bin/cpio -idalmu

(20) umount /mnt	then eject the floppy
(21) umount /usr
(22) shutdown

(23) reboot off the hard drive, and get all of the various files (the
	bindist files, srcdist files, etc...).
	I put them into /usr/tmp, because there wasn't enough space in
	/tmp (because it was on a small root partition...).

(24) cd / ; cat <all the binary files> | uncompress | cpio -idalmu


(25) rm <all the binary files>

(26) put your hostname into "/etc/myname" and put your ip addr/hostname
	into /etc/hosts.

(27) make an fstab for yourself.  specifically, you want something like:
	<root device name>	/	ufs rw 1 1
	<usr device name>	/usr	ufs rw 1 2


Good luck,

Diomidis
-- 
Diomidis Spinellis    Internet: <dds@doc.ic.ac.uk>  UUCP: ...!uknet!icdoc!dds
Department of Computing, Imperial College, London SW7     #include "/dev/tty"