Re: BSDInstaller snapshot

From: Pawel Jakub Dawidek <pjd_at_FreeBSD.org>
Date: Wed, 17 May 2006 10:57:20 +0200
On Wed, May 17, 2006 at 10:45:31AM +0300, Rostislav Krasny wrote:
+> On Wed, 17 May 2006 08:57:02 +0200
+> Pawel Jakub Dawidek <pjd_at_FreeBSD.org> wrote:
+> 
+> > On Tue, May 16, 2006 at 10:26:54PM -0400, Rong-en Fan wrote:
+> > +> >From bsdlabel(8):
+> > +> 
+> > +> The first partition should start at offset 16, because the first 16
+> > +> sectors are reserved for metadata.
+> > +> 
+> > +> I think BSDInstaller should change to not create first slice at offset 0.
+>                                                             ^^^^^
+> Yet another "bsd slice" / "bsd partition" confusion? :-)
+> 
+> > 
+> > Grrr!!! DEFINITELY! Please, first partition at offset 16.
+> 
+> Interesting. Sysinstall makes the first "a" partition on a slice at
+> offset 0 and FreeBSD works properly. What is this metadata on those
+> first 16 sectors of a slice and when this metadata is really used?

What?! You only think it works properly. It doesn't.
UFS works on such partition, because UFS has a hack to skip first 16
sectors. Swap works on such partition, because swap code has a hack to
skip first 16 sectors.

Try to encrypt partition which starts at offset 16 with geli(8) or
gbde(8). Try to concatenate or stripe two partitions that start at
offset 16.
The former will destroy your metadata (at least it did so, not sure if
you won't get EPERM now). The latter will return EPERM when you try to
access data in the middle of your concat device or at the begining of
you stripped device.
Many evil things can happen, belive me. Using offset 0 and making
metadata visible from usable partition is BAD. Period.

Ok, I hope it is clear now:)

PS. What ever you do, don't treat sysinstall as an example of how to do
    things right. It is ten years old and some things have changed over
    the time.

-- 
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd_at_FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!

Received on Wed May 17 2006 - 06:59:19 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:55 UTC