Date: Mon, 23 Sep 1996 15:06:44 -0700 From: Darryl Okahata <darrylo@hpnmhjw.sr.hp.com> To: Bill Fenner <fenner@parc.xerox.com> Cc: Poul-Henning Kamp <phk@critter.tfs.com>, "Chris Csanady" <ccsanady@friley216.res.iastate.edu>, freebsd-bugs@freebsd.org, Bruce Evans <bde@zeta.org.au> Subject: Re: Very disturbing boot block problems.. Message-ID: <199609232206.AA024646404@hpnmhjw.sr.hp.com> In-Reply-To: Your message of "Mon, 23 Sep 1996 12:48:10 PDT." <96Sep23.124822pdt.177476@crevenia.parc.xerox.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In regards to the Bill's old message: > (See http://www.freebsd.org/cgi/search.cgi?words=1023+%28BIOS+limit%29&source > =freebsd-questions&source=freebsd-bugs&source=freebsd-hackers&source=freebsd- > hardware&max=25&docnum=4) > > This is kind of an unexpected message, since not only does "fdisk" say only > > 1023 cylinders, "disklabel" says that the a partition is cylinders 0-34. Oh, the confusion is caused by having at least three geometries (ignoring disk managers and the like): 1. The disk geometry used by the disk BIOS. 2. The disk geometry used (and stored onto the disklabel) by the disklabel command. 3. The disk geometry used by FreeBSD's fdisk to slice up a disk. This geometry is initially obtained from the disklabel on the disk; however, if a disklabel is not present, a fictitious one is made up, which is almost certainly different from the BIOS geometry. Nothing enforces that these geometries be the same (they don't have to be, but they should be, if you want to share/use the disk with other OS's). The important geometry is the one used by the BIOS, as that is what determines the "1024-cylinder" limit (the second-stage bootloader uses the BIOS, and so the bootloader has all of the BIOS limitations). Here's another old posting, from Bruce Evans this time, that talks about creating bootable FreeBSD partitions. [ In case anyone's wondering how I can quickly pull out these postings, I've been referring to them while I write a perl-script-from-h*ll that generates /bin/sh scripts to fdisk, disklabel, and newfs a drive. ] -- Darryl Okahata Internet: darrylo@sr.hp.com DISCLAIMER: this message is the author's personal opinion and does not constitute the support, opinion, or policy of Hewlett-Packard, or of the little green men that have been following him all day. =============================================================================== Date: Fri, 16 Jun 1995 15:13:04 +1000 From: Bruce Evans <bde@zeta.org.au> To: hackers@freebsd.org, phk@ref.tfs.com Subject: Re: disk handling program Cc: doc@freebsd.org, faq@freebsd.org >For your boot-disk it MUST be correct. For other disks it merely have >to make sense. >There are two ways to get it right: >A: Create a msdos partition, and delete it from FreeBSD. >B: Boot freebsd with -v and look at the "bios-geometry" table > it prints at the end, find the right one for this particular > drive and use that. That's 2 more wrong ways. A: Fails if the fdisk used to create the msdos partition does things a little differently. Deletion of foreign partitions may cause trouble later. It may be necessary to delete certain metadata within the partitions, and fdisk (on any system) has no way of knowing where the metadata is. The problems occur if stale metadata is reactivated (and used). For DOS, stale parameter blocks may be used by `format' to format areas outside the (new) slice. For FreeBSD, stale disklabels may be used by `newfs' to newfs the wrong areas. The damage is now limited by disklabels being restricted to the slice that they are in. B: Usually fails if a disk manager is normally installed but isn't installed when you boot with -v. Right ways: A1: If a disk manager isn't normally installed, use method B. B1: If a disk manager is normally installed: Install disk manager. Install DOS (on the same disk). Boot DOS (on the same disk). Run pfdisk or some other DOS utility that reports the geometry. Use DOS fdisk to remove DOS. Use the geometry reported by pfdisk. Simpler methods might work: C: If a disk manager is normally installed: Install disk manager. Boot DOS from a floppy. Run utility to load disk manager for hard disk. Run pfdisk or some other DOS utility that reports the geometry. Use the geometry reported by pfdisk. D: If a disk manager is normally installed: Install disk manager. Use method B. This requires booting FreeBSD with -v from ANOTHER disk with BOTH the disk manager and FreeBSD already installed. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609232206.AA024646404>