Ask Your Question
0

fedora 17 grub rescue on boot but works via boot menu

asked 2012-09-10 17:01:59 -0600

cfr gravatar image

updated 2014-09-28 16:05:13 -0600

mether gravatar image

I am new to Fedora. I installed using the Fedora-17-x86_64-Live-KDE.iso. The HDD had been previously wiped by the IT department so there was no existing OS. I found an MBR partition map with two NFS (or NTFS?) partitions.

I partitioned the HDD manually using parted because I wanted to use GPT. I had a couple of goes at this because it took me a while to figure out what the installer wanted. Initially, I tried a set up designed for EFI booting but the installer wouldn't let me continue without a partition for BIOS boot. I assume by this it meant that it wanted the 1-2MB partition you need on a GPT disk to ensure that grub has sufficient space to install.

So I redid the partitioning, deleting the EFI partition and creating a 1-2M partition for grub.

My final partition map included:

a 2M partition BIOS boot loader

a /boot partition a little less than 500M (ext4)

a couple of small partitions reserved for later use which I told the installer not to touch

/ (ext4, encrypted)

/var (ext4, encrypted)

swap (encrypted)

/usr/local (ext4, encrypted)

/home (ext4, encrypted)

a data partition for future use (ext4, encrypted)

I let the installer create file systems on everything except the 2 small reserved partitions.

The install went smoothly. I told it to install the boot loader to /dev/sda. I did not get many of the options shown in the Installation Guide but perhaps that is because I used the KDE spin.

On reboot, I got dumped in grub rescue mode. I rebooted and used the machine's BIOS boot menu to select the HDD. This was top of the list anyway but for some reason it now worked. I then got a normal looking grub boot menu. (Note: I don't know what Fedora's is meant to look like but this was a pretty minimal grub menu - just black on white text with a single white line framing the screen.) Fedora booted fine and I set up a normal user etc.

I installed the 471 upgrades. I was surprised not to be asked for a password but it seemed to work. It ended up waiting for other processes to finish forever but the icon said it wanted to reboot so in the end I let it.

Again, I get dumped at the grub rescue shell unless I use the BIOS boot menu.

I then had a poke around. For some reason, I can't get UK English at all - only US. Probably some locale issue.

But the contents of /boot are really confusing me.

I have directories for both /boot/grub and /boot/grub2. The grub2 seems to be for 32 bit but I believe all bios-grub2 is 32 bit so that's probably normal.

I also have /boot/efi/EFI/... and the redhat efi files described in the Installation Guide as used for EFI boot. But that makes no sense. There is no EFI partition on the ... (more)

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2012-09-11 03:00:46 -0600

ZenDark gravatar image

In a cleanly installed x86-64 system I have:

/boot/grub <- legacy folder for old files

$ ls /boot/grub
splash.xpm.gz

/boot/grub2 <- new place for grub2 files

localhost# rpm -q grub2
grub2-2.0-0.38.beta6.fc17.x86_64

Grub2 is a 64 bits package

BIOS is 16 bits EFI is 32 bits and 64 bits

If your system has a BIOS you must not use EFI.

Try reinstalling the system, wiping all the disk first (MBR also), and without creating/deleting the EFI schema... Maybe anaconda got confused and installed support for both PC BIOS and EFI.

edit flag offensive delete link more
1

answered 2012-09-11 09:28:28 -0600

cfr gravatar image

Thanks for responding and thanks for the information that both grub and grub2 under /boot are "normal" (even if /boot/efi is not normal for a BIOS boot).

I had resigned myself to reinstalling. However, being bloody-minded, I thought I had little to lose by screwing the system up further and decided to fiddle a little first. I tried the following: - I established that I was not booted in EFI mode.

su # switch to root
modprobe efivars
ls /sys/firmware # check that subdirectory efi doesn't exist
  • I figured out yum well enough to figure out I had grub-efi and grub2 (non-efi) installed. (I couldn't get regexps to work with yum very well though - only for search but not list.)
  • I removed grub-efi, mactel-boot and (hence) anaconda.
  • I removed the empty hierarchy of directories under /boot/efi and /boot/efi itself.
  • I regenerated grub2's cfg at /boot/grub2/grub.cfg.

    grub2-mkconfig -o /boot/grub2/grub.cfg

  • I reinstalled grub2 to disk.

    grub2-install --recheck /dev/sdX # substitute appropriately for X e.g. /dev/sda in my case

  • I rebooted using systemctl reboot without having to use the boot menu!

  • Just to check, I powered off and restarted with the power button and I still don't get dropped to the rescue shell.

Note that anaconda should have recognised my machine as EFI capable and not insisted on BIOS boot since the firmware supports UEFI booting and the option is enabled in BIOS setup. Perhaps its detection is not 100%?

In any case, I'm not bothered. It would have been slightly simpler to use EFI for me as that's what I use on my laptop but it is no big deal.

Now I just need to figure out how Fedora configures things. Currently flummoxed by lack of /etc/locale.conf and /etc/locale.gen...

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-09-10 17:01:59 -0600

Seen: 3,227 times

Last updated: Sep 11 '12