LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-04-2009, 05:04 PM   #1
mvmannheim
LQ Newbie
 
Registered: Mar 2009
Posts: 8

Rep: Reputation: 1
GRUB in infinite loop after Windows XP install


Hi All - Here's what I have. I bought a used computer that came with Ubuntu/GRUB installed. I intend to make it an XP/Ubuntu dual-boot machine. However, after installing XP, when the machine boots up it enters GRUB (I see a DOS-like GRUB message in the upper left-hand screen) for a few seconds, then the machine re-boots, and it continues in this loop. (Before XP installation, the same GRUB info message would appear, but would then be followed by Ubuntu loading)

I've read the GRUB manual and some other forums, but not sure where to start here, as I'm kind of a GRUB newbie. I'm guessing that the XP install script placed XP in a partition that was previously occupied by Ubuntu, and the XP boot loader can't be found or something...

I can get into BIOS, and I have a pre-boot utility menu I can get into (native to IBM Thinkpads). So, I can run DOS...

As far as I can see, here's what the utility tells me about my disk:

Physical Disk Description:
Partition 1:
Bootable: Yes
Type: 12 FAT32
Partition 2:
Bootable: No
Type: 5 DOS 3.3+ extended
There's more info about start & end sector #'s, etc., I can include those if it helps.

I don't have a native *NIX system that would allow me to view the GRUB config files, so I don't know how to view/edit the GRUB configuration.

Thanks for any help in advance!
 
Old 03-04-2009, 05:29 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Enter the grub shell before it tries to boot up the default. You can explore the partitions and find which is XP and which is Linux.

On the first line, enter:
kernel (hd0,

Press the TAB key for auto-completion. You will be presented with a list of possible partitions such as (hd0,0) (hd0,1) (hd0,2), etc.
Grub starts counting at zero. If you enter "(hd0,1)/" and press the tab key, you will see the files & directories in the partition. Suppose, that (hd0,1)/ is the partition used for /boot. Then you can type in the first few characters of the kernel file and press TAB to complete the entry.
If you don't have a separate /boot partition, but /boot is a normal directory in the root (/) directory, continue by typing in boot/:
e.g. so far:
(hd0,1)/boot/

When you find the kernel and initrd file, enter the location of the kernel in the first line, the initrd file in the second line, and in the third line, enter the command "boot" and press enter. With luck the system will boot up using your kernel choice.

Now that you are running Linux, you can fix grub. As root, edit the /boot/grub/menu.lst file, correcting any changes.
Also correct any changes in /etc/fstab. If the fstab entries use the partition ID's you may not need to fix them. If the start with the form, /dev/sda2, then fix up your fstab file as well if these aren't correct.

---

The output of your utility program does not look correct. It probably can't handle large drives or sata drives correctly. I wouldn't trust it to make any changes. The XP drive should be NTFS, not FAT. It may not understand NTFS or EXT3 and not list them at all.
 
Old 03-04-2009, 05:34 PM   #3
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,603

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
I assume you are not able to boot either system. It's common for any windows installation to overwrite the mbr without notifying the user. It looks like, from the info you posted, like you have a FAT32 partition and an extended partition. Not sure what you are using to get this info, if it is something that would even recognize a Linux filesystem??

You could download Parted Magic, Gparted to use for formatting and partitioning and getting partition information. You could also download a Linux Live CD of your choice to get info.

I think you wrote over your Ubuntu install but...maybe not?
 
Old 03-05-2009, 01:02 AM   #4
mvmannheim
LQ Newbie
 
Registered: Mar 2009
Posts: 8

Original Poster
Rep: Reputation: 1
Thanks for the great info guys!

So, Thinkpads come with a native diagnostics tool, called PC-DOCTOR. I got the disk info from one of it's utilities. I don't know if it can read Linux file systems - I doubt it...in any case, it's not really giving me any detailed info on the MBR.

As jschiwal suggests, I think my best bet is to get more info on what's going on in the MBR. Unfortunately, I can't get into the GRUB shell...the GRUB manual indicates that if the shell isn't entered automatically, and no menu is presented then the config file is using "hiddenmenu" mode, and will automatically boot w/o pausing. (that seems to be what I'm seeing here) It says that 'ESC' should get you into the shell, but I'm not having any luck forcing it to enter the shell that way. Any ideas? Not sure, if I'm just in the wrong neck of the woods there...

Here's a little more detail on the boot sequence I'm seeing:

1) Power-on
2) Thinkpad "splashscreen" for ~2 seconds
- I can get into the BIOS menu, PC-DOCTOR, and DOS from here
3) "GRUB loading Stage1.5"
"GRUB loading, please wait"
4) Back to 2)

I'm also downloading the Ubuntu Live CD, to see if it can help me get a little more info.
 
Old 03-05-2009, 01:10 AM   #5
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
You could download a supergrub program and burn it onto a cd. Then just boot your computer
with it and it'll ask you a few questions and restore the correct grub entries.

Alternatively, you could also use the Live CD you're downloading to do the same thing manually.
 
Old 03-06-2009, 05:14 PM   #6
mvmannheim
LQ Newbie
 
Registered: Mar 2009
Posts: 8

Original Poster
Rep: Reputation: 1
OK. Apologize for the delay...I'm now up and running w/ a dual-boot system. Everyting worked out fine, once I figured out that the XP install had somehow gotten messed up.

Running Ubuntu/GRUB revealed that the disk had the following partitions:

grub> kernel (hd,0

Partition num: 0, Filesystem type is fat, partition type 0xc
Partition num: 4, Filesystem type is unknown, partition type 0x82

So originally, I was using a "Recovery CD" provided by Lenovo to perform the XP install. The lame DOS batch files couldn't find my CDROM drive 4 disks into the 5-CD set. After a call to their support line, they had me remove ALL hardware items from the BIOS menu except the CDROM drive & HDD. After that, it installed correctly. However, I believe that the first install created a corrupted Partition 4, and the second install ignored/was unaware of it.

In any case, instead of fiddling with the boot record, I decided to just wipe the disk and start all over, using Darik's Boot and Nuke, which worked fine. After that, XP re-install (this time in one partition), and an effortless Ubuntu 8.04 install and now I have a perfect dual-boot system up and running!

Hopefully this will help anybody else that gets tripped up on this issue with the Lenovo Recovery CD for Thinkpads.

Thanks all for your helpful input!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
RHEL 5 Install Problem - Infinite Reboot Loop aramsey Linux - Enterprise 4 09-19-2008 04:22 AM
cacti login in infinite loop irado Linux - Software 0 08-26-2008 06:41 AM
Infinite loop while trying to install mplayer. dr_zayus69 Linux - Software 3 07-05-2008 06:34 AM
Infinite Loop ewt3y Programming 3 08-16-2005 09:48 AM
infinite loop beginner_84 Programming 5 08-15-2004 02:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:19 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