This is the procedure for mounting a FAT32 formatted SD memory card on FreeBSD. FAT32, or 32 bit FAT, is often used by digital cameras, camcorders, action cameras and video surveillance cameras. Examples are Canon EOS digital cameras and GoPro action cameras.
Attach the SD memory card and determine the FreeBSD device.
Insert the SD memory card into your card reader. If you use an external USB card reader, then you also also need to attach the USB cable to your computer. FreeBSD will recognize the new device or devices.
In the example below, the SD memory card from a Canon EOS digital camera is inserted into the built-in card reader on a Lenovo ThinkPad laptop computer. The device is assigned to /dev/mmcsd0.
# dmesg mmc0: <MMC/SD bus> on rtsx0 mmcsd0: 31GB <SDHC SD32G 6.1 SN 4088090B MFG 08/2021 by 159 TI> at mmc0 50.0MHz/4bit/2048-block
Determine the file system with the FreeBSD disk partition control utility.
You can gather information about the file system with the FreeBSD disk partition control utility gpart. In this example, the file system is detected as FAT32.
# gpart show mmcsd0 => 63 60637121 mmcsd0 MBR (29G) 63 8129 - free - (4.0M) 8192 60628992 1 fat32lba [active] (29G)
You can gather even more information about the file system with the general FreeBSD command file.
# file -s /dev/mmcsd0s1 /dev/mmcsd0s1: DOS/MBR boot sector, code offset 0x58+2, OEM-ID "CanonEOS", sectors/cluster 64, reserved sectors 1584, Media descriptor 0xf8, sectors/track 63, heads 128, hidden sectors 8192, sectors 60628992 (volumes > 32 MB), FAT (32 bit), sectors/FAT 7400, serial number 0x0, label: "EOS_DIGITAL"
Mount the FAT32 formatted file system on FreeBSD.
If you have determined, that your SD memory card is FAT32, which is also known as MSDOS, and, that it has been assigned to a device, then you can mount the file system on FreeBSD. If your SD memory card is from a camera, it is recommended, that it is mounted as read-only.
# mount -t msdos -o ro /dev/mmcsd0s1 /mnt
You can now access the recorded video clips and pictures, that are stored on the SD memory card, like you would do with any other data on your native file system.
Unmount the FAT32 formatted file system on FreeBSD.
When you are done with accessing the mounted FAT32 file system, then you should unmount it before you detach the SD memory card from your computer or shut down your computer.
# umount /mnt
More about SD memory cards on FreeBSD.
How to mount exFAT formatted SD memory card on FreeBSD by myself. File Allocation Table on WikiPedia.
This page was last updated 2022-01-15.