REFIT boot problem, GRUB not detected

Asked by Shanker Keshavdas on 2012-05-04

Hi all,

I have a Macbook pro with partitions of EFI, OSX, Linux Swap and Ubuntu 10.04. Lately, I have noticed that reboots were not working. To solve this I would reboot, use the Super GRUB2 disk to locate GRUB and use boot repair to reinstall grub. (Back then, boot repair gave me an option of installing on MBR or on partition 4/ubuntu. MBR would work, and partition 4 would not). A reboot then would typically work.

However now super GRUB2 is not able to locate GRUB2 installation. An option "locate GRUB2 installation even if MBR is overwritten" usually worked but now is unable to locate a GRUB2 installation. Another option "Find grub2 configuration file" does find the grub.cfg file, and i get the grub2 bootloader screen, but loading ubuntu does not work. A third option "Detect OSs" actually does work, but takes me to a one-time use low-graphics version of ubuntu. I then loaded this low-graphics version of ubuntu and ran boot-repair. This was the log that was generated: http://paste.ubuntu.com/966475/ .

As you may notice, Grub2 is installed both on the MBR and partition 4. This was the same as before, when reboots would work. What has changed, if i remember correctly is that core.img was found in partition 4, and now it isn't.

If I am not wrong, the GPT and MBR tables may also be out of sync. The start sector of the first partition seems to be 40 in one and 1 in the other. Maybe I am wrong about this, as I am quite the noob to boot loaders.

Thanks in advance to anyone with good answers!

Cheers
Shanker

Question information

Language:
English Edit question
Status:
Answered
For:
Boot-Repair Edit question
Assignee:
No assignee Edit question
Last query:
2012-05-11
Last reply:
2012-05-11
YannUbuntu (yannubuntu) said : #1

Hello Shanker,

If i were you, i would create a BIOS_boot partition (>1Mo, unformatted filesystem, bios_grub flag), then click "Recommended repair". (and indicate the new URL that will appear please)
However, if your boot was previously ok without any BIOS_boot partition, and because efi is not mentionned in your fstab, i guess there was a trick with Refit chainloading GRUB, but i don't know Refit enough to say.

Hello YannUbuntu,

Does it make a difference where the BIOS_boot partition is created? I am tempted to create it at the end of the disk (after the ubuntu partition). The reason is that I would want all the bootloaders (Mac bootloader, EFI, Ubuntu) to know where the existing OS's are. Does that sound like a good idea to you?

Thanks,
btw. Congratulations on an excellently written and very useful program!

YannUbuntu (yannubuntu) said : #3

Thanks.
The BIOS_boot partition does not need to be at the very beginning of the disk, so it's worth have a try at the end.
If not good, then try to reduce your SWAP in order to create a BIOS_boot partition before the Ubuntu partition.

Hi YannUbuntu,

I made a bios partition at the end of the disk and then reran boot repair. The good news is that using the super GRUB2 disk, now I can easily load ubuntu (previously I could only load it in low-graphics single session mode). However, using normal boot (selection from REFIT screen), upon choosing ubuntu I get the error "No bootable device -- insert boot disk and press any key". The output from boot repair is here: http://paste.ubuntu.com/981223/.

And although you notice that grub2 is installed in the mbr, It is also installed in the ubuntu partition. Isn't boot repair supposed to purge all previous installations of grub and then install it on the mbr?

Is there anything else wrong?

Cheers
Shanker

YannUbuntu (yannubuntu) said : #5

i summarize (for me , and for anybody reading this who may have better idea than me):
- GPT disk
- in your 1st post:"(Back then, boot repair gave me an option of installing on MBR or on partition 4/ubuntu. MBR would work, and partition 4 would not)" : Refit was chainloading to MBR, so no EFI was used (no efi in fstab, but a EFI partition maybe for MacOS), nor BIOS_boot partition.
- Problem appeared: no more core.img in Ubuntu's partition. Maybe due to a GRUB2 update (10.04.1 -> 10.04.4 ?). Reinstalling GRUB after creating BIOS_boot partition seemed ok (MBR was updated adn core.img was created in the BIOS_boot part), but Refit wasn't able to chainload.

Here is what i would try if i were you (but you may want to wait for other people advice):
1) backup data and content of the EFI partition (sda1)
2) use the "Restore MBR" option of Boot-Repair, then check Refit's message (=reboot and see if you still have the "No bootable device -- insert boot disk and press any key" message or not). This may give us a clue.
3) purge GRUB, then reinstall an older version of GRUB (eg http://packages.ubuntu.com/hardy/grub-pc ) in the MBR and in the bootsector of Ubuntu partition. Then check Refit's message.
4) purge GRUB, then reinstall a recent version of GRUB (via the option in Boot-Repair)in the MBR and in the bootsector of Ubuntu partition. Then check Refit's message.
5) Setup your BIOS to boot on your live-CD in EFI mode (if possible), then install grub-efi instead of grub-pc. Reboot. If still not good, you may need to make your BIOS boot on the /sda1/EFI/.../grub64*.efi file
6) Via gParted reduce 10.04 partition (leave 20Go free space). Burn a 12.04 live-CD, and install 12.04 in this free space.

Please indicate what you observe, indicate the URL that appears after each Boot-Repair use, and create a BootInfo URL before&after each of these 6 operations.

Can you help with this problem?

Provide an answer of your own, or ask Shanker Keshavdas for more information if necessary.

To post a message you must log in.