LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 02-05-2007, 09:57 PM   #1
wahming
Member
 
Registered: Jan 2007
Posts: 133

Rep: Reputation: 15
GRUB conf question


After reformatting an ext3 partition in Windows into fat32 format, grub no longer boots correctly. I get the grub console with minimal bash-editing bla bla whenever booting.

grub.conf contents:

default=0
timeout=5
splashimage=(hd0,1)/grub/splash.xpm.gz
hiddenmenu
title Red Ha...
root (hd0,1)
kernel /vmlinuz-2.6.9-34.EL ro root=LABEL=/1 rhgb quiet
initrd /initrd-2.6.9-34.EL.img

fdisk -l returns:

Device Boot Start End Blocks Id System
/dev/hda1 * 1 3848 ### # HPFS/NTFS <-- Windows part.
/dev/hda2 3849 3861 ### # Linux <-- Boot part.
/dev/hda3 3862 8936 ### # Extended
/dev/hda4 8937 9729 ### # W95 Fat32 (LBA) <-- Dell recovery part.
/dev/hda5 3862 4122 ### # W95 Fat32 <-- Shared part.
/dev/hda6 4123 4383 ### # Linux swap
/dev/hda7 4384 8936 ### # Linux <-- root linux install part. (/)

From what I can see, my grub.conf *should* be pointing to my boot partition. Anybody see where I'm messing up?
 
Old 02-06-2007, 02:11 AM   #2
jason_dustrose
Member
 
Registered: Feb 2007
Location: Arizona
Distribution: Currently toying with Debian-based MEPIS
Posts: 31

Rep: Reputation: 15
Question

Quote:
Originally Posted by wahming
title Red Ha...
root (hd0,1)

/dev/hda1 * 1 3848 ### # HPFS/NTFS <-- Windows part.
Now I'm not an expert in this area, and I haven't looked at one of these files in ages (so forgive me if I turn out to be a moron), but it looks to me like grub is trying to boot linux from the new Windows partition (as indicated by hd0,1). The first thing I would try is changing hd0,1 to hd0,2 and see what happens.
 
Old 02-06-2007, 02:26 AM   #3
wahming
Member
 
Registered: Jan 2007
Posts: 133

Original Poster
Rep: Reputation: 15
Mmm, actually, the first partition is represented by (hd0,0), but that's a pretty common error to make.

Anyway, I gave up waiting for an answer, reinstalled linux using the same partitioning setup, and guess what, grub.conf was autoset to the exact same parameters i typed out above. Sigh. Now I'll never know what went wrong.
 
Old 02-06-2007, 03:00 AM   #4
mickyg
Member
 
Registered: Oct 2004
Location: UK
Distribution: Ubuntu/Kubuntu
Posts: 249

Rep: Reputation: 30
Quote:
After reformatting an ext3 partition in Windows into fat32 format, grub no longer boots correctly.
Was it /dev/hda2 that you re-formatted?? You didn't tell us exactly which partition you formatted. If so then it's almost definately that, since grub is looking on that partition for its files:
Quote:
splashimage=(hd0,1)/grub/splash.xpm.gz ...
.

That's just my guess.
 
Old 02-06-2007, 03:11 AM   #5
wahming
Member
 
Registered: Jan 2007
Posts: 133

Original Poster
Rep: Reputation: 15
No, I formatted an unrelated partition, hda5 (the shared partition). In rescue mode I could access /boot (hda2) without any problems.
 
Old 02-06-2007, 04:20 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,729

Rep: Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123Reputation: 2123
The loaders are *very* sensitive to the location of their respective files.
Sounds like you moved something. The re-install would have re-established the connection - as would a simple grub-install.
 
Old 02-06-2007, 03:02 PM   #7
jason_dustrose
Member
 
Registered: Feb 2007
Location: Arizona
Distribution: Currently toying with Debian-based MEPIS
Posts: 31

Rep: Reputation: 15
Wink

Shows you what I know
 
Old 02-06-2007, 07:16 PM   #8
wahming
Member
 
Registered: Jan 2007
Posts: 133

Original Poster
Rep: Reputation: 15
Nope, I tried a grub-install before formatting - didn't work.
 
Old 02-08-2007, 08:14 AM   #9
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by wahming
After reformatting an ext3 partition in Windows into fat32 format,
If I read this correctly, you used a "Winders" tool to do the reformat. If so, it may have / probably did do something ill-behaved to partially hose your MBR & the GRUB stage 1 code located there.

Quote:
Originally Posted by wahming
I get the grub console with minimal bash-editing bla bla whenever booting.
What are you actually seeing? Any indication that my above guess is right?

Have you tried to do a grub-install after the formatting?
 
Old 02-08-2007, 08:46 AM   #10
wahming
Member
 
Registered: Jan 2007
Posts: 133

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by archtoad6
If I read this correctly, you used a "Winders" tool to do the reformat. If so, it may have / probably did do something ill-behaved to partially hose your MBR & the GRUB stage 1 code located there.
That'd be a reasonable assumption, given that I used the WinXP disk management utility to do it, except that grub was installed on the /boot partition, as per my usual setup, and not the MBR.

Quote:
Originally Posted by archtoad6
What are you actually seeing? Any indication that my above guess is right?

Have you tried to do a grub-install after the formatting?
What I was seeing:http://plugintolinux.ca/files/slideshows/grub/img3.html, though without the osX-sy background. Yes, I did the grub-install after the format.

I don't know, I've thought about it and come up with no plausible theories as to what went wrong.
 
Old 02-08-2007, 09:46 AM   #11
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
Are you doing 2 level menuing, where you have a GRUB entry in the XP boot.ini, which points to the GRUB stage 1 code which is residing in the 1st sector (sometimes called the "PBR") of the /boot partition? When you boot, do you see 1st the XP boot menu, then choose GRUB, then see the GRUB menu?

However, I think those Q's are academic -- that screenshot looks like a splash screen & a GRUB prompt provided by stage 2.

How familiar are you w/ the GRUB cmd line? It's incredibly powerful, & can often boot an otherwise inaccessible system. I only have 1 working GNU/Linux box right now, so it would be a little inconvenient to go play w/ it right now. If you can get to your Linux install manually, then you can easily figure out what's wrong w/ your grub.conf. That's assuming there IS something wrong w/ it -- it looks fine to me too.

Have you verified the contents of /boot? It looks like the splash screen file is still where it's supposed to be, but what about the kernel & the inidrd?

I'll stop here, I need to let my subconscious work on this....
 
Old 02-08-2007, 09:53 AM   #12
wahming
Member
 
Registered: Jan 2007
Posts: 133

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by archtoad6
Are you doing 2 level menuing, where you have a GRUB entry in the XP boot.ini, which points to the GRUB stage 1 code which is residing in the 1st sector (sometimes called the "PBR") of the /boot partition? When you boot, do you see 1st the XP boot menu, then choose GRUB, then see the GRUB menu?
Yes, I am.

Quote:
However, I think those Q's are academic -- that screenshot looks like a splash screen & a GRUB prompt provided by stage 2.

How familiar are you w/ the GRUB cmd line? It's incredibly powerful, & can often boot an otherwise inaccessible system. I only have 1 working GNU/Linux box right now, so it would be a little inconvenient to go play w/ it right now.
Yes, that's the grub console/command line/prompt. Not sure about correct terminology here. Unfamiliar, and was busy with other stuff at the time, needed to get the system working, thus the reinstall.

Quote:
If you can get to your Linux install manually, then you can easily figure out what's wrong w/ your grub.conf. That's assuming there IS something wrong w/ it -- it looks fine to me too.

Have you verified the contents of /boot? It looks like the splash screen file is still where it's supposed to be, but what about the kernel & the inidrd?
The grub.conf generated by the reinstall was the same, letter-for-letter. So yeah, it wasn't the grub.conf. No, I didn't think to verify the contents of boot. After all, grub was loading from it and grub.conf was accessible from vi. And bad as Win might treat other OSes, I doubt it'd mess up a random partition I didn't tell it to touch. Still, that's the only workable theory in this thread so far.
 
Old 02-08-2007, 10:04 AM   #13
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
I may be wrong but if Grub doesn't boot from Grub.conf why not use the Grub console to boot this Red Hat "manually"?

You already has the Grub.conf file in front of you, just omit the "title" statement and add a "boot" staement (marked red beloe) and you will know the answer because Grub will tell you which of the 3 lines it doesn't like
Code:
root (hd0,1)
kernel /vmlinuz-2.6.9-34.EL ro root=LABEL=/1 rhgb quiet
initrd /initrd-2.6.9-34.EL.img
boot
If a user has a problem with Grub, cut out the middleman, talk to Grub directly since you have a Grub prompt.

If you talk to Grub you will find the bugger does everything you ask.
 
Old 02-08-2007, 10:27 AM   #14
wahming
Member
 
Registered: Jan 2007
Posts: 133

Original Poster
Rep: Reputation: 15
That simple, eh? Damn. I've just jumped into Linux couple weeks ago, and I'm somewhat overloaded. Have to STFW every time I wanna do something unfamiliar
 
Old 02-08-2007, 04:51 PM   #15
wpn146
Member
 
Registered: Jan 2005
Distribution: Solaris, Linux Fedora Core 6
Posts: 170

Rep: Reputation: 30
Quote:
Originally Posted by wahming
grub.conf contents:

default=0
timeout=5
splashimage=(hd0,1)/grub/splash.xpm.gz
hiddenmenu
title Red Ha...
root (hd0,1)
kernel /vmlinuz-2.6.9-34.EL ro root=LABEL=/1 rhgb quiet
initrd /initrd-2.6.9-34.EL.img
Is it possible that your root partition (/dev/hda7) lost its label? The "kernel" line says "root=LABEL=/1", which looks strange. Most distros would label it as "/ROOT". Running "tune2fs" will display the label near the top.
 
  


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
grub.conf question ndegrace Linux - Software 5 01-09-2005 03:51 PM
Question on grub.conf and Cdrom boot jimmmac Linux - Software 3 11-19-2003 06:17 AM
quick grub.conf question dot hog Linux - Newbie 1 10-17-2003 04:19 PM
lilo.conf and grub.conf no read access shanenin Linux - Software 1 10-02-2003 03:53 PM
grub.conf simple question rusium Linux - Hardware 4 05-10-2003 11:41 PM

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

All times are GMT -5. The time now is 11:46 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration