- Create
/usr/share/initramfs-tools/hooks/parttools
as above - Run
update-initramfs -u
- Reboot
- Type
e
on the Grub2 boot menu entry - Add
break=mount
to thekernel
line - In initramfs, run this (assuming
/dev/sda1
is the to-be-resized disk):
e2fsck -f /dev/sda1
resize2fs /dev/sda1 20G
fdisk /dev/sda
# print
p
# delete part 1
d
1
# new primary part 1, start as suggested, end +20G
n
p
1
<return>
+20G
# make part 1 bootable
a
1
# new primary part 3, start as suggested, end as suggested
n
p
3
<enter>
<enter>
# write
w