How to extend the root directory(/) in rpb


#1

I use this link(http://snapshots.linaro.org/reference-platform/embedded/morty/hikey960/latest/rpb/) to complete the system installation.But the root directory area only 3G, how can we expand it?Thank you!
root@hikey960:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 3.1G 1.5G 1.4G 52% /
devtmpfs 1.5G 0 1.5G 0% /dev
tmpfs 1.5G 0 1.5G 0% /dev/shm
tmpfs 1.5G 8.5M 1.5G 1% /run
tmpfs 1.5G 0 1.5G 0% /sys/fs/cgroup
tmpfs 1.5G 0 1.5G 0% /tmp
tmpfs 1.5G 116K 1.5G 1% /var/volatile
/dev/sdd13 9.8G 172M 9.1G 2% /home/why
tmpfs 297M 0 297M 0% /run/user/0


#2

If you are using the ptable.img from AOSP releasing, I think you could refer the script https://github.com/96boards-hikey/l-loader/blob/testing/hikey960_v1.2/generate_ptable.sh#L140 to change the ptable to enlarge the “system” partition.

Another choice is you can directly use “userdata” partition for rootfs?


#4

Here is the code I changed:

[10: system: 371M-5059M]

fakeroot $ {SGDISK} -n 10: 0: + 10240M -t 10: 8300 -u 10: c3e50923-fb85-4153-b925-759614d4dfcd -c 10: “system” $ {TEMP_FILE}

sdd10 expanded to 10G, but the root directory is only 3.1G, from the df-h command:
/ dev / root mount on the root directory(/) instead of / dev / sdd10, how to do? Thank you.


#5

I encountered this problem, no matter how much I expand the / dev / sdd10,
my root directory is only 3.1G, you can see from the following
information.
Any help would be very much appreciated.Thank you.
root@linaro-developer:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 3.1G 1.4G 1.8G 44% /

root@linaro-developer:~# mount -l
/dev/sdd10 on / type ext4 (rw,relatime,data=ordered) [rootfs]


#6

You have enlarged the partition but not the filesystem that resides on the partition. You can use resize2fs to enlarge the filesystem to match the new partition size.


#7

there are no /dev/root
root@linaro-developer:/# resize2fs -f /dev/root
resize2fs 1.42.12 (29-Aug-2014)
open: No such file or directory while opening /dev/root

I also have tried follows,but it can not expand the root directory
root@linaro-developer:/# resize2fs -f /dev/sdd10
resize2fs 1.42.12 (29-Aug-2014)
Filesystem at /dev/sdd10 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 1
Performing an on-line resize of /dev/sdd10 to 1200128 (4k) blocks.
resize2fs: Operation not permitted While trying to add group #25
root@linaro-developer:/# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 3.1G 2.0G 1.1G 65% /