WARNING: This can completely destroy your Chrome OS installation. Please take a backup.
Also note, after successful resize, brunch will rebuild the rootfs on first boot.
- Linux environment (installed / live USB)
- Some knowledge on using the
dd
command. Optional, but good to have. - The program GParted.
-
Install GParted. In Arch linux it can be installed by
sudo pacman -S gparted
in the terminal. Ubuntu live USB come preinstalled with Gparted. Check the instructions for your distro. -
Open Terminal. Navigate to the location of your brunch
chromeos.img
file. -
Here we will expand be 9 GB. Hence use the below command:
sudo dd if=/dev/zero bs=1k count=$((1024*1024*9)) status=progress >> chromeos.img
Change the value in the bracket in bold to your liking. Here it is 9 for 9 GB.
-
Wait for it to finish.
-
Next type the below command:
sudo losetup --partscan /dev/loop99 chromeos.img
This should mount all the partitions as loop devices.
Typelsblk
should show something like this:NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT loop99 7:99 0 29G 0 loop ├─loop99p1 259:0 0 10.8G 0 part ├─loop99p2 259:1 0 32M 0 part ├─loop99p3 259:2 0 4G 0 part ├─loop99p4 259:3 0 32M 0 part ├─loop99p5 259:4 0 4G 0 part ├─loop99p6 259:5 0 512B 0 part ├─loop99p7 259:6 0 1G 0 part ├─loop99p8 259:7 0 16M 0 part ├─loop99p9 259:8 0 512B 0 part ├─loop99p10 259:9 0 512B 0 part ├─loop99p11 259:10 0 8M 0 part └─loop99p12 259:11 0 32M 0 part
-
Next run GParted from the terminal on the loop device
/dev/loop99
.gparted /dev/loop99
-
You will get a warning as below:
Not all of the space available to /dev/loop99 appears to be used, you can fix the GPT to use all of the space (an extra 18874368 blocks) or continue with the current setting?
Click
Fix
. -
You should be able to see a large "unallocated" area at the end.
-
Right click on the "STATE" partition (it should be the last partition) -> Resize/Move -> Drag the end to fill the whole "unallocated" space -> Click "Resize/Move".
-
Hit
Apply
Button and wait for it to finish. Then close the program. -
Unmount the loop device by:
sudo losetup -d /dev/loop99
-
Finally Reboot and enjoy.