感谢支持
我们一直在努力
RackNerd Banner 468x60 RackNerd Banner 468x60

How to Install Grub2 From Live CD?

So I’m trying to restore my triple boot Macbook Pro to a new hard drive, and when I restored Ubuntu partition with Clonezilla, I can’b boot it from rEFIt. At first I thought it’s because I hadn’t restored the MBR, while it turned out that I don’t really need MBR info ’cause I’d installed Grub2 to the PBR of my Ubuntu Partition. So I just reinstalled Grub2 from the live CD and now I can boot Ubuntu on my new HDD. Here is how to install grub2 from live CD:


Open up Terminal when the live CD is started.


Then type the following commands:


sudo mount /dev/sda4 /mnt
sudo grub-install –root-directory=/mnt /dev/sda4


/dev/sda4 is my Ubuntu partition. If you want to install Grub2 to MBR, you can just use /dev/sda instead of /dev/sdax.


If it won’t work, then try adding “–force” option in the “grub-install” command. See if you get a message that “Installation finished”. If it says so, then you should be good to go. Reboot you MBP, and choose Ubuntu icon, you should now see the grub menu.

赞(0)
转载请注明出处:服务器评测 » How to Install Grub2 From Live CD?
分享到: 更多 (0)