-   Linux - Newbie (
-   -   Grub Menu Freeze (

kienjakenobi 08-31-2010 03:13 AM

Grub Menu Freeze
I am attempting to boot both OSX 10.6 and Enterprise Linux 5. This is what I did:

sudo yum install grub.x86_64

grub-0.97-13.5.x86_64.rpm                                | 857 kB    00:00   
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing    : grub                                                    1/1

  grub.x86_64 0:0.97-13.5                                                     


grub 0.97 is the latest version avaliable for el5.

sudo grub-install /dev/sda

Probing devices to guess BIOS drives. This may take a long time.
Installation finished. No error reported.
This is the contents of the device map /boot/grub/
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(fd0)  /dev/fd0
(hd0)  /dev/sda

sudo grub
>find /boot/grub/stage1

find /boot/grub/stage1

>root (hd0,2)

Filesystem type is ext2fs, partition type 0x83
>setup (hd0)

setup (hd0)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... yes
 Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... failed (this is not fatal)
 Running "embed /boot/grub/e2fs_stage1_5 (hd0,2)"... failed (this is not fatal)
 Running "install /boot/grub/stage1 (hd0) /boot/grub/stage2 p /boot/grub/grub.conf "... succeeded

At this point, I restart the computer. I have already installed rEFIt, so I choose the Partition Tool to update the partition table. On the next boot, I choose to boot from the Linux partition. I am given a standard GRUB command prompt. So, I type in these lines:

root (hd0,2)
kernel /boot/vmlinuz-2.6.18-194.11.1.el5 root=/dev/sda3
initrd /boot/initrd-2.6.18-194.11.1.el5.img

This causes GRUB to successfuly boot into linux. However, now I need to get this into a proper configuration file so that I do not have to type it in on every boot. Hence, I create /boot/grub/grub.conf:


title Scientific Linux
root (hd0,2)
kernel /boot/vmlinuz-2.6.18-194.11.1.el5 root=/dev/sda3
initrd /boot/initrd-2.6.18-194.11.1.el5.img

Now, however, when I restart and choose to boot from the Linux partition, I receive the "loading GRUB stage 2" message, and then I receive the standard GRUB menu where I should be able to just press enter and proceed. However, instead of letting me choose a boot option, it just freezes. It is hard frozen. Nothing works. I have two keyboards hooked up, and neither the arrow keys, nor any other keys will cause anything to happen. Even after waiting several minutes, it remains frozen, even though the timeout is set to 10.

What on earth is causing this freeze? I am using the exact same instructions in my grub.conf that work on the grub command line. If I delete grub.conf, then it goes back to the GRUB command prompt where I can manually type everything in, and it always works.

Larry Webb 08-31-2010 06:41 AM

If you made no typos I am not sure. I use grub legacy also but instead of making grub conf I made /boot/grub/menu.lst. I am not sure but if you use grub/conf you still need a file named menu.lst.

kienjakenobi 08-31-2010 08:48 AM

Thank you.

I am sure that I do not have any typos in grub.conf because what I wrote in my first post is a copy and paste from my grub.conf.

Even if I had a faulty grub.conf, I am still very surprised that GRUB freezes at the selection menu, even before I choose anything. I have a lot of experience with GRUB2, and regardless of how crappy the grub.conf is, it does not actually mess up until I actually choose an OS from the menu. Perhaps the freezing attitude is a part of grub-legacy.

I will try using /boot/grub/menu.lst instead of grub.conf to see how that affects matters.

kienjakenobi 08-31-2010 09:37 AM

Unfortunately, that did not do it. I deleted /boot/grub/grub.conf and then created /boot/grub/menu.lst:


default 0
timeout 10

title Scientific Linux
root (hd0,2)
kernel /boot/vmlinuz-2.6.18-194.11.1.el5 root=/dev/sda3
initrd /boot/initrd-2.6.18-194.11.1.el5.img

The first time I rebooted it did not show a menu, it just went to the GRUB command line. It was not seeing the menu.lst file, so I ran "grub-install /dev/sda3" again. The installer created a symlink at /boot/grub/grub.conf that pointed to /boot/grub/menu.lst. Now I rebooted again, and this time I see the menu as I expected, but with the exact same problem. I can not do anything at all. Completely frozen.

Larry Webb 08-31-2010 10:23 AM

Leave everything the way it is if you can boot from manually inserting menu from the edit. If it still boots bring back grub shell then do this leaving menu.lst alone.

root (hd0,2)

setup (hd0)

Make sure there are no errors.

If this does not work I am lost.

kienjakenobi 08-31-2010 08:52 PM

Thank you for your help, Larry. I did as you suggested:

I deleted the /boot/grub/menu.lst file, which means that GRUB goes into the command prompt instead of the frozen menu. At the command prompt I can manually boot into linux. So, once I booted into the GRUB command line, I did as you said:
root (hd0,2)
setup (hd0)
It gave me the exact same output that I got the first time, which I also posted in my first post:

Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... yes
 Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... failed (this is not fatal)
 Running "embed /boot/grub/e2fs_stage1_5 (hd0,2)"... failed (this is not fatal)
 Running "install /boot/grub/stage1 (hd0) /boot/grub/stage2 p /boot/grub/grub.conf "... succeeded

The only thing interesting is that the e2fs_stage1_5 embed failed. I do not know what this means, but it is obviously not necessary for my boot situation. I can successfully boot into my ext3 linux partition by manually entering the information at the GRUB prompt.

After that, I rebooted, and it simply gave me the command prompt, where I was still able to manually boot. So, I created the exact same /boot/grub/menu.lst again, and rebooted again. Still, it gives me the selection menu, but it is completely and totally frozen.

This is incredibly annoying, because GRUB is obviously capable of booting into my linux partition, it is just hitting some wall when it tries to use a boot menu. Everything works perfectly right now, I just have to manually write all the GRUB commands every time I want to boot into linux! Why will an identical menu config file not work!?

kienjakenobi 09-01-2010 11:55 PM

I became quite frustrated that I could not get GRUB working with Scientific Linux (Enterprise Linux 5.5), so I scrapped it all and decided to try GRUB with Fedora 13, just to see if that would work.

I installed Fedora 13 and had it install GRUB. Fedora 13 still uses GRUB 0.97. Although Fedora created its own grub.conf file and it installed GRUB 0.97 into the MBR and into /boot successfully, I received the exact same problem! Once the GRUB selection menu comes up, it simply freezes. It stops. Nothing more. No response to keyboard input. No timeout even if I do not press anything on the keyboard.

This makes it very clear that this problem is not a simple issue with a config file somewhere. This is a serious problem. However, I do not understand why I am getting this issue. I am doing all of this on a MacBook that started out with nothing on it but the usual 100MB EFI partition and a large HFS+ partition for my Mac. I do not have any special hardware or settings. I have seen tons of people get GRUB to work on a Mac, so why is it freezing on me!?

Larry Webb 09-02-2010 06:10 AM

I did not realize you were on a Mac Book, I can not even guess.

kienjakenobi 09-02-2010 10:17 AM

Yeah, that is why I am trying to dual booth Mac OSX and Linux. First came Mac OSX, now comes Linux.

As the next chapter in my adventure, I decided to try GRUB2 to see if it would work. GRUB2 is not installable either from Fedora 13's install disk, or through Scientific Linux. Therefore, I burnt an Ubuntu 10.04 Live CD and used that. I was never able to successfully install GRUB2 through the Live CD's command line. I followed numerous GRUB2 guides, and I always received errors at various points in the process. However, when I did a full Ubuntu install, GRUB2 was successfully installed, and it even works!

I am not interested in using Ubuntu, but this proves that at least GRUB2 is capable of working for me. GRUB2 boots into the selection menu like normal, and it does not freeze! I can use the arrow keys, I can edit GRUB's settings, and I can even wait for the timeout, just like it should work!

Since this is the first sign of a working GRUB I have seen, I believe I will try to install GRUB2 through Ubuntu, and then simply replace Ubuntu with Scientific Linux.

kienjakenobi 09-04-2010 01:13 PM

Because I found that GRUB2 worked on my computer, I have developed a method for using GRUB2 to boot into Scientific Linux. This is what I did:

1. Use gparted on Ubuntu Live CD to create 4 partitions in addition to the 2 partitions that come with Mac:
sda1 = EFI (Already there)
sda2 = Mac (Already there)
sda3 = /boot = 100MB
sda4 = swap = 2000 MB
sda5 = / (for Scientific Linux) = 3700MB
sda6 = / (for Ubuntu) = Remaining space
You can see that there is a partition for Ubuntu. This is necessary to correctly install GRUB2, but it will be removed at the end.

2. Install Scientific Linux using /boot, swap, and /. You can allow the Scientific Linux installer to install GRUB, but the settings do not matter. It will be replaced by GRUB2.

3. Through the Ubuntu Livd CD, copy the important linux files from /boot to a flashdrive. These files are required by GRUB, and they will be erased by our GRUB2 installation, so we need to backup the files now so we can put them back after GRUB2 is installed.
cp /boot/*2.6.18* /mnt/flashdrive

4. Install Ubuntu. This will install GRUB2 correctly.

5. Test GRUB2 by booting into Ubuntu. So far, you should not need to use rEFIt's MBR partition table updater at all. Ubuntu's installer seems to take care of that.

6. Through the Ubuntu Live CD, copy the important linux files from the flashdrive back into /boot. Now you should have Ubuntu’s files (*2.6.32*), as well as Scientific Linux’s files in /boot

7. Edit /boot/grub/grub.cfg to add an entry for Scientific Linux. To get the UUID of your partitions, use "sudo blkid"

8. Edit /etc/fstab on Scientific Linux’s root partition so that it is referring to the correct partitions. Usually the partition’s labels get messed up from the Ubuntu install, so either use gparted to change the labels, or simply change the fstab file.

9. Reboot into Scientif Linux. You should be able to successfuly boot into Scientific Linux by using GRUB2, at this point.

10. Using the Ubuntu Live CD, delete the Ubuntu partition, increase the size of the Scientific Linux partition, take the Ubuntu entry out of /boot/grub.cfg, and delete the GRUB linux files /boot/*2.6.32*

11. Reboot, and use rEFIt to update the the MBR partition table(Select Partition Table Tool at the startup menu). Now you should still be able to boot into GRUB2 and then Scientific Linux, but you will not have any Ubuntu installation.

kienjakenobi 09-04-2010 01:25 PM

The above method has the obvious drawback that I can not actually update the GRUB installation unless I were to do a complete Ubuntu + Scientific Linux reinstallation. This should not, however, be a problem. I will never need to update the GRUB2 installation as long as it works.

At first I tried to install GRUB2 through the Ubuntu Live CD's command line. Although I made progress, none of the guides or manuals worked for me. There seem to be a lot tricks to getting GRUB 1 or 2 to work on Macs. The Ubuntu installer seems to know those tricks, but I was unable to reproduce them on the command line.

This very lengthly adventure leaves me with these questions:

1. My original question: Why does GRUB-legacy not work on my Mac? (See the plethora of information above)

2. During one of my Scientific Linux installations, I used an anaconda kickstart file so that I did not have to go through the lengthly process of choosing all the packages I wanted to install every time. The anaconda kickstart file worked great, except for the fact that anaconda did not ask me for a root password when I used the kickstarter. This meant I successfully installed Scientific Linux and booted into it, but I could do absolutely nothing becuase the root account had some password on it that I did not know. I could not find any mention of a defualt root password in any Scientific Linux documentation. I had to reinstainll without using a kickstart file.

All times are GMT -5. The time now is 07:24 PM.