Re: BSDInstaller snapshot

From: Rostislav Krasny <rosti.bsd_at_gmail.com>
Date: Wed, 17 May 2006 12:46:41 +0300
On Wed, 17 May 2006 10:57:20 +0200
Pawel Jakub Dawidek <pjd_at_FreeBSD.org> wrote:

> 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:)

Certainly. I'm only wondering now, why it wasn't fixed in sysinstall
during so many years? And had those hacks in UFS and Swap been made
because of sysinstall or because of something else?

By the way, how could one change offset of first bsd partitions on
already installed FreeBSD without destroying it?

> 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.

I just thought I can trust the official installer with partitioning
the slices.
Received on Wed May 17 2006 - 07:46:50 UTC

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