From owner-freebsd-questions Thu Jul 25 05:56:01 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id FAA25648 for questions-outgoing; Thu, 25 Jul 1996 05:56:01 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id FAA25604; Thu, 25 Jul 1996 05:55:36 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.12/8.6.9) id WAA11050; Thu, 25 Jul 1996 22:27:20 +1000 Date: Thu, 25 Jul 1996 22:27:20 +1000 From: Bruce Evans Message-Id: <199607251227.WAA11050@godzilla.zeta.org.au> To: Andries.Brouwer@cwi.nl, bde@zeta.org.au, dwhite@riley-net170-164.uoregon.edu, freebsd-bugs@freebsd.org, j@uriah.heep.sax.de, jkh@time.cdrom.com, questions@freebsd.org Subject: Re: installation fails Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > Boot the Install floppy, go to Custom Install, select > the menu item that starts the Disklabel Editor, and > make a filesystem on this small partition. > It called the partition wd0s4e (0 for the disk number, > 4 for the primary partition number). It should have called the first (root) partition wd0s4a. It apparently thought that you were creating a usr or var or ... partition. > [I have been told that bootable partitions should be called > e.g., wd0s4a with final a, but have not been able to convince `a' is the default boot partition. As you found, there isn't much error checking and the `a' partition is used in an unfortunate way even when it is empty. > In sys.c:find() the boot code divides by 0, causing a loop of reboots, > and one way of preventing that is to replace the lines > /* This little trick is for OnTrack DiskManager disks */ > boff = dl->d_partitions[part].p_offset - > dl->d_partitions[2].p_offset + sector; > in disk.c by > boff = sector; Apparently the partition table has the wrong offsets in it. `part' and both of the p_offset's should be 0 here. A couple of lines later, b_size is set to dl->d_partitions[part].p_size. This should be 0 because you used the `e' partition and didn't override the default value of 0 for `part'. A partition of size 0 shouldn't be bootable; however there is no check for this; in fact b_size is only used in the rarely-used BAD144 case. >Discussion: > The above patches work entirely satisfactorily, > but the real problem is that this Disklabel Editor > did not write anything in partition[0], while the > disk.c code assumes that there would be something. It has to write something there since all of the partition entries have to be written together. It probably writes 0. > Moreover, the variable `part' is never set. No, it is statically initialized to 0. This matches the default partition name `a'. > The bootstrap code could be much more robust. Yes. Bruce