AM335X-PAC Series User Manual version 2.0.1 Page: 97
Copyright © 2019 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
6.1.3. Scanning and repairing a microSD Card
After the LinPAC AM335x PAC is booted, the microSD card will be named
‘
/dev/mmcblk0p1
’
. It is
recommended that the microSD card is unmounted first before attempting to perform a scan or
repair.
blockdev
: this command is used to call block device ioctls from the command line.
fsck.minix:
this command is used to perform a consistency check for the Linux MINIX
filesystem.
fsck.vfat
: this command is used to check and repair MS-DOS file systems.
mkfs:
this command is used to build a Linux file system on a device, usually a hard disk
partition.
Parameter
Description
Example
--report
print a report for device
blockdev --report /dev/mmcblk0p1
-v
--getra
--getbz
get readhead and blocksize
blockdev -v --getra
–
getbz
/dev/mmcblk0p1
Parameter
Description
Example
-r
performs interactive repairs
fsck.minix -r /dev/mmcblk0p1
-s
outputs super-block information
fsck.minix -s /dev/mmcblk0p1
Parameter
Description
Example
-a
automatically repair the file system
fsck.vfat -a /dev/mmcblk0p1
-l
list path names of files being processed
fsck.vfat -l /dev/mmcblk0p1
Parameter
Description
Example
-t
specifies the type of file system to be built
mkfs -t vfat /dev/mmcblk0p1
-c
check the device for bad blocks before
building the file system
mkfs -c vfat /dev/mmcblk0p1