Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Oct 2002 22:35:08 +0100 (BST)
From:      Mark Valentine <mark@thuvia.demon.co.uk>
To:        Brooks Davis <brooks@one-eyed-alien.net>
Cc:        John Baldwin <jhb@freebsd.org>, Poul-Henning Kamp <phk@critter.freebsd.dk>, "M. Warner Losh" <imp@bsdimp.com>, cvs-committers@freebsd.org, cvs-all@freebsd.org, Mikhail Teterin <mi+celsius@aldan.algebra.com>
Subject:   Re: cvs commit: src/lib/libdisk Makefile chunk.c write_alpha_dis
Message-ID:  <200210252135.g9PLZ8RA082229@dotar.thuvia.org>
In-Reply-To: <20021025130324.A7985@Odin.AC.HMC.Edu>

next in thread | previous in thread | raw e-mail | index | archive | help
> From: Brooks Davis <brooks@one-eyed-alien.net>
> Date: Fri 25 Oct, 2002
> Subject: Re: cvs commit: src/lib/libdisk Makefile chunk.c write_alpha_dis

> I don't understand how magicly ignoring the actual disk structure is
> more reliable.

It's not ignoring the disk structure, it's interpreting it the way it
was meant to be interpreted (I make no claims as to the quality of the
design of the DOS partition table, I simply describe how it works...).

This makes my system boot correctly more often, and is a Good Thing.

> For example, lets say you had a system configured like the one John
> showed us with the first MBR partition being Windows and the second
> being FreeBSD.  Now let's say you decide the some new office suite is
> sufficently good that you don't need Windows anymore so you stop using.
> Now one day, you ralize that you're /usr is getting way too full so you
> decided to nuke /dev/ad0s1 and install a BSD disk lable on it with some new
> partitions for /usr/local and maybe one for your MP3 collection.  Now,
> if you were using /dev/ad0s2[a-h] entris in /etc/fstab you're not too
> badly off, but if you were using /dev/ad0[a-h] entries, those now point
> to /dev/ad0s1 not /dev/ad0s2 so init fails at boot.

You're abusing the multiple BSD disklabel mis-feature.  Everything
works just fine with a single disklabel.  The confusion you see is
the equivalent of the DOS "shifting drive letter" problem, which
should come as no surprise: DOS partition table entries are referenced
by their (variable) type, not their (static) index.

You've just demonstrated the obscure case where /dev/ad0[a-h] is ambiguous;
it can be avoided by using a single disklabel.  The more common case (in my
experience) is when /dev/ad0s1[a-h] moves about; it can be avoided by using
/dev/ad0[a-h].

		Cheers,

		Mark.

-- 
Mark Valentine, Thuvia Labs <mark@thuvia.co.uk>       <http://www.thuvia.co.uk>;
"Tigers will do ANYTHING for a tuna fish sandwich."       Mark Valentine uses
"We're kind of stupid that way."   *munch* *munch*        and endorses FreeBSD
  -- <http://www.calvinandhobbes.com>;                  <http://www.freebsd.org>;

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210252135.g9PLZ8RA082229>