Subject: Re: Shark "disklabel hell"
To: Jeremy Cooper <jeremy@baymoo.org>
From: Luke Mewburn <lukem@wasabisystems.com>
List: port-arm32
Date: 01/05/2001 22:28:12
On Fri, Jan 05, 2001 at 03:20:31AM -0800, Jeremy Cooper wrote:
> For all the years I have been working with NetBSD, it seems that I never
> can get the knack of the "disklabel" command;  I always seem to be stuck
> in a severe catch-22 with it.  And this doesn't just apply to the SHARK
> platform, it happens on the sun3 and sparc as well.  In the following, I
> will illustrate a problem I am having trying to install NetBSD-1.5
> on an internal IDE drive.
> 
> 1.  # disklabel -i -I wd0
> 2.  wd0: no disk label
> 3.  partition> W
> 4.  label disk [n]? y
> 5.  Label written
> 6.  partition> Q
> 7.  # disklabel -i wd0
> 8.  wd0: no disk label
> 9.  partition>
> 
> What the heck is going on here?  Absolutely none of the changes I make in
> disklabel ever get committed to the disk.  I'm sick of this!  I can't
> install anything because of it.

From memory, you do something like the following to get an initial
disklabel on the disk:
    * read the in-core disklabel that the kernel has faked up out to a file:
	disklabel wd0 > /tmp/wd0label

    * write this label to the actual disk
	disklabel -R -r wd0 /tmp/wd0label

Then you can edit it with:
	disklabel -i wd0
or
	disklabel -e wd0
	

-- 
Luke Mewburn  <lukem@wasabisystems.com>  http://www.wasabisystems.com
Luke Mewburn     <lukem@netbsd.org>      http://www.netbsd.org
Wasabi Systems - providing NetBSD sales, support and service.