FreeBSD: Mounting extended/logical fat32 partition

I'm having some real trouble getting a fat32 logical partition within an extended partition. First of all, here's the fdisk output:

# fdisk ad5s4s2
******* Working on device /dev/ad5s4s2 *******
parameters extracted from in-core disklabel are:
cylinders=9132 heads=16 sectors/track=63 (1008 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=9132 heads=16 sectors/track=63 (1008 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 7 (0x07),(NTFS, OS/2 HPFS, QNX-2 (16 bit) or Advanced UNIX)
start 63, size 9205182 (4494 Meg), flag 0
beg: cyl 1023/ head 254/ sector 63;
end: cyl 1023/ head 254/ sector 63
The data for partition 2 is:
sysid 5 (0x05),(Extended DOS)
start 29672055, size 61432560 (29996 Meg), flag 0
beg: cyl 1023/ head 254/ sector 63;
end: cyl 1023/ head 254/ sector 63
The data for partition 3 is:
sysid 0 (0000),(unused)
start 24897, size 0 (0 Meg), flag 0
beg: cyl 0/ head 0/ sector 0;
end: cyl 370/ head 0/ sector 50
The data for partition 4 is:

I'm trying to get at partition 2 -- that 29996Meg partition. But when I try to mount:

# mount -t msdosfs /dev/ad5s4s2 /mnt/music
mount_msdosfs: /dev/ad5s4s2: Invalid argument

What am I missing?

I do have geom_mbr.ko loaded.
6 answers Last reply
More about freebsd mounting extended logical fat32 partition
  1. I believe that you are using the incorrect device name. Try:


    (assuming that your FAT partition is the first or only logical drive in your extended partition. If not it will be /dev/ad5s6, etc.) There is a slight complication here in that what Windows calls a "partition" is what BSD calls a "slice".

    This link explains it more clearly.
  2. No good answers here; admin should feel free to close.
  3. I'm curious to know why the mount failed when you used the correct device name. I wonder if you could post the error message that you get when you try to mount /dev/ad5s5.
  4. There was no /dev entry for ad5s5.
  5. Strange. Read the FreeBSD documentation and you'll see that extended partitions are numbered s5, s6, etc. Mind, the fdisk that you reported is odd as the disk is just /dev/ad5.

    The first physical partition (slice in BSD speak) is /dev/ad5s1; the partitions within this are /dev/ad5s1a, etc. And the first extended partition is (or should be) /dev/ad5s5.
  6. Yeah, thanks -- I've read the FreeBSD documentation; in fact, I read it before asking this question. I don't know why it wasn't in /dev, but it wasn't. I tried mounting every single ad5 entry in /dev; none worked.

    The ultimate resolution was to go back into Windows and make that a primary partition versus a logical partition. That did the job -- shame FreeBSD couldn't, though. It's behavior is entirely unexplained at this point.
Ask a new question

Read More

Partition FAT32