LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 06-30-2005, 10:58 PM   #1
smkamene
Member
 
Registered: Sep 2004
Location: Atlanta
Posts: 34

Rep: Reputation: 15
Reinstall GRUB with Knoppix CD?


Hello guys. I have a Red Hat 9 box that i cloned to a much bigger hdd. I kept all the partitions at the same size except the very last one i made it to take up the rest of the space on my new drive. I used Acronis True Image to clone the hard drive. It did cloned the mbr record, but for some reason the box will not boot now. I did take the old drive out. After the post i get stuck at GRUB message. So i went ahead and downloaded the Knoppix cd (can't find my RH9 cd's anymore), booted off the cd. I went ahead and mount /dev/hda3 /mnt/hda3 ...this is my / partition. Am i right? Then i chroot /mnt/hda3. Then i tried to grub-install /dev/hda3 and get this:

[root@Knoppix /]# grub-install /dev/hda3
/usr/share/grub/i386-redhat/stage1: Not found.


What am i doing wrong? Do i have to use RH 9 cd and boot into rescue mode?

Thanks a lot
 
Old 06-30-2005, 11:50 PM   #2
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 59
Quote:
mount /dev/hda3 /mnt/hda3 ...this is my / partition. Am i right?
I don't know, is that your root partition?

You don't need to mount the partition to fix the grub. If /dev/hda3 is indeed your root partition, then boot up with Knoppix as before.
Type the command: grub
At the grub> prompt, type: root (hd0,2)
Then type: setup (hd0)
then type: quit
reboot and try it.
If that doesn't work, post the results of the command: fdisk -l
 
Old 07-01-2005, 11:19 AM   #3
smkamene
Member
 
Registered: Sep 2004
Location: Atlanta
Posts: 34

Original Poster
Rep: Reputation: 15
This is what i get:

grub> root (hd0,2)
Filesystem type is ext2fs, partition type 0x83

grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... no

Error 15: File not found

grub>

root@1[~]# fdisk -l

Disk /dev/hda: 300.0 GB, 300090728448 bytes
255 heads, 63 sectors/track, 36483 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 26 208813+ 83 Linux
/dev/hda2 27 942 7357770 83 Linux
/dev/hda3 943 1962 8193150 83 Linux
/dev/hda4 1963 36483 277289932+ 5 Extended
/dev/hda5 1963 2599 5116671 83 Linux
/dev/hda6 2600 2730 1052226 82 Linux swap / Solaris
/dev/hda7 2731 2860 1044193+ 83 Linux
/dev/hda8 2861 36483 270076716 83 Linux
 
Old 07-01-2005, 11:27 AM   #4
Razze
Member
 
Registered: Dec 2004
Location: Espoo, Finland
Distribution: Gentoo, 2.6.16-gentoo-r11
Posts: 108

Rep: Reputation: 15
The fdisk -l ouput shows that hda1 is the bootable partition on your harddrive. Try the commands homey suggested, but replace the (hd0,2) with (hd0,0)
 
Old 07-01-2005, 12:04 PM   #5
smkamene
Member
 
Registered: Sep 2004
Location: Atlanta
Posts: 34

Original Poster
Rep: Reputation: 15
This time it completed sucessfuly but when i rebooted the box ...i don't even get the GRUB prompt anymore. White after POST i just get a blinking _

Strange.
 
Old 07-01-2005, 12:33 PM   #6
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 59
There seems to be quite a few linux partitions on your drive. No idea which one is the root so we can try a couple of methods.
One is to boot into knoppix and use the grub command: grub
At the grub> prompt, type: find /sbin/init
Use the results in the next command:[B]root ( put that info here )
Then the command: setup (hd0)
and quit.

Another method would be to go into /mnt/hda1 or hda2 or hda3 ..... and look for your /boot/grub.conf and find out what the root partition is.

Another method would be to get ahold of CD#1 and go into rescue mode.
You do that by typing:linux rescue
 
Old 07-01-2005, 05:43 PM   #7
smkamene
Member
 
Registered: Sep 2004
Location: Atlanta
Posts: 34

Original Poster
Rep: Reputation: 15
grub> find /sbin/init
(hd0,2)

grub> root (hd0,2)
Filesystem type is ext2fs, partition type 0x83

grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... no

Error 15: File not found

grub>


*************************************************
I went into /mnt/hda3 and here it is:

root@0[grub]# cat grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/hda3
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-8)
root (hd0,0)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdc=ide-scsi
initrd /initrd-2.4.20-8.img


I guess i am going to have to d/l the first cd of RH9.
 
Old 07-01-2005, 08:05 PM   #8
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 59
Somehow, I don't think rescue mode will be much help in this case. The command grub> find /sbin/init shows (hd0,2) and the grub.config shows (hd0,0) . Did you get the partitions copied over in the correct order?
 
Old 07-01-2005, 09:58 PM   #9
smkamene
Member
 
Registered: Sep 2004
Location: Atlanta
Posts: 34

Original Poster
Rep: Reputation: 15
yes, I used Acronis True Image to clone from my 100G drive to the 300G. I've had good experience with Acronis before, where Ghost would never clone the MBR record ..Acronis always did. The only thing i can think of is ..i resized my /usr from 14G to 7G ...when i did that ..i had to move partitions much closer to each other..otherwise there would be empty slots on the drive. Do you think moving the partitions could have caused this? I did move them in the same order they were originally laid out on the drive.
 
Old 07-01-2005, 10:15 PM   #10
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 59
Quote:
Do you think moving the partitions could have caused this?
Yes, that may be causing problems but I'm not sure as I haven't used Acronis.
 
  


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 error 17, and wont reinstall using grub-install! chiefreborn Linux - General 6 06-06-2007 11:29 AM
reinstall grub . . . Aidin_36 Linux - Newbie 3 06-11-2005 10:42 AM
reinstall windows, reinstall GRUB too? leupi Linux - Software 1 05-07-2005 11:50 AM
Grub reinstall help using knoppix gexzd Linux - Newbie 4 06-08-2004 11:25 PM
how to reinstall grub? Pimp Linux - General 1 08-04-2003 05:35 AM


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