Nick Guenther wrote:
On 5/6/06, Henrik Borgh <[EMAIL PROTECTED]> wrote:
$ sudo fdisk wd0
Password:
Disk: wd0       geometry: 4864/255/63 [78140160 Sectors]
Offset: 0       Signature: 0xAA55
         Starting       Ending       LBA Info:
 #: id    C   H  S -    C   H  S [       start:      size   ]
------------------------------------------------------------------------
0: 12 0 1 1 - 382 254 63 [ 63: 6152832 ] Compaq Diag. 1: 0C 383 0 1 - 2597 254 63 [ 6152895: 35583975 ] Win95 FAT32L
*2: A6 2598   0  1 - 3930 254 63 [    41736870:    21414645 ] OpenBSD
3: 0C 3931 0 1 - 4862 254 63 [ 63151515: 14972580 ] Win95 FAT32L

$ sudo disklabel wd0
[Snip disklabel intro]

16 partitions:
#             size        offset  fstype [fsize bsize  cpg]
a: 20761146 41736870 4.2BSD 2048 16384 328 # Cyl 41405*- 62001 b: 653499 62498016 swap # Cyl 62002 - 62650* c: 78140160 0 unused 0 0 # Cyl 0 - 77519 i: 6152832 63 unknown # Cyl 0*- 6104* j: 35583975 6152895 MSDOS # Cyl 6104*- 41405*


You'll have to redo the disklabel but it's not such a horrible
experience as you might think. Just do "disklabel -e wd0", clear it,
and start putting in new lines. Make sure to keep this output so you
can put the old partitions back.

I'm sorry, do what, exactly? Clear it? Why would you want to do something like that when the OP would just need to add ONE line.

This is what I'd do:

"sudo disklabel -e wd0", yes, but you just need to copy and change the copied line to meet the parameters of the new partition.

        Specifically, once in the editor:

Find the "j:" entry from the above disklabel. Copy and put it right below it "yyp" if you're not very familar with vi.

Then change "j:" to "k:", change the size column's value to the size value reported in fdisk, change the offset column's value to the "start" value as reported by fdisk for that partition. Save and quit. Disklabel will then update the label to make this happen.

Then create the mount point directory that you want this filesystem on, if you haven't already done so, then edit your fstab with your favorite editor. Copy and put the mount line from the existing FAT filesystem, then edit the copy's mount directory and slice entries to match the slice you defined (in this example, "wd0k").

Then reboot to test your changes. Yeah, you could do a "mount /mount_point", but it's better to reboot to make sure you get your changes on the next reboot now than when it's really inconvenient to do so.

So long as you are only messing with the disklabel you shouldn't be
able to destroy your data (well, data on the windows drives at least)
>
This is misleading. The OpenBSD disklabel is EVERYTHING to that OS, you screw it up, game over. It is very possible to toast a FAT32 if you don't get the disklabel set up right. Anytime you mod the i386 partition table or the disklabel assume you might toast EVERYTHING on the drive. That is, have backups, especially if you're learning this stuff.

Then again, if the OP only adds one line, rather than rekey the WHOLE DISKLABEL as you are suggesting, this shouldn't be a problem to OpenBSD.


but as always, be careful.

        Indeed.

--
Joseph C. Bender
jcbender on domain benderhome dot net

Reply via email to