1

I already have Linux installed. GRUB2 is installed to the MBR of /dev/sda. I want to install a second distribution, but don't want to overwrite the previous GRUB2 instance. What place should I choose for instaling GRUB option, sda5 (new Linux partition)?

Later, I want to boot to first Linux installation and update GRUB. Is this scenario possible?

Unfortunately, I have to choose to install boot loader. There is no 'do not install boot loader' option in KDE Neon

enter image description here

1

It should ask if you want to install GRUB... that would be terrible if not. Every distro I have used either asks(debian,ubuntu,suse,manjaro) or has a way to disable it(centos I think), or requires you to do it manually (arch).

But if you can't prevent it, you can just fix it later. Bootloaders are easy to change later on Linux systems. Optionally back it up. Then finish the install, and boot up on live or rescue media, and then mount the rootfs and /boot of the one managing grub, and also proc,sys,dev inside the rootfs, and then chroot into the rootfs. Then reinstall grub.

For example set up and enter the chroot with:

sudo -i
mkdir /mnt/root
mount /dev/sda2 /mnt/root  # assuming this is rootfs
mount /dev/sda1 /mnt/root/boot  # assuming this is /boot
for d in dev proc sys; do mount -o bind /$d /mnt/root/$d; done
chroot /mnt/root /bin/bash

Then inside the other rootfs, install grub or do other steps:

grub-install /dev/sda

#optional... especially important if you have modified fstab
# choose one of these depending on distro
mkinitcpio # arch,manjaro
mkinitrd # suse,rh
update-initramfs -u #ubuntu,debian,mint probably

#optional... not required just for grub-install. Required if you have added new kernels or modified /etc/grub.d/ files.
# maybe this will run os-prober for you, saving the step of getting the 2nd OS in the grub menu
update-grub
  • Thank you for your answer. I did what I firts thought I should do: installed grub to new Linux partition (sda5) and then booted in old Linux installation and run the command sudo update-grub2. Everything is fine now and just as I wanted – Hrvoje T Jul 15 '16 at 9:23
  • oh I see, so your wording wasn't the best before... in that case you could have installed it to the new rootfs, and then it wouldn't boot, but you can then chainload it from the other. And if it still doesn't work now, do my chroot solution with the new rootfs instead, and grub-update /dev/... on the new rootfs. – Peter Jul 15 '16 at 9:27

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.