LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-05-2009, 08:38 PM   #1
Hi_This_is_Dev
Member
 
Registered: May 2009
Location: India
Distribution: On my PC I use RHEL, at office AIX, Solaris, HP-UX, RHEL.
Posts: 254

Rep: Reputation: 18
Grub Loader -> Grub Page - > Linux Starts Up -> Erorrrrrrrrrr... Doesn't Start Up!


Hi,


I had setup "dual booting". The first OS is Windows XP Pro SP 2 and the second OS is RHEL 5. The system was running fine until yesterday when I started it up and selected Windows XP from the Grub Page there was an error indicating that a system file was missing or corrupted under ...\system32\ and suggested that the problem could be fixed by booting from the CD of XP and selecting the recovery option (r). So, I did that. However, after the boot process I was presented with the partitions list and was to selected C to install Windows. I am not sure why the recovery option was not presented. Well, I installed Windows again and so Grub was gone.

To reinstall Grub I did this:

Booted the system from RHEL5 DVD:

Code:
linux rescue <enter>

...

#chroot /mnt/sysimage

#grub-install /dev/hda <enter>
Rebooted the system and the Grub Page was there but Linux could not be started up.

I checked the file /etc/grub.conf and changed the partition number in root (hd0,x) and wherever required. But I forgot what partition number it was there before.

So, how can I determine which partition holds the startup files, i.e. the root partition of Linux while Linux is running in rescue mode?

The command e2label didn't seem to work (though I didn't try it last night).

Well, if you happen to have read one of my previous threads you might guess that my system is messing up after Linux crashed the other day and I reinstalled it again and again. (Now, Windows also seemed to be closed so I opened it forcefully!)
 
Old 09-05-2009, 09:22 PM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,504

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
You can get your partition information by running the command: fdisk -l (Lower case Letter L) as root user, use any Linux Live CD. It's difficult to give specific advice without this information, how many drives/partitions? Do you have a separate boot partition? Post the fdisk output here and someone should be able to help you.
 
Old 09-06-2009, 03:33 PM   #3
Hi_This_is_Dev
Member
 
Registered: May 2009
Location: India
Distribution: On my PC I use RHEL, at office AIX, Solaris, HP-UX, RHEL.
Posts: 254

Original Poster
Rep: Reputation: 18
Hi,


I did that yesterday and today in the evening also. Somehow I was able to fix the problem and got the system ready. Well, I will post my findings here in some minutes.

Thanks!

Quote:
Originally Posted by yancek View Post
You can get your partition information by running the command: fdisk -l (Lower case Letter L) as root user, use any Linux Live CD. It's difficult to give specific advice without this information, how many drives/partitions? Do you have a separate boot partition? Post the fdisk output here and someone should be able to help you.
 
Old 09-06-2009, 04:47 PM   #4
Hi_This_is_Dev
Member
 
Registered: May 2009
Location: India
Distribution: On my PC I use RHEL, at office AIX, Solaris, HP-UX, RHEL.
Posts: 254

Original Poster
Rep: Reputation: 18
From linux rescue mode:
Code:
#chroot /mnt/sysimage
#fdisk -l

output:

Device :::::::: Id ::::::::::: System :::::::::::::::: 

/dev/hda1 *        c              W95 FAT35 (LBA)

/dev/hda2          f              W95 Ext'd (LBA)

/dev/hda5          b              W95 FAT32

/dev/hda6          b              W95 FAT32

/dev/hda7         83              Linux

/dev/hda8         82              Linux swap / Solaris

/dev/hda9         83              Linux

/dev/hda10        b               W95 FAT32

/dev/hda11        b               W95 FAT32

So, I edited the /etc/grub.conf file and changed the entry for parition number from whatever it was to (hd0,hd7), (hd0,hd8), and then (hd0,hd9) as those were the only Linux paritions as shown above. But none of them worked. So, I typed in (hd0,hd6) this time and it worked. I figured out that the first parition is internally or logically numbered 0 so (hd0,hdx) should be (hd0,hd6) in the grub.conf.

I tried this to figure out which parition holds the root (/) parition:

Code:
#e2label /dev/hda7

By the way, could you explain me what those "ID" values indicate?
 
Old 09-06-2009, 05:17 PM   #5
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,504

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
You found out that Grub counts from zero (0) not from one (1). The Grub numbers will always be one less than fdisk output.

ID numbers like 83, 82?? Filesystem type.
 
Old 09-07-2009, 01:39 PM   #6
Hi_This_is_Dev
Member
 
Registered: May 2009
Location: India
Distribution: On my PC I use RHEL, at office AIX, Solaris, HP-UX, RHEL.
Posts: 254

Original Poster
Rep: Reputation: 18
I studied it today. Thanks, anyways!


Quote:
Originally Posted by yancek View Post
You found out that Grub counts from zero (0) not from one (1). The Grub numbers will always be one less than fdisk output.

ID numbers like 83, 82?? Filesystem type.
 
  


Reply

Tags
grub, page



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
Unable to boot into GRUB loader: GRUB command shell boots up: urgent issue wombat53 Linux - Software 9 09-04-2009 06:20 AM
Installed ubuntu dual boot, but grub doesn't start instead XP starts normally abhishekpapanna Ubuntu 6 12-07-2008 02:40 PM
How to change my Grub Loader to Lilo loader in REDHAT LINUX 9.0 skumar.v Linux - Newbie 3 04-04-2008 10:38 AM
Using the windows boot loader to start GRUB NoahT1BM Linux - Newbie 2 02-25-2008 10:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:48 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
Open Source Consulting | Domain Registration