Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 03-17-2008, 07:04 PM   #1
LQ Newbie
Registered: Mar 2008
Posts: 2

Rep: Reputation: 0
Help After Ghosting, Please

I've never used Linux before and I'd appreciate some help. I'm going to walk through my problem step by step and hopefully someone will have some input. I have a machine with a 30 gig Windows drive and a 120 gig Red Hat Linux 2.4 drive. The Red Hat drive was the master and the Windows the slave. I used Ghost 7.5 to copy the contents of the 120 gig drive into a new 500 gig drive. After the Ghosting was done Grub came up correctly once, but now I just get the message "Grub Loading 1.5.... Error 2". I got a Linux disk and I try to do Linux rescue but it says "Error mounting file system on hda3" and drops me to shell. If I do fdisk -l /dev/hda I get the following:
Disk /dev/hda: 500.1 GB 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225380 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 4 32098+ de Dell Utility
/dev/hda2 5 108 835380 82 Linux Swap
/dev/hda3 * 109 7590 60099165 83 Linux
/dev/hda4 7591 60801 427417357+ f Win 95 ext'd LBA
/dev/hda5 7591 8409 6578586 82 Linux swap
/dev/hda6 8410 60801 420838708+ 83 Linux

I tried to do "mount /dev/hda3" but it says
Cannot read /etc/fstab: no such file or directory

What's going on? How do I get grub back onto hda3?
Old 03-17-2008, 08:20 PM   #2
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
Did you replace the 120 GB drive with the 500 GB drive?

Explore the drives installed using the grub shell. Changing hardware or repartitioning can cause device assignments to change in the bios. The change occurs after rebooting. What was once /dev/hda might be something else now. You may also have a boot drive select shortcut that would allow you to quickly select the drive to boot to. Grub uses (hd<disk>,<partition>) drive notation instead of /dev/hd<disk><partition> notation. Grub counts from 0 instead of one as well. A drive /dev/hda1 usually corresponds to (hd0,0); /dev/hdb1 to (hd1,0), etc.

It is possible that the kernel's view of which is the first drive differs from what grub says before booting. Even if you can boot up by entering the kernel and intrd files in the grub shell, this conflict will prevent updating with grub-install. The solution is to explicitly map grub style device names to kernel style device names by editing /boot/grub/


I am not certain when RHEL 2.4 came out, or did you mean that you run Red Hat with a 2.4 kernel? If you have a very old distro with an old kernel, using an old version of ext2, maybe a 500 GB partition could cause problems if 32 bit addressing is used. In short, I don't know what you meant by "Red Hat Linux 2.4".

Last edited by jschiwal; 03-17-2008 at 08:24 PM.
Old 03-17-2008, 09:26 PM   #3
LQ Newbie
Registered: Mar 2008
Posts: 2

Original Poster
Rep: Reputation: 0
Yes, I took the 120 gig drive out.

The full version of Linux listed on grub when the computer did work was:
Red Hat Linux 2.4.20-28.7. It probably is really old.

Where can I find instructions on exploring with the grub shell?
Old 03-18-2008, 04:37 AM   #4
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
In the grub shell, you can enter in three lines to boot up. One line starts with the word kernel followed by the location of the kernel to load. Another line starts with the word initrd followed by the location of the intrd file. Lastly the "boot" command is given on the third line to start the boot process.

Also, most distro's will have vmlinuz & initrd symbolic links that you can use as shortcuts to the most recent kernel. So you don't even need to know that, or have to type in a long name.

The exploring part is done using TAB completion. You press the TAB key at any point to see what options you have. So if you had (hd entered and press tab, you might see (hd0 and (hd1 indicating that yo u have two disk drives. If you have "(hd0," entered, pressing tab will show you the partitions available on the drive.
If you have "(hd0,1)/" entered, pressing tabs will show you the directories available on the filesystem of the first disk, 2nd partition. You can add a directory name followed by a slash to enter the directory. Pressing TAB again will then show you the files and subdirectories in that directory.

Imagine that the first drive's first partition is the boot partition. is mounted over /boot:
kernel (hd0,0)/vmlinuz
initrd (hd0,0)/initrd

You can enter just "kernel (hd" and then hit tab. The possible hard drives will be listed.
"kernel (hd0," Now the partitions on the first drive will be listed.
"kernel (hd0,0)/" Now pressing tab will show the directories and files on this partition. Do you see either the kernel or initrd filenames

If what you are looking for isn't in this directory, just backspace, press the next partition number, such as "kernel (hd0,1)/" and see if they are in that one.

If your /boot directory isn't in it's own partition, then locate the root (/) directory and enter the /boot directory:
"kernel (hd1,1)/[TAB]" shows directories like boot/, home/, etc/, usr/ etcetera. Enter the boot directory now:
"kernel (hd1,1)/boot/"


Pressing tab to complete the possible options, and backspace to back out of the wrong selection, and trying then next one allows you to locate the kernel and initrd file without even knowing your drive structures ahead of time.


I hope you can follow my instructions. It is one of those things that is very easy once you try it.

Last edited by jschiwal; 03-18-2008 at 04:45 AM.


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
Suse 9.1 or 9.3 ghosting trainer0242 SUSE / openSUSE 4 06-14-2005 05:34 AM
Ghosting to a CompactFlash longnam Slackware 2 03-25-2005 07:14 PM
ghosting machine jwijesundra Linux - General 2 03-01-2005 10:25 AM
ghosting an image jag2000 Linux - Software 2 11-25-2004 07:28 PM
Ghosting Linux to new HD? zhenwu Linux - Software 3 11-08-2001 11:36 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:18 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration