|
发表于 2014-8-29 16:24:11
|
显示全部楼层
分区用fdisk划分
fdisk /dev/nand
合并分区的话
合并nanda的b,c分区
查看一下 nandflash:
# ls /dev/nand* -l
brw-rw---- 1 root disk 93, 0 Jan 1 2010 /dev/nand
brw-rw---- 1 root disk 93, 1 Jan 1 2010 /dev/nanda
brw-rw---- 1 root disk 93, 2 Jan 1 2010 /dev/nandb
brw-rw---- 1 root disk 93, 3 Jan 1 2010 /dev/nandc
nandc 有 5G 左右的空间,把它合并到 nandb :
# nand-part
(主要部分)
partition 1: class = DISK, name = bootloader, partition start = 32768, partition size = 131072 user_type=0
partition 2: class = DISK, name = rootfs, partition start = 163840, partition size = 4194304 user_type=0
partition 3: class = DISK, name = UDISK, partition start = 4358144, partition size = 10584064 user_type=0
我们可以看到各个分区的大小,这样我们就可以重新规划一下:
# nand-part -f a20 /dev/nand 32768 'bootloader 131072' 'rootfs 14778368'
此命令执行后输出:
ready to write new partition tables:
mbr: version 0x00000200, magic softw411
2 partitions
partition 1: class = DISK, name = bootloader, partition start = 32768, partition size = 131072 user_type=0
partition 2: class = DISK, name = rootfs, partition start = 163840, partition size = 14778368 user_type=0
重启系统,扩展分区
# resize2fs /dev/nandb
然后查看磁盘空间情况
fdisk -l|grep nand
Disk /dev/nand doesn't contain a valid partition table
Disk /dev/nandb doesn't contain a valid partition table
Disk /dev/nand: 7700 MB, 7700742144 bytes
Disk /dev/nanda: 67 MB, 67108864 bytes
Disk /dev/nandb: 7616 MB, 7616856064 bytes
|
|