CMX Compact Flash Card #21 8GB Kingston purchased July 2014 Back label: CF/8GB 3.3V/5V 9904524-004.A0L1F 6611957-0218750 Assy in Taiwan Copyright 2014 Kingston Technology Corp. Partition #1 created below: 256MB volume label CMX_CF21 Volume ID is df2d783f ---------------------------------------------------------------------------------- 15-Aug-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 4382 reserved sectors First FAT starts at byte 2243584 (sector 4382) 2 FATs, 32 bit entries 975360 bytes per FAT (= 1905 sectors) Root directory start at cluster 2 (arbitrary size) Data area starts at byte 4194304 (sector 8192) 243712 data clusters (7985954816 bytes) 63 sectors/track, 16 heads 8128 hidden sectors 15605792 sectors total / Bad short file name (). 1) Drop file 2) Rename file 3) Auto-rename 4) Keep it ? 4 Checking for unused clusters. Checking free cluster summary. Free cluster summary uninitialized (should be 243711) /dev/sdb1: 0 files, 1/243712 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: 7994 MB, 7994327040 bytes 255 heads, 63 sectors/track, 971 cylinders Units = cylinders of 16065 * 512 = 8225280 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 972 7802896 c W95 FAT32 (LBA) Partition 1 has different physical/logical beginnings (non-Linux?): phys=(0, 128, 1) logical=(0, 129, 2) Partition 1 has different physical/logical endings: phys=(967, 254, 63) logical=(971, 234, 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-971, default 1): 1 Last cylinder, +cylinders or +size{K,M,G} (1-971, default 971): +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: 7994 MB, 7994327040 bytes 255 heads, 63 sectors/track, 971 cylinders Units = cylinders of 16065 * 512 = 8225280 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 34 273073+ 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_CF21" /dev/sdb1 mkfs.fat 3.0.26 (2014-03-07) /dev/sdb1 has 255 heads and 63 sectors per track, hidden sectors 0x003f; logical sector size is 512, using 0xf8 media descriptor, with 546147 sectors; drive number 0x80; filesystem has 2 16-bit FATs and 16 sectors per cluster. FAT size is 144 sectors, and provides 34114 clusters. There is 1 reserved sector. Root directory contains 512 slots and uses 32 sectors. Volume ID is df2d783f, volume label CMX_CF21 . 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) 34114 data clusters (279461888 bytes) 63 sectors/track, 255 heads 63 hidden sectors 546147 sectors total Checking for unused clusters. /dev/sdb1: 1 files, 0/34114 clusters Disconnect from VM Check from Windows: C:\Users\Philippe>chkdsk N: The type of the file system is FAT. Volume CMX_CF21 created 09-Aug-2014 12:36 PM Volume Serial Number is DF2D-783F Windows is verifying files and folders... File and folder verification is complete. Windows has checked the file system and found no problems. 279,461,888 bytes total disk space. 279,461,888 bytes available on disk. 8,192 bytes in each allocation unit. 34,114 total allocation units on disk. 34,114 allocation units available on disk.