LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   help ! grub stage 2 read error (https://www.linuxquestions.org/questions/linux-newbie-8/help-grub-stage-2-read-error-365370/)

bschiett 09-20-2005 05:35 PM

help ! grub stage 2 read error
 
Hi all,

I have a linux system set up (arch linux) and I was trying to tar-gz a Maildir folder, when I suddenly got 'cannot stat', 'read only filesystem', and my shell was no longer responding to my keyboard ( i was logged in through SSH).

so I went to the machine and did a reset using the reset button, thinking it would come up just fine. but it didn't. GRUB is saying Loading Stage 2.. Read error, and that's where the system hangs now...

how do I get my system back alive? what is broken and how do i fix it?

thanks!
Bert

acid_kewpie 09-20-2005 05:45 PM

Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.

http://www.linuxquestions.org/rules.php

bigrigdriver 09-20-2005 06:47 PM

I could rant and rave about the no-nos, but I won't. Apparently, you've broken the grub setup, and it can't find stage 2 now.

My suggestion: if you have Knoppix, Gnoppix, or some other rescue disk, use it. If not, try the installation cd/dvd for your distro (which you don't name, but would be nice to know for anyone trying to help you), and try to boot from installation media, rather than harddisk.

Once you have booted into a running version of Linux, edit the running /etc/fstab to add an entry for the partition wherein resides the /boot/grub directory.

Then create a mount point for that partition in the running version (don't worry, it won't be there when you re-boot. You just need a place to mount the partition so that you can read the file). Something like: mkdir /mnt/tmp would work, as well as any other name.

With those two edits done, open a term window and enter the command: mount /mnt/tmp (or whatever you named it).

Look for grub.conf or menu.lst in /boot/grub (it varies among distros). Check the 'kernel' entry to see if it points to the wrong partition for grub stage 2 (the /boot directory of your installation). On one of my distros, that line begins with:
kernel (hd0,5)/vmlinuz root=/dev/hda8, where 'kernel (hd0,5)/vmlinuz points to the location of the compressed kernel image, and root=/dev/hda8 points to the location of the root of the filesystem (/).

The fact that grub gives you an error message says that grub is still active in the MBR. Something else has changed, and it can't find the rest of itself (an idenity crisis?).

syg00 09-20-2005 09:03 PM

The Arch disk won't be much good for this - it's basically an installer.
I like to always keep a Knoppix around - much more generally useful for recovery.

If grub can't find stage2, somebody has moved it (or it's partition) - or overwritten it.
Get Knoppix up and see if it can mount your partitions, and see if you can browse them. At least that will indicate if the partition table and file systems are o.k.

Hopefully they are - after that I'd go back to the Arch disk, and see if you can get into the menu.lst (under System Configuration), and check it looks o.k., then re-install grub from there, just like the initial install.

AwesomeMachine 09-21-2005 01:27 AM

grub just gets messed up. You reinstall and away it goes.

/sbin/grub-install /dev/sda


All times are GMT -5. The time now is 04:32 AM.