3

I have a MacBook Pro set up to triple boot with rEFIt and GRUB. (I had to go through GRUB to get Windows 7 to boot, but that's tolerable.) I upgraded to Lion which added a new partition for the recovery feature. This also causes GRUB to boot to a rescue prompt. Running set shows:

prefix=(hd0,gpt5)/boot/grub
root=hd0,gpt5

If I run the following commands:

set prefix=(hd0,gpt6)/boot/grub
set root=(hd0,gpt6)
insmod normal
normal

the usual GRUB menu shows up and I can boot into whichever OS I want. I got into the Ubuntu partition and checked out the grub.cfg file and it was setting the root to gpt5. I ran the sudo update-grub command. This changed the value in the cfg file to gpt6. However GRUB still boots into the rescue prompt and set still shows the initial root and prefix values. How do I make this permanent?

3
  • I am facing the same problem? Anyone could solve it?
    – Sabya
    Oct 25, 2011 at 7:23
  • Have you tried Super Grub Disk with sudo update-grub ? Some people also advocate using rEFIt instead of grub.
    – harrymc
    Oct 27, 2011 at 7:47
  • As a sidenote. You're not supposed to edit grub.cfg by hand, it gets regenerated everytime you run update-grub. Can we also get the the layout of the disk (fdisk -l)?
    – Bobby
    Nov 1, 2011 at 13:07

2 Answers 2

5

Grub is probably dropping to the console because the partition layout has changed since grub was first installed. Now that you have updated grub.cfg, re-installing grub should fix it. Boot into your ubuntu system the same way you did in order to run update-grub. From there, do a grub-install:

grub-install /dev/sdX

(Replacing X with your device, in your case it looks like it is probably /dev/sda.)

4
  • Hey! I want to award the bounty to this answer. But it seems there was on expiry on awarding it too. How can I award the bouty to this answer?
    – Sabya
    Nov 4, 2011 at 7:31
  • I did that in a sort of round about way. I upgraded to 11.10 and all is well.
    – CheeZe5
    Nov 23, 2011 at 14:11
  • How do I know what is the device I should use (the X)?
    – a06e
    Apr 30, 2018 at 12:09
  • @becko, you can run $ lsblk to see your /dev/sdX (SSD should be something like /dev/nvme0n1). The grub-install command should point to the disk, not the partition! Jun 19, 2022 at 23:30
0

I have same issue. grub rescue fix the partition on sda1 instead of sda6. System booting with succeed. But if I reboot the system, the root=(hd0,msdos1) changed back to msdos6.

grub-install /dev/sd1 make system staying on boot menu forever.

Question, where grub exactly get the root setting?

1
  • If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context. - From Review Jul 2 at 3:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .