Fred Snurd wrote:
I apologize for the newbie question,
the lack of line wraps is mighty annoying, too.
> but how is one supposed to add a FAT32 partition? The following shows
> where I have verified the partitioning of a USB flash drive containing
> two partitions through fdisk. One for OpenBSD (type A6) & the rest
> FAT32. Yet when entering the disklabel, I am not seeing the FAT32
> partition (typically partition 'i'), and disklabel doesn't allow adding
> it either. What is the trick for making this visible?
$ sudo fdisk sd0
Disk: sd0 geometry: 124/255/63 [2002944 Sectors]
Offset: 0 Signature: 0xAA55
Starting Ending LBA Info:
#: id C H S - C H S [ start: size ]
------------------------------------------------------------------------
0: 06 26 0 1 - 123 254 63 [ 417690: 1574370 ] DOS > 32MB
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 0 33 - 25 254 63 [ 32: 417658 ] OpenBSD
$ sudo disklabel -E sd0
# Inside MBR partition 3: type A6 start 32 size 417658
Treating sectors 32-417690 as the OpenBSD portion of the disk.
You can use the 'b' command to change this.
Initial label editor (enter '?' for help at any prompt)
p
device: /dev/rsd0c
type: SCSI
disk: SCSI disk
label: Flash Voyager
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 124
total sectors: 2002944
free sectors: 0
rpm: 3600
16 partitions:
# size offset fstype [fsize bsize cpg]
a: 417658 32 4.2BSD 2048 16384 1
c: 2002944 0 unused 0 0
a i
No space left, you need to shrink a partition
q
No label changes.
$
I assume you want to be able to access the FAT32 partition from Windows.
I've found that W2k and XP both seem to require that the FAT32 partition
be physically first on the disk.
Zero your drive (dd if=/dev/zero of=/dev/rsdXc count=200. Replace the X
as appropriate, of course), then start over.
Create a FAT partition first, then an OpenBSD partition, then disklabel.
Since both partitions will be there when disklabel is first invoked, it
will give you what you are after automatically.
IF you want the OpenBSD partition to be bootable, set that in OpenBSD's
fdisk, too. Windows really gets unhappy when it sees multiple partitions
on removable media, so it won't help you at all.
Once the FAT partition is created in OpenBSD, however, it can (and probably
should be) formatted in Windows. Windows does that ok, as long as it is the
first partition on the disk.
Nick.