PDA

View Full Version : How to install grub on partition instead of default MBR in Fedora



jonathonp
1st April 2017, 11:12 PM
1. Note: During the installation choose not to install grub.

On the 'INSTALLATION DESTINATION' page select "Full disk summary and boot loader" at the bottom of the page. Select the disk and click "Do not install boot loader" and click close.


2. When the Fedora installation has completed (Fedora 25 for example) do not reboot. Instead quit the installer by pressing:


CTRL+ALT+F2

This will bring you to a command prompt.

3. Locate the root partition or boot partition (if you created one) for the grub installation:

lsblk -f

or use


fdisk -l

4. Change root:

chroot /mnt/sysimage

5. Install grub:

grub2-install --force /dev/sdXY

sdXY

Where X indicates the drive number.
Where Y indicates the partition number.

Example: Disc A, Partition number 5 is written as follows /dev/sda5

Replace X and Y with the disc number and the partition number for the grub installation.

6. Update grub:

grub2-mkconfig -o /boot/grub2/grub.cfg

7. Exit chroot

exit

8. Reboot

reboot+

lsatenstein
2nd April 2017, 01:18 AM
One grub to manage 4 Linux partitions where each one could have a kernel update AND

one would want that fixed standard grub to be so for life. It should just chainload to the selected Linux where the target Linux's grub takes over at second level.

I am trying to avoid choosing one of the 4 Linux as prime, and the other as slaves. Update a slave kernel and I have to also update the prime Linux.

jonathonp
2nd April 2017, 02:10 AM
One grub to manage 4 Linux partitions where each one could have a kernel update AND

one would want that fixed standard grub to be so for life. It should just chainload to the selected Linux where the target Linux's grub takes over at second level.

I am trying to avoid choosing one of the 4 Linux as prime, and the other as slaves. Update a slave kernel and I have to also update the prime Linux.

I use Boot It Bare metal https://www.terabyteunlimited.com/downloads-bootit-bare-metal.htm to mange multiple Linux installations as well as windows. It does a good job. Note it needs to be installed on a primary partition.

Thanks for the comment.