LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-27-2005, 08:30 PM   #1
m_a_b
Member
 
Registered: Aug 2003
Distribution: Ubuntu 6.10 Edgy
Posts: 90

Rep: Reputation: 15
Question help with recovering bootloader...


I need to recover my Grub bootloader after having to reinstall Windows XP. So far, I did the following:
  • Booted with Mandriva 2006 Live Cd
  • su
  • mkdir /mnt/hda3
  • mount /dev/hda3 /mnt/hda3
  • chroot /mnt/hda3
  • sudo /sbin/grub-install /dev/hda (this didn't work because the "grub-install" file was not found. So, I did a file search and foud it at /usr/sbin, so go to the next line)
  • sudo /usr/sbin/grub-install /dev/hda

After the last command, I got the following error:

/dev/ide/host0/bus0/target0/lun0/part3: Not found or not a "something" device (I can't remember what "something" was)

So, I am a at this and don't know why it didn't work. Any suggestions?

By the way, I am using Mandrake 10.0 on hda3, a linux swap on hda7, and winxp on hda1.
 
Old 12-27-2005, 09:32 PM   #2
TruongAn
Member
 
Registered: Dec 2004
Location: Vietnam (Việt Nam)
Distribution: Gentoo (desktop), Arch linux (laptop)
Posts: 728

Rep: Reputation: 33
try it that way:
run grub.
After you get a grub console type these command:
Code:
root (hd0,2)
setup hd0
 
Old 12-27-2005, 09:37 PM   #3
m_a_b
Member
 
Registered: Aug 2003
Distribution: Ubuntu 6.10 Edgy
Posts: 90

Original Poster
Rep: Reputation: 15
can you tell me how to run grub? All the other stuff I did I researched and just inserted my own hda numbers
 
Old 12-27-2005, 09:49 PM   #4
TruongAn
Member
 
Registered: Dec 2004
Location: Vietnam (Việt Nam)
Distribution: Gentoo (desktop), Arch linux (laptop)
Posts: 728

Rep: Reputation: 33
Type grub.
Just like you run grub-install
 
Old 12-27-2005, 09:58 PM   #5
m_a_b
Member
 
Registered: Aug 2003
Distribution: Ubuntu 6.10 Edgy
Posts: 90

Original Poster
Rep: Reputation: 15
Thanks, TruongAn. It looks like it recovered it, but I haven't tested Linux. By the way, the last command should have been "setup (hd0)".

So, for those of you that are needing to restore your GRUB bootloader, here is what I did:

Code:
Booted with Mandriva 2006 Live Cd
Looked in the config panel to get the mount point of my linux distro, and opened the console for the following commands:
su
mkdir /mnt/hda3
mount /dev/hda3 /mnt/hda3
chroot /mnt/hda3
grub
root (hd0,2)
setup (hd0)
 
Old 12-27-2005, 10:19 PM   #6
m_a_b
Member
 
Registered: Aug 2003
Distribution: Ubuntu 6.10 Edgy
Posts: 90

Original Poster
Rep: Reputation: 15
well, it looks like I might have spoken too soon. I tried booting into linux and it gave me the following error:

resuming from /dev/hda6
resuming from device hda6
kernel panic: Resuming Machine: Unable to find suspended-data signature (a bunch of symbols) - misspelled?

One thing that I am a little worried about is that from Windows I used Partition Magic to make another partition. Is it possible that messed it up? If so, how to I fix it? I don't think I even have a hda6 anymore.
 
Old 12-27-2005, 10:27 PM   #7
TruongAn
Member
 
Registered: Dec 2004
Location: Vietnam (Việt Nam)
Distribution: Gentoo (desktop), Arch linux (laptop)
Posts: 728

Rep: Reputation: 33
You can boot into linux means grub problem was fixed.
The kernel panic is another problem
Would you mind show us your partition table.
Post the output of command fdisk -l here please
 
Old 12-27-2005, 10:41 PM   #8
m_a_b
Member
 
Registered: Aug 2003
Distribution: Ubuntu 6.10 Edgy
Posts: 90

Original Poster
Rep: Reputation: 15
Code:
Disk /dev/hda: 60.0 GB, 60011642880 bytes
240 heads, 63 sectors/track, 7752 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        3379    25545208+   7  HPFS/NTFS
/dev/hda2            3380        5986    19708920    f  W95 Ext'd (LBA)
/dev/hda3            5987        7348    10296720   83  Linux
/dev/hda5            3380        3386       52888+   b  W95 FAT32
/dev/hda6            3387        5850    18627808+   7  HPFS/NTFS
/dev/hda7            5851        5986     1028128+  82  Linux swap / Solaris
 
Old 12-27-2005, 10:43 PM   #9
m_a_b
Member
 
Registered: Aug 2003
Distribution: Ubuntu 6.10 Edgy
Posts: 90

Original Poster
Rep: Reputation: 15
by the way, hda6 is my windows storage partition. Not sure why the linux loader would even be looking there
 
Old 12-27-2005, 10:52 PM   #10
m_a_b
Member
 
Registered: Aug 2003
Distribution: Ubuntu 6.10 Edgy
Posts: 90

Original Poster
Rep: Reputation: 15
also, looking in my "menu.lst" file, it calls hd6 for resume:
Code:
timeout 10
color black/cyan yellow/cyan
default 4

title linux
kernel (hd0,2)/boot/vmlinuz root=/dev/hda3 devfs=mount resume=/dev/hda6 splash=silent vga=788
initrd (hd0,2)/boot/initrd.img

title linux-nonfb
kernel (hd0,2)/boot/vmlinuz root=/dev/hda3 devfs=mount resume=/dev/hda6
initrd (hd0,2)/boot/initrd.img

title 263-7
kernel (hd0,2)/boot/vmlinuz-2.6.3-7mdk root=/dev/hda3 devfs=mount resume=/dev/hda6 splash=silent
initrd (hd0,2)/boot/initrd-2.6.3-7mdk.img

title failsafe
kernel (hd0,2)/boot/vmlinuz root=/dev/hda3 failsafe resume=/dev/hda6 devfs=nomount
initrd (hd0,2)/boot/initrd.img

title WindowsXP
root (hd0,0)
chainloader +1
 
Old 12-27-2005, 11:43 PM   #11
m_a_b
Member
 
Registered: Aug 2003
Distribution: Ubuntu 6.10 Edgy
Posts: 90

Original Poster
Rep: Reputation: 15
well, I decided to edit the menu.lst file to remove the "resume" parameter. This worked and I was able to boot into linux. However, I am not sure if I need that parameter and just need to fix the broken link or even where it came from. I don't remember putting it in there and can't figure out why it would be looking at a NTFS drive. Any thoughts?
 
Old 12-28-2005, 12:04 AM   #12
TruongAn
Member
 
Registered: Dec 2004
Location: Vietnam (Việt Nam)
Distribution: Gentoo (desktop), Arch linux (laptop)
Posts: 728

Rep: Reputation: 33
The role of the parameter is depend on your distro.
I have no though.

On my FC box, the parameter is :
rhgb ro root=LABEL=/ quiet

I don't know what rhgb is.
At first it work fine.
But then I have to reinstall grub (just like your case), and I got a kernel panic: cannot mout root fs.
I try to edit the parameter and it worked after I remove the rhgb.

You and I have experienced the same problem.
I just know how to fix it, I don't know why I got it.
 
Old 01-17-2006, 06:16 AM   #13
bruse
Member
 
Registered: Feb 2005
Location: internet
Distribution: Debian
Posts: 821

Rep: Reputation: 30
rhgb stands for "red hat graphical bootup" i think so.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows 2000 Bootloader vs. Mandriva LILO Bootloader Dregnan Mandriva 7 12-03-2007 09:55 PM
How can I disable the grub bootloader and enable the lilo bootloader? abefroman Linux - General 1 08-06-2005 08:53 AM
I need create bootloader. How make bootloader? swipple Fedora - Installation 3 01-23-2005 12:22 PM
Recovering eggoz Linux - Newbie 1 06-13-2003 11:38 AM
help recovering HD bobsmith Linux - General 6 01-11-2003 12:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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