Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 May 2011 23:04:30 +0400
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        Victor Balada Diaz <victor@bsdes.net>
Cc:        stable@freebsd.org
Subject:   Re: gpart usage
Message-ID:  <4DDC013E.5040107@FreeBSD.org>
In-Reply-To: <20110524172718.GG1291@equilibrium.bsdes.net>
References:  <20110524132028.GE1291@equilibrium.bsdes.net> <4DDBC4A9.7040404@FreeBSD.org> <20110524150951.GF1291@equilibrium.bsdes.net> <4DDBD73B.7090600@FreeBSD.org> <20110524172718.GG1291@equilibrium.bsdes.net>

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

[-- Attachment #1 --]
On 24.05.2011 21:27, Victor Balada Diaz wrote:
>>> So the 16 sector offset in BSD label is really needed or isn't?
>>
>> First 8 KBytes of the freebsd partition are reserved for the boot code
>> (/boot/boot). The table of BSD partitions itself is located in the
>> second sector. So, if you plan to create freebsd-ufs partition you can
>> create it without any offset. But if it will be not an UFS partition,
>> then i would created it with offset, otherwise you can wipe the BSD label.
> 
> Who's the one reserving the 16 sector (8 KBytes) offset? the UFS filesystem? the BSD slice/disklabel
> provider? the MBR provider?

BSD slice provider.

> If i understood it correctly, it would be like:
> 
> Sector 0: usual IBM-PC MBR, MBR provider doesn't need anything more
> Sector 1-62: Reserved by MBR scheme (dunno why, but seems to be the case, probably CHS alignment) start: 63

Yes, currently we are actively discussing about this in the
freebsd-geom@ maillist.

> Sector 63: BSD scheme unused because on disk metadata is stored on second sector

Here is saved the boot1 stage of /boot/boot.

> Sector 64: BSD scheme (disklabel) on disk data (148 + 8 * 16 = 276 bytes according to sys/disklabel.h)

GEOM_PART_BSD supports up to 20 partitions.

> Sectors 65-(63+16): Reserved by ??? for /boot/boot

Here is saved the boot2 stage of /boot/boot.

> Sectors (63+16)+: partitions

If you will not use offset for the first BSD partition, then you can
wipe BSD scheme with this command:
# dd if=/dev/zero of=/dev/da0s1a count=2

-- 
WBR, Andrey V. Elsukov


[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (FreeBSD)

iQEcBAEBAgAGBQJN3AFDAAoJEAHF6gQQyKF6DoYH/i6bPG1tkPpWdvZMaNWe5n8l
HKP0LlKRwQ/t8x9txvwkCKjzwrRlPKyLF0+VvLxXRTIZfbEmZ0jjsOfUEr4VdUx7
t+2KI/k7Jd6/3jeab7JlHERhUkqZhfdn6BzsUQy9DP4f7+vaey747NpRxh5CYC1p
4FOP6MhjyDmnwKNLr9T1cVHmyPn3NKHwomHv6NPoAtJp/ECGURewcob1ovaoYAam
6Ag4Udndlh+93qfxn0Wxwlxf5wDyegTcP5U+K4lvV6NnYPltn2/syWGIK66n9VCf
3bYbwTJ57PQ/uW1NwgbdypH2QLyK6hsuUFSXKQNNrMxTbGacZ4Nhq3n1QjrNFps=
=vbI/
-----END PGP SIGNATURE-----

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