Subject: RE: Using disklabel -e wd0 to add new partition
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: sucho2 <sucho2@vt.edu>
List: netbsd-help
Date: 01/30/2002 16:39:33
Hi,

I finally figured out how to do it.  It seems that it doesn't get 
automatically updated.  I did this and it worked:

# disklabel -e wd0

(This brings up the vi and lets you edit the partition table under disk wd0)
You add the partition that you wish to add by editing it, save it and exit 
from vi.

Now, you'll note that your partition table hasn't been modified yet.  Instead, 
vi creates a temporary image file for the modified partition in /tmp.
In my system, the temporarily created file is:

EdDk.a00236a  <-- name of the file created in /tmp

To finally update your partition, you do:

# disklabel -R wd0 /tmp/EdDk.a00236a

Now, check if partition have been created:

# disklabel -r wd0

And you'll see that indeed new partition is added.  If you haven't formated 
that new partition, format it before use.  If it was previously formatted and 
contains data, you won't need to reformat and everything is intact.

Thanks all.


Yours sincerely,
Sung N. Cho,
Wednesday, Jan. 30, 2002.






>===== Original Message From Manuel Bouyer <bouyer@antioche.eu.org> =====
>On Wed, Jan 30, 2002 at 01:59:38PM -0500, sucho2 wrote:
>> Hi,
>>
>> I am trying to add a partition and received many valuable info regarding 
how
>> to do it.  I did as instructed:
>>
>> disklabel -e wd0
>>
>> and the vi editor show up with partition info.
>>
>> I've added new partition by editing the vi file and saved it.  But, it 
saves
>> the modified file in /tmp directory but not actually modifing the disk
>> partition.  Do I need to replace the modified file that was created and 
saved
>
>Yes, vi saves it in /tmp. After that disklabel will process this file and
>update the partition info. Didn't this work for you ?
>
>--
>Manuel Bouyer <bouyer@antioche.eu.org>
>--