on-the-fly nand repartitioning and max size of rootfs


# nand-part
check partition table copy 0: mbr: version 0x00000200, magic softw411
magic softw411 is not softw311
check partition table copy 1: mbr: version 0x00000000, magic
magic          is not softw311
check partition table copy 2: mbr: version 0x00000000, magic
magic          is not softw311
check partition table copy 3: mbr: version 0x00000000, magic
magic          is not softw311
all partition tables are bad!
check partition table copy 0: mbr: version 0x00000200, magic softw411
OK
check partition table copy 1: mbr: version 0x00000200, magic softw411
BAD!
check partition table copy 2: mbr: version 0x00000200, magic softw411
BAD!
check partition table copy 3: mbr: version 0x00000200, magic softw411
BAD!
mbr: version 0x00000200, magic softw411
3 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 =  4194304 user_type=0
partition  3: class =         DISK, name =        UDISK, partition start =  4358144, partition size = 10584064 user_type=0
check partition table copy 0: mbr: version 0x00000200, magic softw411
OK
check partition table copy 1: mbr: version 0x00000200, magic softw411
BAD!
check partition table copy 2: mbr: version 0x00000200, magic softw411
BAD!
check partition table copy 3: mbr: version 0x00000200, magic softw411
BAD!
mbr: version 0x00000200, magic softw411
3 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 =  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'
check partition table copy 0: mbr: version 0x00000200, magic softw411
OK
check partition table copy 1: mbr: version 0x00000200, magic softw411
BAD!
check partition table copy 2: mbr: version 0x00000200, magic softw411
BAD!
check partition table copy 3: mbr: version 0x00000200, magic softw411
BAD!
mbr: version 0x00000200, magic softw411
3 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 =  4194304 user_type=0
partition  3: class =         DISK, name =        UDISK, partition start =  4358144, partition size = 10584064 user_type=0
check partition table copy 0: mbr: version 0x00000200, magic softw411
check partition table copy 1: mbr: version 0x00000200, magic softw411
check partition table copy 2: mbr: version 0x00000200, magic softw411
check partition table copy 3: mbr: version 0x00000200, magic softw411

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

write new partition tables? (Y/N)
Y
Failed rereading partition table: Device or resource busy

verifying new partition tables:
check partition table copy 0: mbr: version 0x00000200, magic softw411
OK
check partition table copy 1: mbr: version 0x00000200, magic softw411
OK
check partition table copy 2: mbr: version 0x00000200, magic softw411
OK
check partition table copy 3: mbr: version 0x00000200, magic softw411
OK
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
rereading partition table... returned -1
root@truckb:~#

 


resize2fs /dev/nandb
resize2fs 1.42.8 (20-Jun-2013)
Filesystem at /dev/nandb is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 1
The filesystem on /dev/nandb is now 1859584 blocks long.

~# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       7.0G  915M  5.9G  14% /
devtmpfs        889M  4.0K  889M   1% /dev
none            4.0K     0  4.0K   0% /sys/fs/cgroup
tmpfs            20M     0   20M   0% /tmp
none            197M  200K  197M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            985M     0  985M   0% /run/shm
none            100M     0  100M   0% /run/user

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Protected with IP Blacklist CloudIP Blacklist Cloud