Sunteți pe pagina 1din 2

As shown in the previous section, my fake card can only hold 1GB.

So, using fdisk I have removed the old partition and created a new one with only 1GB. My card was recognized at /dev/sdh, change this parameter according to your case. My fdisk session was as follows:
# fdisk -l /dev/sdh Disk /dev/sdh: 32.5 GB, 32505331712 bytes 1 heads, 32 sectors/track, 1983968 cylinders Units = cylinders of 32 * 512 = 16384 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 /dev/sdh1 * 5 1983968 31743423+ Partition 1 does not end on cylinder boundary. # fdisk /dev/sdh 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): 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 (2-1983968, default 2): Using default value 2 Last cylinder, +cylinders or +size{K,M,G} (2-1983968, default 1983968): +1G Command (m for help): t Selected partition 1 Hex code (type L to list codes): c Changed system type of partition 1 to c (W95 FAT32 (LBA)) Command (m for help): a Partition number (1-4): 1 Command (m for help): p Disk /dev/sdh: 32.5 GB, 32505331712 bytes 1 heads, 32 sectors/track, 1983968 cylinders Units = cylinders of 32 * 512 = 16384 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Id c System W95 FAT32 (LBA)

Device Boot /dev/sdh1 *

Start 2

End 65538

Blocks 1048592

Id c

System W95 FAT32 (LBA)

Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. WARNING: If you have created or modified any DOS 6.x partitions, please see the fdisk manual page for additional information. Syncing disks.

Once the new partition is created, just format it:


# mkfs.vfat /dev/sdh1 mkfs.vfat 3.0.7 (24 Dec 2009)

At this point your card should be working just fine, but before using it, test it again with F3! The test of my card went as follows:
$ ./f3write /media/45B9-B05C/ Free space: 1022.00 MB Creating file 1.fff ... OK! Free space: 0.00 Byte Average Writing speed: 1.88 MB/s $ ./f3read /media/45B9-B05C/ SECTORS ok/corrupted/changed/overwritten Validating file 1.fff ... 2093048/ 0/ 0/ 0 Data OK: 1022.00 MB (2093048 sectors) Data LOST: 0.00 Byte (0 sectors) Corrupted: 0.00 Byte (0 sectors) Slightly changed: 0.00 Byte (0 sectors) Overwritten: 0.00 Byte (0 sectors) Average Reading speed: 8.45 MB/s

S-ar putea să vă placă și