Linux基础知识辅导:A20adbshell命令实现硬盘分区3
时间:2013-10-21
来源:Linux认证考试网 浏览次数:217
【华夏培训网:中国教育培训第一门户】
12'选择83, Hex code (type L to list codes): 83 83 14在看一下p Command (m for help): p p Disk /dev/b
12'选择83,
Hex code (type L to list codes): 83
83
14’在看一下p
Command (m for help): p
p
Disk /dev/block/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/block/sda1 1 60668 487315678+ 83 Linux
确实出来啦!
15‘创建w
Command (m for help): w
w
The partition table has been altered!
Calling ioctl() to re-read partition table
16’对分区进行格式化,以及加载;
输入busybox mkfs.ext2 /dev/block/sda
root@android :/ # busybox mkfs.ext2 /dev/block/sda
busybox mkfs.ext2 /dev/block/sda
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
30531584 inodes, 122096646 blocks
6104832 blocks (5%) reserved for the super user
First data block=0
Maximum filesystem blocks=125829120
3727 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 102400000
...........
(需要注意如果之前mount过,一定要Umount掉 --busybox unmount /dev/block/sda否则会出错
busybox mkfs.ext2 /dev/block/sda
mkfs.ext2: can't format mounted filesystem)
17‘挂载mount -t ext2 /dev/block/sda /mnt/sata
OK ,buysybox df -h一下 :
root@android :/ # busybox df -h
busybox df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 153.4M 32.0K 153.4M 0% /dev
tmpfs 153.4M 0 153.4M 0% /mnt/asec
tmpfs 153.4M 0 153.4M 0% /mnt/obb
/dev/block/system 504.4M 257.9M 246.5M 51% /system
/dev/block/data 504.4M 57.7M 446.7M 11% /data
/dev/block/cache 252.1M 4.3M 247.8M 2% /cache
/dev/block/vold/93:72
2.1G 48.0K 2.1G 0% /mnt/sdcard
/dev/block/vold/93:72
2.1G 48.0K 2.1G 0% /mnt/secure/asec
/dev/block/sda 458.5G 62.5M 435.2G 0% /mnt/sata
出来啦,激动吧!
Linux认证