> I have an OpenBSD 3.7 i386 installation on an external usb-enclosure.
> I have some space left, and I would like to create an msdos partition
> (to transfer files between windows and OpenBSD).
> 
> I have tried to create one using OpenBSD's fdisk; then I have
> formatted the new partition in windows xp.
> 
> But now I don't see how to access the new partition from OpenBSD -- it
> does not appear in disklabel, so I don't know how to mount it.
> 
> Here is some relevant data:
> 
> mhv2040at# dmesg | grep sd0
> sd0 at scsibus1 targ 1 lun 0: <FUJITSU, MHV2040AT, 0000> SCSI0 0/direct fixed
> sd0: 38154MB, 38154 cyl, 64 head, 32 sec, 512 bytes/sec, 78140161 sec total
> dkcsum: sd0 matched BIOS disk 80
> root on sd0a
> 
> mhv2040at# fdisk sd0
> Disk: sd0       geometry: 4864/255/63 [78140160 Sectors]
> Offset: 0       Signature: 0xAA55
>          Starting       Ending       LBA Info:
>  #: id    C   H  S -    C   H  S [       start:      size   ]
> ------------------------------------------------------------------------
> *0: A6    0   1  1 - 4177 254 63 [          63:    67119507 ] OpenBSD
>  1: 0C 4178   0  1 - 4308 254 63 [    67119570:     2104515 ] Win95 FAT32L
>  2: 00    0   0  0 -    0   0  0 [           0:           0 ] unused
>  3: 00    0   0  0 -    0   0  0 [           0:           0 ] unused


        Note 67119570 and 2104515 above

        That is the piece of disk you want to use.


> 16 partitions:
> #             size        offset  fstype [fsize bsize  cpg]
>   a:        524225            63  4.2BSD   2048 16384  255 # Cyl     0*-   255
>   b:       2097152        524288    swap                   # Cyl   256 -  1279
>   c:      78140161             0  unused      0     0      # Cyl     0 - 
> 38154*
>   d:        524288       2621440  4.2BSD   2048 16384  256 # Cyl  1280 -  1535
>   e:       2097152       3145728  4.2BSD   2048 16384  323 # Cyl  1536 -  2559
>   f:       4194304       5242880  4.2BSD   2048 16384  323 # Cyl  2560 -  4607
>   g:        524288       9437184  4.2BSD   2048 16384  256 # Cyl  4608 -  4863
>   h:       4194304       9961472  4.2BSD   2048 16384  323 # Cyl  4864 -  6911
>   i:       2097152      14155776  4.2BSD   2048 16384  323 # Cyl  6912 -  7935
>   j:       2097152      16252928  4.2BSD   2048 16384  323 # Cyl  7936 -  8959
>   k:       2097152      18350080  4.2BSD   2048 16384  323 # Cyl  8960 -  9983
>   l:       4194304      20447232  4.2BSD   2048 16384  323 # Cyl  9984 - 12031
>   m:       8388608      24641536  4.2BSD   2048 16384  323 # Cyl 12032 - 16127
>   n:      34089426      33030144  4.2BSD   2048 16384  323 # Cyl 16128 - 
> 32773*

        # disklabel -E sd0
        > a p
        offset: [67119570] 67119570
        size: [2104515] 2104515
        FS type: [4.2BSD] MSDOS


        If the above does not work, try typing the 'b' command and using '*'
        to use the whole disk, then repeat.

        It will most likeley guess the size of that partition you want.

        OpenBSD only uses the MBR/PBR crud to find the disklabel, then
        it gives you a max of 15 (16) partitions located using absolute
        addressing.

        This is well documented in the FAQ.  And it works almost the
        same on all our architectures, unlike other operating systems
        that do something different for every architecture.

> mhv2040at# ll /dev/sd0*
> brw-r-----  1 root  operator    4,   0 Sep  4 22:33 /dev/sd0a
> brw-r-----  1 root  operator    4,   1 Sep  4 22:33 /dev/sd0b
> brw-r-----  1 root  operator    4,   2 Sep  4 22:33 /dev/sd0c
> brw-r-----  1 root  operator    4,   3 Sep  4 22:33 /dev/sd0d
> brw-r-----  1 root  operator    4,   4 Sep  4 22:33 /dev/sd0e
> brw-r-----  1 root  operator    4,   5 Sep  4 22:33 /dev/sd0f
> brw-r-----  1 root  operator    4,   6 Sep  4 22:33 /dev/sd0g
> brw-r-----  1 root  operator    4,   7 Sep  4 22:33 /dev/sd0h
> brw-r-----  1 root  operator    4,   8 Sep  4 22:33 /dev/sd0i
> brw-r-----  1 root  operator    4,   9 Sep  4 22:33 /dev/sd0j
> brw-r-----  1 root  operator    4,  10 Sep  4 22:33 /dev/sd0k
> brw-r-----  1 root  operator    4,  11 Sep  4 22:33 /dev/sd0l
> brw-r-----  1 root  operator    4,  12 Sep  4 22:33 /dev/sd0m
> brw-r-----  1 root  operator    4,  13 Sep  4 22:33 /dev/sd0n
> brw-r-----  1 root  operator    4,  14 Sep  4 22:33 /dev/sd0o
> brw-r-----  1 root  operator    4,  15 Sep  4 22:33 /dev/sd0p
> 
> mhv2040at#
> 
> I think sd0o and sd0p are the leftovers from the installation
> procedure (I might have created sd0o and sd0p, but deleted it during
> the installation).

        Don't do that.  Leave them alone.  There is never any
        need to delete such things.

Reply via email to