1

Please have a look at my dual ubuntu installations. The top one in the photo below is Ubuntu 16.04 and the other is Ubuntu 16.10.

enter image description here

I want to increase the size of root partition /dev/sda2 (of size 7.03 GB) of Ubuntu 16.04. There is unallocated space of 13.41 GB in the bottom part of the partitions as shown in the image. I've to provide space from here to the root partition /dev/sda2. But for that if I create a parition here in the unallocated space and move it to the root partition, then the other installation of Ubuntu (i.e. Ubuntu 16.10) won't boot.

Is there any way to achieve this without having the issue of booting and/or without affecting the boot partition ?

0

What exactly have you done to make it fail booting?

Which partition is the root partition of your second Ubuntu installation?

If you move the partition to unallocated space maybe you have to update-grub so it will search for the root partition and change the bootloader setting.

Why do you use two swap partitions?

  • To expand /dev/sda2, I 1st create a partition out of the unallocated space. Then I move this just below sda2. Then I delete it and expand sda2, this way my task would be accomplished. But in this process, the boot partition of the 2nd Ubuntu installation /dev/sda7 would be moved and hence this Ubuntu would fail to boot. Am I right ? Currently the grub is installed from this 2nd Ubuntu and I've currently logged in the 1st Ubuntu. So I will update grub in this logged-in Ubuntu (i.e. the 1st one) and this way the bootloader will be of this 1st Ubuntu & not the 2nd one. But 2nd Ubuntu won't boot. – Ravi Dec 9 '16 at 16:41
  • If I move /dev/sda2 to the unallocated space and update-grub, I can boot this Ubuntu installation but in this process, the /dev/sda7 which is boot partition of the 2nd Ubuntu installation will also be moved. How to update that change in the bootloader setting? /dev/sda8 is the root partition of 2nd installation. But as I have separate boot partition, so I think root partition won't create any issue in rebooting. – Ravi Dec 9 '16 at 16:50
  • The reason for 2 swap is: While installing dual ubuntu on my laptop I googled to find whether 2 swap partiotions are required or one will do. I found that having 2 swap has only demerit of consuming disk space but if I have 1 swap partition, then the issue may occur if I try to run another installation via virtual machine. I thank you for asking this question. Your view on my reply please! – Ravi Dec 9 '16 at 16:55
  • Also you can't move boot partition without unmounting. So if you're logged in the installation you can't unmount it. So you have to use, say gparted, & boot it via bootable pen drive. But now I don't know if there is a way to update boot loader settings! – Ravi Dec 10 '16 at 8:45
0

I don't know why you would use two swap partitions. The Swap-Partition is used when the RAM is fully utilized or when a program is explicitly programmed to use it (to use the virtual memory addresses that belong to Swap-File / Swap-Partition).

Virtual machines will most likely use Swap-Partitions from within the virtual hard disk, but you can also mount a real partition as swap I believe.

Your partition alignment is a bit awful, can you investigate which partition does which job so it'll be easier to understand.

You are using the MBR partition table and therefore an "extended volume" to manage more than 4 partitions. Extended volumes are just 1k (2 sectors) partitions used as a marker to express: Every partition behind this is extended plus it holds information about these partitions afaik. Other than that these are just like every other partition, extended is just a measure to allocate these partitions and break the MBRs 4 partition limit. Even bootloaders can be held whithin a extended partition whitout a problem.

As a start you could image the current state of your hard drive to an external drive.

With compression like this (from live media when it is unmounted): $> sudo dd if=/dev/sda | gzip > /mount/backupdrive/image

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.