- 查看硬盘空间
$ fdisk -l
Disk /dev/mmcblk0: 29 GB, 31037849600 bytes, 60620800 sectors
947200 cylinders, 4 heads, 16 sectors/track
Units: sectors of 1 * 512 = 512 bytesDisk /dev/mmcblk0 doesn't contain a valid partition table
Disk /dev/mmcblk0p1: 1 MB, 1048576 bytes, 2048 sectors
32 cylinders, 4 heads, 16 sectors/track
Units: sectors of 1 * 512 = 512 bytesDisk /dev/mmcblk0p1 doesn't contain a valid partition table
- 解决办法
$ fdisk /dev/mmcblk0
m:菜单
Command (m for help): m
Command Action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)Command (m for help): n
Partition typep primary partition (1-4)e extended
p
Partition number (1-4): q
Partition number (1-4): 1
First sector (16-60620799, default 16):
Using default value 16
Last sector or +size{,K,M,G,T} (16-60620799, default 60620799):
Using default value 60620799Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table
fdisk: WARNING: rereading partition table failed, kernel still uses old table: Device or resource busy