LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-31-2010, 02:13 AM   #1
kienjakenobi
LQ Newbie
 
Registered: Mar 2008
Posts: 13

Rep: Reputation: 0
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
Code:
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 

Installed:
  grub.x86_64 0:0.97-13.5                                                       

Complete!
grub 0.97 is the latest version avaliable for el5.

sudo grub-install /dev/sda
Code:
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/device.map.
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
Code:
find /boot/grub/stage1
 (hd0,2)
>root (hd0,2)
Code:
 Filesystem type is ext2fs, partition type 0x83
>setup (hd0)
Code:
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
Done.
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:
Code:
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
boot
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:
Code:
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
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.
 
Old 08-31-2010, 05:41 AM   #2
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
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.

Last edited by Larry Webb; 08-31-2010 at 05:42 AM.
 
Old 08-31-2010, 07:48 AM   #3
kienjakenobi
LQ Newbie
 
Registered: Mar 2008
Posts: 13

Original Poster
Rep: Reputation: 0
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.
 
Old 08-31-2010, 08:37 AM   #4
kienjakenobi
LQ Newbie
 
Registered: Mar 2008
Posts: 13

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

Code:
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.
 
Old 08-31-2010, 09:23 AM   #5
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
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.

Last edited by Larry Webb; 08-31-2010 at 09:26 AM.
 
Old 08-31-2010, 07:52 PM   #6
kienjakenobi
LQ Newbie
 
Registered: Mar 2008
Posts: 13

Original Poster
Rep: Reputation: 0
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:
Code:
 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
Done.
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!?
 
Old 09-01-2010, 10:55 PM   #7
kienjakenobi
LQ Newbie
 
Registered: Mar 2008
Posts: 13

Original Poster
Rep: Reputation: 0
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!?

Last edited by kienjakenobi; 09-01-2010 at 10:57 PM.
 
Old 09-02-2010, 05:10 AM   #8
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
I did not realize you were on a Mac Book, I can not even guess.
 
Old 09-02-2010, 09:17 AM   #9
kienjakenobi
LQ Newbie
 
Registered: Mar 2008
Posts: 13

Original Poster
Rep: Reputation: 0
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.
 
Old 09-04-2010, 12:13 PM   #10
kienjakenobi
LQ Newbie
 
Registered: Mar 2008
Posts: 13

Original Poster
Rep: Reputation: 0
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.
 
Old 09-04-2010, 12:25 PM   #11
kienjakenobi
LQ Newbie
 
Registered: Mar 2008
Posts: 13

Original Poster
Rep: Reputation: 0
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.

Last edited by kienjakenobi; 09-04-2010 at 12:28 PM.
 
  


Reply

Tags
boot, boot loader, enterprise, freeze, grub, linux, menu



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] lost grub menu after windows installation & forgot to backup menu.lst jesman1 Linux - Kernel 4 08-12-2010 11:57 PM
grub drops to grub prompt on boot, but can use commands to find menu... fix? greenmuzz Linux - Software 7 06-07-2009 03:07 AM
Grub Menu doesn't reflect menu.lst file fatsheep Linux - Software 4 06-11-2007 01:29 PM
GRUB menu.lst/grub.conf file with multiple partitions dasy2k1 Linux - General 1 04-19-2007 08:42 AM
SLED 10 Freeze/Start Menu Problems gqstud79 SUSE / openSUSE 6 08-22-2006 10:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration