LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-21-2004, 11:33 PM   #1
nbier
LQ Newbie
 
Registered: Aug 2004
Distribution: SuSE
Posts: 9

Rep: Reputation: 0
System won't boot: hangs at grub, can't mount hd through alternate means


cross-posted to SuSE formum....

I shutdown and physically moved my suse 9.0 box today. Upon restarting hung for what seemed like a long time at "grub loading stage2", then dumped me to grub command line. I was not able to do anything from the command line (perhaps should say, I don't know how to do anything from the grub command line).

Loaded the SuSE CD. Selecting the "boot from hard disk" option failed (could not find root partition).

From there I tried the repair installation option. Automatic repair does the following:

The messages, relevant to my problem, that came up were:

-> Executing file system check for partition /dev/hda2
-> Error detected
-> The Reiser file system of the partition /dev/hda2 is corrupted. To repair the file system, press "Repair"
I pressed "Repair"
-> Repair was successful

-> Executing file system check for partition /dev/hda2 (repeat)
-> Error detected
-> The Reiser file system of the partition /dev/hda2 is corrupted. To repair the file system, press "Repair"
I pressed "Repair"
-> Error: Changing environment to target system was no successful

-> Check boot loader configuration
-> Searching configuration files...
-> The following configuration files were not found: /etc/sysconfig/kernel
-> Error: The file %1 was not found. YaST can not recover this file

The repair process than ended. I still can't boot up.

I've tried knoppix, but it isn't able to mount hda2 either. I'm desperate to at least get the data off this disk, but am completely at a loss as to what to do next. Thoughts or suggestions would be very welcome!
 
Old 11-22-2004, 05:06 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
I had a similar problem in re not being able to boot my system (after the ole lady shut it down via the power button rather than use the shutdown menu). Fortunately, my /boot is in a partition seperate from /. I booted from cd, but couldn't find my / partition. Took a few minutes of fiddling, then I discovered what was wrong. The boot cd loads it's own version of fstab, rather than using the one in /etc.
The solution to my problem was as follows:
1) su to root
2) edit the working version of fstab in memory and save. add the /dev/hda2 line with parameters and mount point.
3) cd to /mnt and create the mount point: i.e. mkdir hotstuff, or whatever.
4) mount /dev/hda2
then go to work.
So, try booting Knoppix and apply steps 1-4 to see if it works for you.
 
Old 11-22-2004, 11:41 AM   #3
dubya
Member
 
Registered: Mar 2004
Location: Kitchener, Ontario, Canada
Posts: 386

Rep: Reputation: 30
Do you have Windows running on this machine? If so, try the software found here:

http://uranus.it.swin.edu.au/~jn/linux/explore2fs.htm

Otherwise, I'm not much help.
 
Old 11-23-2004, 01:57 AM   #4
gd2shoe
Member
 
Registered: Jun 2004
Location: Northern CA
Distribution: Debian
Posts: 835

Rep: Reputation: 49
It's not an fstab problem, nor will ext2 tools for windows help (he's useing reiserfs).

My best guess is that your computer (and therefore hard drive) got jared in the moving process. Can you access the other partitions on the disk? If you want to check for unreadable sectors without risking a write operation you can try:

dd if=/dev/hda2 of=/dev/null

In other words, read hda2 from the beginning, but ignore whatever it says. If there is a flagrant read error it will tell you.

If you want to test useing a write operation, I'd try:

badblocks -nvs

The 'n' means 'non-destructive', it reads the data and then puts it back when it's done with a section. Avoid the 'w' flag unless you give up on your data. It overwrites as it tests. You may come up with a better combonation of flags though.

There are data recovery programs for reiserfs. I have read posts of people useing them, I just don't know what their called. They're probably already on your knoppix disk somewhere.

Sorry about the tough luck. Hope things go better.
 
Old 11-23-2004, 01:56 PM   #5
nbier
LQ Newbie
 
Registered: Aug 2004
Distribution: SuSE
Posts: 9

Original Poster
Rep: Reputation: 0
Sucess: Data Recovered

Is it too early for a celebratory drunk?

Managed to recover the data from the disk (ended up w/ 4 lost and found files, which look like system files).

Ended up using dd_rescue w/ dd_rhelp as a front end to do a direct copy of the damaged partition; was then able to work directly on the file that it created. (copies dd_rescue and dd_rhelp both available at: ftp://129.79.136.75/software/, pick the distro of your choice. Benefit over dd is that it doesn't stop at bad sectors). The new file was written to a different hd, so I was able to muck w/o further risk to the original data.

So, I went to work on the new file. Initially reiserfsck --check was failing (bread: "End of file, cannot read block"). Next tried reiserfsck --rebuildtree, which ran successfully (though w/ a few warnings). Finally, reiserfsck --rebuild-tree.

After that, mount -o loop /mnt/hdd3/dead_drive.dd /mnt/recovery did the trick. I have a mounted filesystem with what looks like everything I thought I'd lost.

Did I mention that this disk contained unbacked-up copies of my wife's dissertation research data?

Back ups, young man, backups.

After I'm sure I've recovered all the data, I'm going to try the same process on the hard disk--will see if it's just a corrupt file system (which would suggest a bad shutdown), or if it is actually a bad drive (i.e. damaged during the move).

Thanks for the tips and advice.
 
Old 11-23-2004, 02:17 PM   #6
gd2shoe
Member
 
Registered: Jun 2004
Location: Northern CA
Distribution: Debian
Posts: 835

Rep: Reputation: 49
Congratulations!

Being a journaled file system, a bad shut down should not have been the cause. If you want to verify the drives physical integrity, I'd run badblocks or some other surface scanner. Some file system utilities (e2fsck for example for ext2/3) will rely on badblocks and use the data that comes off it to mark bad sectors to avoid using them in the future. Still, I'm not sure I would feel completely comfortable using a drive with some bad sectors.

Good luck to you, and thank you for posting your outcome and solution!
 
  


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
OSuse 10 won't mount cd and hangs whole system jjtrujillo SUSE / openSUSE 4 11-06-2005 11:34 PM
System hangs after mount USB has completed mat_uk111 Linux - Newbie 1 03-08-2005 06:17 AM
System won't boot: hangs at grub, can't mount hd through alternate means nbier SUSE / openSUSE 3 11-23-2004 01:58 PM
System won't boot, prints GRUB then hangs BobM Red Hat 6 09-20-2004 05:57 AM
mount firewire on Redhat 9.0; system hangs gmedapuram Linux - Newbie 1 06-18-2004 02:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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