From owner-freebsd-questions@FreeBSD.ORG Sun Mar 13 11:47:24 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EEFE716A4CE for ; Sun, 13 Mar 2005 11:47:23 +0000 (GMT) Received: from hosea.tallye.com (joel.tallye.com [216.99.199.78]) by mx1.FreeBSD.org (Postfix) with ESMTP id DACA343D62 for ; Sun, 13 Mar 2005 11:47:21 +0000 (GMT) (envelope-from lorenl@alzatex.com) Received: from hosea.tallye.com (hosea.tallye.com [127.0.0.1]) by hosea.tallye.com (8.12.8/8.12.10) with ESMTP id j2DBlHUQ020309 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 13 Mar 2005 03:47:18 -0800 Received: (from sttng359@localhost) by hosea.tallye.com (8.12.8/8.12.10/Submit) id j2DBlE3C020307; Sun, 13 Mar 2005 03:47:14 -0800 X-Authentication-Warning: hosea.tallye.com: sttng359 set sender to lorenl@alzatex.com using -f Date: Sun, 13 Mar 2005 03:47:14 -0800 From: "Loren M. Lang" To: Carl J Message-ID: <20050313114714.GK18080@alzatex.com> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="P7Tqkd/m/Jnohiaz" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-GPG-Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc X-GPG-Fingerprint: B3B9 D669 69C9 09EC 1BCD 835A FAF3 7A46 E4A3 280C cc: freebsd-questions@freebsd.org Subject: Re: Location of disklabel X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Mar 2005 11:47:24 -0000 --P7Tqkd/m/Jnohiaz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 10, 2005 at 04:32:30PM -0500, Carl J wrote: > Hi all! To all your FS guru's outthere, I desperately need > to know where the disklabel is stored (since my disk is in trouble!) >=20 > Situation: >=20 > My /dev/ad0s1 has 2 partitions: "a" (FS) followed by "b" (swap). > By using "disklabel -r", I see my "a" and "b" indeed > take up the entire slice. >=20 > My desperate question: >=20 > Where, then, is the "disklabel" stored? The second sector of the slice that the disklabel is partitioning. For example, a disklabel on your first slice would be stored in the second sector of /dev/ad0s1. The command dd if=3D/dev/ad0s1 skip=3D1 | hexdump will give you a hexdump of the disklabel. Since the 'a' partition of the disklabel normally starts at the beginning of the slice that the disklabel is in, it is identical to reading from the slice directly, just a little shorter. Also, the 'c' partition always covers the entire slice so it is identical assuming the disklabel isn't messed up. >=20 > Somewhere in the partition table? The Master Boot Record? > The reserved cylinder #0? No, msdos partition table that creates what are called slices in the bsd world reside in the last few byte of the Master boot record, but this has nothing to do with the disklabel that is stored in the slice. And normally the only thing you will find in cylinder 0 is the master boot record which is the very first sector of the hard disk. >=20 > Or is it stored somewhere inside /dev/ad0s1a ?? > (if that's the case, does that mean the UFS1 > intentionally left some space unused, for this purpose? > And if so, is it always at a fixed location within a UFS1 slice?) Actually, since the 'a' partition is the same as the beginning of the slice it's in, the ufs filesystem always skips the first 16 sectors of whatever partition it's in. >=20 > What if in my slice, I have SWAP first, and then UFS1, > then does that mean the SWAP Format also reserves > some unused space for the disklabel to go??? >=20 > Sorry if the question is stupid. I just somehow couldn't > logically see where it would be stored, and yet be compatible > with having other OS on the same drive... etc. >=20 > Thanks! >=20 > - Carl >=20 >=20 > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o= rg" --=20 I sense much NT in you. NT leads to Bluescreen. Bluescreen leads to downtime. Downtime leads to suffering. NT is the path to the darkside. Powerful Unix is. Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc Fingerprint: CEE1 AAE2 F66C 59B5 34CA C415 6D35 E847 0118 A3D2 =20 --P7Tqkd/m/Jnohiaz Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFCNChCbTXoRwEYo9IRAvV7AJ9t3C5wWemxwS7J0T06tCDPXz/98wCfdPPr O9x6EpbC3GfSO9IBhWKH3bk= =m4kk -----END PGP SIGNATURE----- --P7Tqkd/m/Jnohiaz--