1

I allowed 15Go for my root partition when I installed Ubuntu in dual boot with Windows, but it appears that it was not enough as I don't have space anymore to install new packages.

So I shrinked 35Go of my Windows partition in order to extend my root partition with it, but that new unallocated free space is (two "steps") on the left of my root partition :

GParted partition screenshot

My question is how to extend the ext4 / partition (dev/sda7) with the 34.18GiB unallocated space (a part or the whole of it) ? Is it possible, AND IS IT RISKY (boot problems, etc) to do it by moving the ext4 / partition twice towards the left and then extending it using GParted in Live mode ?

Same question for the /home (dev/sda9) partition.

1

Yes ... you are having the right idea. Boot from GParted Live media.
You as well can do it from Ubuntu install media (GParted included).
Important : Unmount all partitions (in case there are any mounted).

First move the sda6 partition to the left ... then move the sda7 partition to the left.
Now extend the sda7 ext4 partition - it is not necessary to move the sda9 partition.

After having completed these operations - reinstall the boot loader.
Boot from Ubuntu installation media - open a terminal and execute:

    sudo mount /dev/sda7 /mnt
    sudo mount /dev/sda1 /mnt/boot/efi
    for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
    sudo chroot /mnt
    grub-install /dev/sda
    update-grub  

After this execute :

sudo blkid  

Open another terminal and execute :

sudo gedit /mnt/etc/fstab

Replace the UUID entries with those of the output given from the blkid command.

Boot into BIOS and select Ubuntu in UEFI settings to be the default system to boot.

Note:

sda = disk | sda1 = efi partition | sda7 = system partition (taken from screenshot)

  • IMHO, when a partition is moved, its UUID changes, and GRUB won't be able to find it. The OP will need to edit /etc/fstab to fix the UUIDs, and also reinstall GRUB. – mikewhatever Nov 27 '15 at 13:57
  • @mikewhatever : Good contribution ... thank you ... I updated the answer with instructions ! :) – cl-netbox Nov 27 '15 at 14:28
  • thanks for the fast answer. I will create a Live Ubuntu media tonight and try that. I have read in other discussions that one should "swap off" the linux swap partition during the process, is that necessary in my case ? And do you think that moving the sda6 partition (which is Windows', recovery partition I think) might make it unusable after ? – pikron Nov 28 '15 at 8:06
  • @pikron : You don't touch the swap partition - so if unmount (swapoff) is not possible, this should be no problem ... and moving the sda6 partition should not make it unusable. :) – cl-netbox Nov 28 '15 at 8:59
  • I have been trying unsuccessfully to boot on an Ubuntu Live USB (made by LinuxLive Creator), changing the BIOS boot priority #1 to my USB, until I tried by booting in Legacy mode, which worked. But I remember having many problems before with the Legacy mode and dual boot installation, so I wonder : is it safe to make the manipulations you gave me in Legacy mode or must I do them in UEFI mode ? If so, do you think that it is my USB key which is not suitable for booting in UEFI (then, how to recognize a "UEFI-bootable" USB key ?) or is it another problem ? – pikron Nov 30 '15 at 15:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.