Date: Thu, 25 Jul 1996 22:27:20 +1000 From: Bruce Evans <bde@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 Message-ID: <199607251227.WAA11050@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199607251227.WAA11050>