Orange Pi Manual
Copy right by Shenzhen Xunlong Software Co., Ltd
www.orangepi.org
www.xunlong.tv
32
same as you deleted, and enter the number as you desire.
v Enter w to save the partition data.
vi Use the following command to check the file system(make sure it is
a right file system)
e2fsck -f /dev/sdb2
vii Adjust the partition size
resize2fs /dev/sdb2
viii It could mount a disk partition, you could check whether it has
changed.
b. Shrink file system
i Boot to Linux, umount /dev/sdb1 and /dev/sdb2, if it prompts disk
busy, then use fuser to clean the using disk(we will recommend using
another Linux booting disk to lead the system).
ii Use the following command to check the file system(make sure it is
a right file system)
e2fsck -f /dev/sdb2
iii Modify the size of file system(Use resize2fs)
resize2fs /dev/sdb2 900M
The "s"after the number represents specifying the size of file system via
the sectors(every sector calculated by 512 bite). You could also specify it
into K(KB), M(MB), G(GB), etc.
iv Use fdisk /dev/sdb to adjust the partition size, after into it, enter p,
and keep in mind about the initial position of needed extending size partition.
You need to first delete the partition then build a new one because the fdisk
could not modify the size dynamic(you need to calculate the size, it have to
enough to contain the file system adjusted in last step).
v Enter d to delete the partition need to change the size(my file system
is /dev/sdb2, which is the 2 partition ).
vi Enter n to build a new partition, make sure the initial position is the
same as you deleted, and enter the number as you desire. Besides, if it is
boot-able partition you want to change, note that need to keep the bootable
mark in case cannot boot.
The above illustration is using fdisk and resize2fs to modify partition and
file system, you could also use gparted. Gparted has graphical interface and
it could help you to re-size file system at the same time of re-sizing partition.
Goarted is much easier to use and reduce the change to make mistake. For
now our official Lubuntu and Raspbian could not use it.
8) How to use gc2035 on Linux