Date: Thu, 4 Sep 2003 15:03:42 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Meow Cat <meow_cat@searchbug.com> Cc: freebsd-questions@freebsd.org Subject: Re: 5.1-RELEASE: disklabel/bsdlabel for multi-boot system Message-ID: <20030904140342.GF88888@happy-idiot-talk.infracaninophile.co.uk> In-Reply-To: <web-16293600@gmsi1.com> References: <web-16293600@gmsi1.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--b8GWCKCLzrXbuNet Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 03, 2003 at 07:54:12PM -0500, Meow Cat wrote: > Hi, > Before starting, I should say that I've RTFM'd, looked=20 > in > the FAQ and the mailing lists, etc. I've seen lots of=20 > people > complaining about similar problems but no answers. > I have an existing partition table, and I'd like=20 > FreeBSD > to fit into it with as little damage to the existing OSs=20 > as > possible. The setup I have (as reported by OpenBSD=20 > disklabel) > is: >=20 > a: 262144 257040 4.2BSD 1024 8192 16 > b: 16384 519184 swap =20 > c: 498015 257040 unused 0 0 =20 > d: 219487 535568 4.2BSD 1024 8192 16 > e: 4000122 6747363 4.2BSD 1024 8192 16 > i: 256977 63 ext2fs =20 > l: 5992245 755055 MSDOS =20 > m: 45351432 10747548 MSDOS =20 > n: 32001417 56099043 MSDOS =20 > o: 32001417 88100523 MSDOS =20 >=20 > It took me ages to figure out how to achieve this under > OpenBSD, and then after install I couldn't get X to work. > So I'm trying FreeBSD - of course bsdlabel only supports > slices a-h for some reason that is never explained, so I > have to delete half of the slices. Fine, I do that. > So with a heavily edited label file I try: > bsdlabel -R /dev/ad2s0 bsdlabel_file Unfortunately I don't think you can use an OpenBSD disk label on a FreeBSD system, or vice-versa. Seems that the OpenBSD folks have revamped the way the label data is arranged on the disk, incidentally giving themselves 16 possible partitions rather than the 8 available under FreeBSD. =20 > Every slice starts "after end of unit" and "extends beyond > end of unit." The c slice "doesn't cover entire unit!" >=20 > Okay, I can deal with that, I think - just extend the c > slice to cover the entire disk, use "bsdlabel -A" (after a > "bsdlabel -w") to read the disk configuration and edit it > to ensure that it's not broken, and try again. If you're trying to support multiple OSes on this one disk, then under FreeBSD you'ld tend to give FreeBSD a slice of it's own, using fdisk(8) -- there's a terminology problem here that confuses a lot of people. See http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/install-steps.html particularly 'Example 2.4. Conceptual Model of a Disk' about what FreeBSD means by 'partitions' and 'slices'. Under /dev, you'll see a heirarchy of devices for each drive: /dev/ad0 The whole primary master drive /dev/ad0s1 The first slice on that drive Anyhow, within the FreeBSD slice you then create the FreeBSD partitions using disklabel(8), or as it seems to have mutated into on 5.x-RELEASE, bsdlabel(8). This gives you devices: /dev/ad0s1a The root partition /dev/ad0s1b The swap area /dev/ad0s1c The whole slice=20 /dev/ad0s1d Another partition... so /dev/ad0s1c and /dev/ad0s1 effectively mean the same thing, which is a bit redundant. Unfortunately the concept that "the c partition is the whole [disk|slice]" is so deeply embedded in the psyche (not to mention the source code) of the BSD's it isn't going to be changed any time soon. =20 > I get the same errors. How can the first slice possibly > begin "after end of unit" and what do I do to fix this? > How are these "unit"-related numbers calculated? Does > "unit"=3D=3D=3Dentire-hard-disk? Why does this fail even when > I make the c slice cover the entire hard disk? This seems to be a confusion between the (DOS compatible) "Partition table" as established by fdisk(8) and the (BSD specific) disk label. If bsdlabel(8) is talking about slices, then something is definitely wrong with the universe. =20 > Also, I'd like to have the a slice to be a small one > from the main partition table, and /usr mounted on a > larger slice within the extended partition table. I > managed this under OpenBSD with the table above - is > there a problem (other than the one I mentioned) with > using this type of table in FreeBSD? 'Extended partitions' are a windows sort of thing, not hugely popular in FreeBSD. sysinstall(8) doesn't cope with them very well, but if you have a pre-existing disk with them on, you can access them from within FreeBSD as: /dev/ad0s5 or above. They tend, however to be used for foreign filesystems rather than native UFS ones. =20 > Finally, before you tell me to try sysinstall - I tried > it. I'm sure it has its uses, but the interactive fdisk > part is unable to understand extended partitions, and > the interactive disklabel does not allow you to specify > your own begin/end for slices, either in sectors, or in > cyl/trk/head. So it's useless for my purposes. The only > possible use I can see for it is for people who want to > devote their entire machine to FreeBSD. That's something > I noticed in OpenBSD also - both OSs seem about 10 years > behind when it comes to supporting mutli-boot systems :( Ah, but this whole PC disk layout thing hasn't changed significantly in the last 10 years, despite the massive increase in the size of disks over that time. I know that it isn't overwhelmingly difficult to create a multiboot system using any combination of FreeBSD, Linux, Windows and Solaris/Intel you care to mention. I've never tried OpenBSD, so I can't comment on that score. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --b8GWCKCLzrXbuNet Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQE/V0Y+dtESqEQa7a0RAuQ9AJ9CsViBviI1u8qQTJRhZttvPtZH9gCeN8Sr UHBWGyXWk7HXHmu8GUXWzR0= =WABf -----END PGP SIGNATURE----- --b8GWCKCLzrXbuNet--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030904140342.GF88888>