手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

How to Install Grub2 From Live CD?

[日期:2011-06-20] 来源:camelorange.com  作者:camelorange [字体: ]

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.

linux
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款