Resize parttion ofMK802 Lubuntu 12.01 to 16 GB |
root@miniand:~# ls -l /sbin/fdisk /sbin/resize2fs
-rwxr-xr-x 1 root root 76796 Mar 30 2012 /sbin/fdisk
-rwxr-xr-x 1 root root 34708 Mar 31 2012 /sbin/resize2fs
2. check disk on diskutilty by select menu Preferment > Disk Utility
Disk Utility on MK802 Lubuntu 12.01 |
SDCard Partition size 4 GB (Before re-size) |
root@miniand:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 15087096 2184148 12136844 16% /
devtmpfs 416936 4 416932 1% /dev
none 83404 608 82796 1% /run
none 5120 0 5120 0% /run/lock
none 417016 0 417016 0% /run/shm
/dev/sda2 3628452 787404 2656728 23% /media/32aba80e-436f-4c90-8b7b-ebc9b911533e
/dev/mmcblk0p1 16334 3892 12442 24% /media/BE65-4DA6
/dev/sda1 16334 3862 12472 24% /media/0FCB-229F
root@miniand:~# umount /dev/sda1 /dev/sda2
root@miniand:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 15087096 2184152 12136840 16% /
devtmpfs 416936 4 416932 1% /dev
none 83404 608 82796 1% /run
none 5120 0 5120 0% /run/lock
none 417016 0 417016 0% /run/shm
/dev/mmcblk0p1 16334 3892 12442 24% /media/BE65-4DA6
5. fdisk to remove partition 4G and create new 16G partition
root@miniand:~# fdisk /dev/sda
Command (m for help): p
Disk /dev/sda: 16.0 GB, 16009658368 bytes
64 heads, 32 sectors/track, 15268 cylinders, total 31268864 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x8daf8ee2
Device Boot Start End Blocks Id System
/dev/sda1 2048 34815 16384 83 Linux
/dev/sda2 34816 7407615 3686400 83 Linux
Command (m for help): d
Partition number (1-4): 2
Command (m for help): p
Disk /dev/sda: 16.0 GB, 16009658368 bytes
64 heads, 32 sectors/track, 15268 cylinders, total 31268864 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x8daf8ee2
Device Boot Start End Blocks Id System
/dev/sda1 2048 34815 16384 83 Linux
Command (m for help): n
Partition type:
p primary (1 primary, 0 extended, 3 free)
e extended
Select (default p): p
Partition number (1-4, default 2): 2
First sector (34816-31268863, default 34816): <enter>
Using default value 34816
Last sector, +sectors or +size{K,M,G} (34816-31268863, default 31268863): <enter>
Using default value 31268863
Command (m for help): p
Disk /dev/sda: 16.0 GB, 16009658368 bytes
64 heads, 32 sectors/track, 15268 cylinders, total 31268864 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x8daf8ee2
Device Boot Start End Blocks Id System
/dev/sda1 2048 34815 16384 83 Linux
/dev/sda2 34816 31268863 15617024 83 Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
root@miniand:~# resize2fs /dev/sda2
resize2fs 1.42 (29-Nov-2011)
Resizing the filesystem on /dev/sda2 to 3904256 (4k) blocks.
The filesystem on /dev/sda2 is now 3904256 blocks long.
7. try test SDCard
root@miniand:~# fdisk -l /dev/sda
Disk /dev/sda: 16.0 GB, 16009658368 bytes
64 heads, 32 sectors/track, 15268 cylinders, total 31268864 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x8daf8ee2
Device Boot Start End Blocks Id System
/dev/sda1 2048 34815 16384 83 Linux
/dev/sda2 34816 31268863 15617024 83 Linux
0 comments:
Post a Comment