CMX Compact Flash Card #27 4GB Kingston purchased July 2014 Back label: CF/4GB 3.3V/5V 9904524-001.A0L1F 6630222-0037215 Assy in Taiwan Copyright 2014 Kingston Technology Corp. Partition #1 created below: 256MB volume label CMX_CF27 Volume ID is 79ebe94b ---------------------------------------------------------------------------------- 07-Oct-2014 ----------- Connect to linux VM (Adapter shows up as "Realtek USB2.0-CRW) Out of the box: [root@toad-sl61 philippe]# dosfsck -v /dev/sdb1 fsck.fat 3.0.26 (2014-03-07) fsck.fat 3.0.26 (2014-03-07) Checking we can access the last sector of the filesystem Boot sector contents: System ID "MSDOS5.0" Media byte 0xf8 (hard disk) 512 bytes per logical sector 32768 bytes per cluster 6288 reserved sectors First FAT starts at byte 3219456 (sector 6288) 2 FATs, 32 bit entries 487424 bytes per FAT (= 952 sectors) Root directory start at cluster 2 (arbitrary size) Data area starts at byte 4194304 (sector 8192) 121728 data clusters (3988783104 bytes) 63 sectors/track, 16 heads 8128 hidden sectors 7798832 sectors total Checking for unused clusters. Checking free cluster summary. Free cluster summary uninitialized (should be 121727) /dev/sdb1: 1 files, 1/121728 clusters Re-Partition to make one 256MB partition. [root@toad-sl61 philippe]# fdisk /dev/sdb WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u'). Command (m for help): p Disk /dev/sdb: 3997 MB, 3997163520 bytes 128 heads, 63 sectors/track, 968 cylinders Units = cylinders of 8064 * 512 = 4128768 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sdb1 * 2 969 3899416 c W95 FAT32 (LBA) Partition 1 has different physical/logical beginnings (non-Linux?): phys=(0, 128, 1) logical=(1, 1, 2) Partition 1 has different physical/logical endings: phys=(967, 127, 63) logical=(968, 15, 63) Command (m for help): d Selected partition 1 Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-968, default 1): 1 Last cylinder, +cylinders or +size{K,M,G} (1-968, default 968): +256M Command (m for help): t Selected partition 1 Hex code (type L to list codes): 6 Changed system type of partition 1 to 6 (FAT16) Command (m for help): p Disk /dev/sdb: 3997 MB, 3997163520 bytes 128 heads, 63 sectors/track, 968 cylinders Units = cylinders of 8064 * 512 = 4128768 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sdb1 1 66 266080+ 6 FAT16 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. WARNING: Re-reading the partition table failed with error 16: Device or resource busy. The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8) WARNING: If you have created or modified any DOS 6.x partitions, please see the fdisk manual page for additional information. Syncing disks. Disconnect then Reconnect CF card to VM Format [root@toad-sl61 philippe]# mkdosfs -f 2 -F 16 -R 1 -S 512 -s 16 -r 512 -v -n "CMX_CF27" /dev/sdb1 mkfs.fat 3.0.26 (2014-03-07) /dev/sdb1 has 128 heads and 63 sectors per track, hidden sectors 0x003f; logical sector size is 512, using 0xf8 media descriptor, with 532161 sectors; drive number 0x80; filesystem has 2 16-bit FATs and 16 sectors per cluster. FAT size is 144 sectors, and provides 33240 clusters. There is 1 reserved sector. Root directory contains 512 slots and uses 32 sectors. Volume ID is 79ebe94b, volume label CMX_CF27 . Check from linux [root@toad-sl61 philippe]# dosfsck -v /dev/sdb1 fsck.fat 3.0.26 (2014-03-07) fsck.fat 3.0.26 (2014-03-07) Checking we can access the last sector of the filesystem Boot sector contents: System ID "mkfs.fat" Media byte 0xf8 (hard disk) 512 bytes per logical sector 8192 bytes per cluster 1 reserved sector First FAT starts at byte 512 (sector 1) 2 FATs, 16 bit entries 73728 bytes per FAT (= 144 sectors) Root directory starts at byte 147968 (sector 289) 512 root directory entries Data area starts at byte 164352 (sector 321) 33240 data clusters (272302080 bytes) 63 sectors/track, 128 heads 63 hidden sectors 532161 sectors total Checking for unused clusters. /dev/sdb1: 1 files, 0/33240 clusters Disconnect from VM Check from Windows: N:\>chkdsk N: The type of the file system is FAT. The volume is in use by another process. Chkdsk might report errors when no corruption is present. Volume CMX_CF27 created 27-Aug-2014 3:24 AM Volume Serial Number is 79EB-E94B Windows is verifying files and folders... File and folder verification is complete. Windows has checked the file system and found no problems. 272,302,080 bytes total disk space. 272,302,080 bytes available on disk. 8,192 bytes in each allocation unit. 33,240 total allocation units on disk. 33,240 allocation units available on disk.