Nux!


Home » Stella » Howtos, tips & tricks » Boot CentOS7 from grub legacy (Replace grub2 bootloader)
Boot CentOS7 from grub legacy [message #2008] Sun, 03 August 2014 08:54 Go to next message
ongoto is currently offline  ongoto
Messages: 173
Registered: October 2013
Location: California USA
Senior Member
This might not be wise in an enterprise environment because it is said to be 'unreliable'. But in a home environment, it should be fine.

When installing CentOS7 you don't have the option 'where to install the bootloader'. It installs to the MBR by default. I'll show the steps I took to add CentOS7 to the grub1 boot menu and replace grub2 in the MBR.

In CentOS7 run the command:
grub2-install /dev/sd?? # the partition you have CentOS7 installed on
At this point grub2 will be in the partition root AND the MBR.

Then reboot into the OS that has the /boot/grub/menu.lst you want to use. Edit the menu.lst file and add the CentOS7 entry:
Example:
...
title CentOS7 (sda12)
root (hd0,11)
chainloader +1 # doesn't work unless CentOS7 grub2 is installed to the partition root.
...
Save

Then run grub. Enter these commands:
> root (hd0,#) # = the partition containing your menu.lst minus 1 -- sda7 = (hd0,6)
> setup --stage2=/boot/grub/stage2 (hd0) # (hd0) = MBR
> quit

Reboot to test.




[Updated on: Sun, 03 August 2014 08:58]

Report message to a moderator

Re: Boot CentOS7 from grub legacy [message #2010 is a reply to message #2008] Sun, 03 August 2014 10:31 Go to previous message
nux is currently offline  nux
Messages: 1659
Registered: January 2012
Senior Member
Administrator

Thanks for the tip!
Previous Topic: Make Stella 6.3 MultiUser
Next Topic: Caja scripts el7
Goto Forum:
  


Current Time: Thu Sep 19 00:45:57 BST 2019

Total time taken to generate the page: 0.04301 seconds