LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to move Grub2 from mbr to root partition (https://www.linuxquestions.org/questions/linux-software-2/how-to-move-grub2-from-mbr-to-root-partition-869055/)

BillD 03-16-2011 06:52 PM

How to move Grub2 from mbr to root partition
 
In Mint 10, how can I move Grub2 from the mbr to the root partition of Mint?

Thank you,

Bill

pljvaldez 03-16-2011 06:54 PM

You can't actually "move" it. But you can install it to the root partition and then reinstall something else over the MBR. To move it to the root partition, use grub-install /dev/sdXY where /dev/sdXY is your root partition.

Then install whatever else you want and let it overwrite the MBR.

BillD 03-16-2011 09:34 PM

Well, when I tried that previously, it would not do it without using --force after warning me about blockfiles and to use --force, so I ended up with:

sudo grub-install --force /dev/sda6 (sda6 being my root partition). When I saw nothing happen when I rebooted, I added update-grub. What you are saying is that if I eliminate the current mbr and add a 3rd party bootloader, it should now boot Mint in the root partition?

Does it matter where --force is placed; i.e., before or after grub-install?

Should I have run update-grub as a second command in the terminal sequence before rebooting or did that screw it up?

Is there any way I can check to see if it really is in the root partition before altering the mbr? I can see nothing in the /boot/grub/grub.cfg that indicates where it is; i.e., it looks the same on a computer I did the above to and one that has it only in the mbr (that is it was installed in the mbr and is being used as the only bootloader).

Thanks,

Bill

Larry Webb 03-17-2011 06:07 AM

Quote:

Originally Posted by BillD (Post 4293270)
Well, when I tried that previously, it would not do it without using --force after warning me about blockfiles and to use --force, so I ended up with:

sudo grub-install --force /dev/sda6 (sda6 being my root partition). When I saw nothing happen when I rebooted, I added update-grub. What you are saying is that if I eliminate the current mbr and add a 3rd party bootloader, it should now boot Mint in the root partition?

Does it matter where --force is placed; i.e., before or after grub-install?

Should I have run update-grub as a second command in the terminal sequence before rebooting or did that screw it up?

Is there any way I can check to see if it really is in the root partition before altering the mbr? I can see nothing in the /boot/grub/grub.cfg that indicates where it is; i.e., it looks the same on a computer I did the above to and one that has it only in the mbr (that is it was installed in the mbr and is being used as the only bootloader).

Thanks,

Bill

I presume you did the force command from a live cd, if not use that and your command should work.

To check it on boot you can hit the 'e' key on boot and enter the command

menuentry "Linux @ sda6" {
set root=(hd0,6)
chainloader +1
}

That should boot your distro on sda6.


All times are GMT -5. The time now is 08:22 PM.