9

Partition layout

I have deleted my old Linux Mint partition I had installed beside my new current Rafaela one. Thus, I have free space I want to add to my home partition.
Above you can see the partition layout:
sda4 is the system partition with /boot
sda5 is the home partition

I want to extend home with the unallocated space, but unfortunately the system partition is inbetween and I would need to move it to the beginning of the unallocated space.
Since I got a warning message that the system might not boot anymore, if I move /boot, I would like to know how I can do it without breaking the system. It makes sense that the system cannot boot, if the bootloader cannot find the kernel anymore, so I guess after changing the partition layout I need to chroot on / and regenerate grub.

Does anybody know how I can add the unallocated space to home safely?

4

The boot sector needs to find the boot partition, after that the boot loader goes off the partitions, it doesn't care were they're located at on the drive.
I'm assuming you're using gparted live by the screen shot. After resizing you'll need to from the shell:

  1. Mount your relocated root partition containing the boot directory
  2. if /boot is a separate partition mount it in the root partition mount
  3. Mount the /dev to the dev directory in your root mount using the --bind option
  4. Chroot into the root mount
  5. Run grub-install or liloconfig to reinstall the boot sector
  • Today I moved and resized the partitions and everything worked without problems. I even didn't need to chroot onto the root partition. I guess it's because /boot/efi is a separate partition. However, I mark this as solution, because I think that this might be the answer, if you get problems. By the way, remember to use a 64bit live medium for 64bit. Otherwise you cannot chroot on the disk. – Thorben Sep 18 '15 at 21:16
  • I didn't think of 64/32 bit difference, but that's correct. in order to run 64 bit binaries on the OS you're chrooting into you need to be running a 64 bit OS. – MVanOrder Sep 18 '15 at 21:19
0

I messed up my partition (Ubuntu 19.04).

Luckily it was easy to make it work, I just had to perform a update-grub from a ubuntu live USB (don't worry it's easy).

Error message I had was: error symbol grub_efi_allocate_fixed not found

Procedure:

  1. Create a Ubuntu Live USB and boot on it
  2. Find your OS partition location (with gparted, eg: /dev/sda1)
  3. Execute these commands (replace /dev/sda1 with your partition)
sudo mount /dev/sda1 /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo chroot /mnt
sudo update-grub

Reboot and maybe it will work :)

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.