On 07:48:18 Oct 11, Edward F. Ahlsen-Girard wrote:
> Ladies and Gentlemen:
> 
> I wanted to use a 4GB thumb drive to move a complete partition from one 
> system to another, and needed to get a ffs volume on it.  It was originally 
> fat32.
> 
> Ran disklabel -E, said to use the whole disk, no luck.  Tried fdisk, and now 
> even less luck: both WXP and OpenBSD can tell there's a device there, but 
> neither seems to know what to do with it.
> 
> Dmesg and the errors from both of today's attempts at disklabel are attached.

Let me put things in perspective here.

disklabel(8) necessarily follows fdisk(8). It is never the other way
round.

fdisk creates an OpenBSD partition type(0xA6) [ see attached output].

If you do not intend to install another OS on this disk or in case you
want only to create ONE FFS partition then you can simply do this.

# fdisk -iy /dev/sd0

Your OpenBSD partition will be the third and it will start after the
first sector. fdisk partitions should always be correctly aligned.

Anyway once you are done with fdisk, your next task is to disklabel and
then newfs to format the file system.

disklabel creates "sub partitions" inside the fdisk portion. In our case
the fdisk primary partition covers the whole of the 4GB USB stick.

Now invoke disklabel with the -E switch as it is interactive and nice.

# disklabel -E sd0

Now you can add a partition with the 'a' key.

Just press <ENTER> for the default values.

Once you are done, do a 'w' and 'q'. It does what you guessed it will
do.;)

Now, check whether things are in order with this command.

# disklabel sd0

It should not say unholy things. ;)

Now create an FFS file system with newfs(8).

# newfs /dev/sd0a

or if you created more partitions,then you have to create file systems
on all of them.

Then you are ready to mount.

# mount /dev/sd0a /mnt

Enjoy OpenBSD.;)

Have fun!

-Girish



# fdisk wd0
Disk: wd0       geometry: 60801/255/63 [976773168 Sectors]
Offset: 0       Signature: 0xAA55
            Starting         Ending         LBA Info:
 #: id      C   H   S -      C   H   S [       start:        size ]
-------------------------------------------------------------------------------
 0: 00      0   0   0 -      0   0   0 [           0:           0 ]
unused      
 1: 00      0   0   0 -      0   0   0 [           0:           0 ]
unused      
 2: 00      0   0   0 -      0   0   0 [           0:           0 ]
unused      
*3: A6      0   1   1 -  60800 254  63 [          63:   976768002 ]
OpenBSD     
# 

Reply via email to