Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Mar 2004 12:27:24 +0100
From:      Matthew Seaman <matthew@cryptosphere.com>
To:        Roberto Nunnari <roberto.nunnari@supsi.ch>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: # bsdlabel -w /dev/amrd1 auto
Message-ID:  <20040330112724.GG68464@happy-idiot-talk.infracaninophile.co.uk>
In-Reply-To: <40694B6B.5010708@supsi.ch>
References:  <40694B6B.5010708@supsi.ch>

next in thread | previous in thread | raw e-mail | index | archive | help

--lQSB8Tqijvu1+4Ba
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Mar 30, 2004 at 12:26:51PM +0200, Roberto Nunnari wrote:
> hello.
>=20
> What does the auto argument mean?
>=20
> # bsdlabel -w /dev/amrd1 auto

Hmmm... Interesting.  It seems that the description of 'auto' has
vanished from the bsdlabel(8) man page, although it is present in the
disklabel(8) man page from 4.x (disklabel was renamed bsdlabel between
4.x and 5.x):

    http://www.freebsd.org/cgi/man.cgi?query=3Ddisklabel&apropos=3D0&sektio=
n=3D0&manpath=3DFreeBSD+4.9-stable&format=3Dhtml

According to disklabel(8), 'auto' means that {disk,bsd}label should
try and create a "virgin" disklabel on the slice -- that (if I
remember correctly) is essentially a 'c' partition spanning the whole
slice, and nothing else.  bsdlabel(8) either works the same way, or it
will search for an entry marked 'auto' in disktab(5) -- see
/etc/disktab -- and there is no such entry in the default
/etc/disktab.

Assuming bsdlabel(8) still works the same way as disklabel(8): note
that the auto behaviour doesn't work on all media -- only those where
{disk,bsd}label can find the parameters it needs without having to
read the thing it's labelling directly.  However, that includes all
SCSI or IDE hard drives, vnodes and regular files.
=20
> Is it possible that the command above configures amrd1
> as the default boot partition and modifies amrd0 not the
> be the active? And even modifies the partition table on
> amrd0 so that it starts at sect 0 instead of sect 63 as before?

No.  bsdlabel(8) is all about BSD partitioning -- the final 'a' in a
device name like /dev/amr1s1a It's fdisk(8) that sets /slices/ (the
's1' part in the device name) as bootable/non-bootable by altering the
master boot record (MBR) on the drive (the 'amr1' part of the device
name).

If you're using fdisk(8) on a different drive to the one you usually
boot from, then it won't be able to affect the usual booting process
in the way you are asking about.  If you used fdisk(8) to turn of the
bootable flag on all slices on your boot drive, then yes, there would
be an effect.  However, I'm sure you would remember doing something
like that.  It's easy to reverse if you did -- just use fdisk(8)
again.

	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

--lQSB8Tqijvu1+4Ba
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFAaVmcdtESqEQa7a0RAj0TAJ9d+h99To4B8b/mdWv2iNADChaDJQCdGckS
nDWZUszER4srb2K754JMDYc=
=XMSA
-----END PGP SIGNATURE-----

--lQSB8Tqijvu1+4Ba--



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