Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Oct 2000 19:48:48 -0800 (PST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Warner Losh <imp@village.org>
Cc:        arch@FreeBSD.org
Subject:   Re: Like to commit my diskprep
Message-ID:  <XFMail.001031194848.jhb@FreeBSD.org>
In-Reply-To: <200011010334.eA13YlV41951@billy-club.village.org>

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

On 01-Nov-00 Warner Losh wrote:
> In message <XFMail.001031113123.jhb@FreeBSD.org> John Baldwin writes:
>: 
>: On 31-Oct-00 Warner Losh wrote:
>: > Before anyone asks, the  biggest difference between my diskprep and
>: > Matt's recent changes are that diskprep doesn't introduce a new api
>: > into the kernel and doesn't pollute disklabel with functions it
>: > traditionally hasn't done.  Matt's changes put functionality into
>: > edisklabel and the kernel.
>: 
>: Actually, I would think that creating a virgin disklabel would be
>: part of disklabel's job.  After all, doesn't it make sense to use
>: the disklabel program to create/edit disklabel's?
> 
> The problem is that FreeBSD/i386 needs to put two different labels on
> the disk.  One is for the BIOS/legacy OSes that run on i386.  The
> other is for FreeBSD.  FreeBSD/alpha doesn't have this problem because
> it doesn't need the second set of labels.  Other FreeBSD porst might
> need to have different things done in the future to make them co-exist
> with other native platforms.

The disklabel we stick in a x86 slice is almost identical to the normal
disklabel on an alpha disk.  The only differences that I can recall are
some minor layout tweaks that control where the boot code goes.  Both
of these are handled by the disklabel(8) program, which makes sense since
they are nearly identical.  The extra label that x86 uses is the MBR, which
is managed by the x86-specific fdisk(8) command.  All that Dillon's patch
does is fix one broken case: creating a brand new disklabel (the BSD type
of disklabel) inside of a new slice.  The old disklabel(8) could already
edit an existing disklabel in a slice, and some people managed to fake
it along by telling it to use fd360 as the disktab entry for slices and
other nasty stuff.  fdisk(8) should manage the MBR that is present only on
x86 and ia64, and disklabel(8) should manage the BSD-style disklabel that
is used in UFS/FFS.  I fail to see why this doesn't make sense.

> Warner

-- 

John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




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