LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 10-18-2004, 04:11 PM   #1
nifflerX
Member
 
Registered: Dec 2003
Distribution: RedHat 8.0, 7.1 and Enterprise WS 3,4
Posts: 94

Rep: Reputation: 16
power failure corrupted parition


Hi,

I've got a Red Hat Enterprise v3 running and all was well until a power failure occurred. The machine tried to restart and hung while the kernel was loading. I rebooted and everything seemed to come up fine. After a while the machine rebooted on its own again, and again hung during boot up. This time when I manually rebooted the machine did not come back up but gave the error message:

Kernel panic: No init found. Try passing init= option to kernel

I tried booting off of the other kernels installed on the machine, but all failed at this point.

I booted off the linux installation disk, but when I booted into linux recovery mode, I was told that no linux installations could be found. I can do fdisk -l and get output which looks all right. Also, when I booted off the installation disk I was able to see the hard drive partitions under "Manually define disk partitions using Disk Druid".

As a last resort I tried adding 'init=/dev/hda1' and 'init=/dev/hda5' to my kernel command when my machine booted up without a CD, both failed at the same point.

I think I've solved the power supply problem (I think it was a faulty power cord). However, now I'm stuck with a machine that can't boot. Is there some way for me to try and repair my partitions and get my data off without doing a complete wipe and install? Thanks so much.


-NifflerX
 
Old 10-18-2004, 05:54 PM   #2
avarus
Member
 
Registered: Apr 2004
Location: Oxford, UK
Distribution: Ubuntu, Debian, various
Posts: 230
Blog Entries: 5

Rep: Reputation: 33
Hi,

Time to abandon the pointy-clicky tools and embrace the command line then..

When the kernel boots, it first mounts the root partition. You seem to think that this is either /dev/hda1 or /dev/hda5, which seems sensible (or does RHE3 use labels??). You need to try and see from the bootup logs if the kernel succeeds in this - you may need to use Shift+PgUp to scroll the screen. The kernel parameter 'root=' tell the kernel what to mount.

If root is mounted, the kernel then wants to execute /sbin/init. So from your recovery disc get a command line and try these things:

fsck /dev/hda1 #fsck checks for and hopefully fixes errors

mkdir /mnt/root
mount /dev/hda1 /mnt/root
ls -L /mnt/root/sbin

If 'init' really is missing you need to replace it. I'll let a RedHat expert suggest where to get a copy, but it seems likely there will be more stuff missing or damaged.

Hope this gives you a starting point.

TIM
 
Old 10-18-2004, 07:31 PM   #3
SlipAway172
Member
 
Registered: Jun 2004
Location: GA
Distribution: Latest ubuntu
Posts: 172

Rep: Reputation: 30
Talking

thanx ive had the SAME problem with mandrakel and smoothwall . so now i dont have to reinstall mandrake. HAHAHAH. now time to write down the commands
 
Old 10-19-2004, 09:38 AM   #4
nifflerX
Member
 
Registered: Dec 2003
Distribution: RedHat 8.0, 7.1 and Enterprise WS 3,4
Posts: 94

Original Poster
Rep: Reputation: 16
Thanks for the ideas. As it turns out I didn't fix my power supply issue as well as I thought. The fact that my machine keeps randomly restarting as I'm working on it convinced me of this.

I was able to run fsck on one of the partitions and I got the following:

fsck /dev/hda
...
Couldn't find ext2 Superblock, trying backup blocks...
Bad magic number in Super-block while trying to open /dev/hda

In any case I'll try to solve the power issue before I work on this again. Thanks for the help, and if you have any other thoughts on what I might try, I'm all ears.

-NifflerX
 
Old 10-19-2004, 05:50 PM   #5
avarus
Member
 
Registered: Apr 2004
Location: Oxford, UK
Distribution: Ubuntu, Debian, various
Posts: 230
Blog Entries: 5

Rep: Reputation: 33
One observation:

/dev/hda represents the actual disk, with a partition table and the like
/dev/hda1 (2,3) represents a disk partition, conceptually a big data bucket, onto which one generally maps a file system

In other words, fsck /dev/hda will never work. You should fsck /dev/hda1 (or /dev/hda2 etc).

Side note:
On some hard drives it is possible to make a file system on the disk itself. Your drive works a bit then breaks horribly!

TIM
 
Old 10-20-2004, 01:29 PM   #6
nifflerX
Member
 
Registered: Dec 2003
Distribution: RedHat 8.0, 7.1 and Enterprise WS 3,4
Posts: 94

Original Poster
Rep: Reputation: 16
Thanks for the heads up on fsck. I'll run it again as soon as I get the chance. Unfortunately my power supply issue has morphed into a motherboard issue, and the motherboard is pretty old. Hopefully I'll be able to fix this all and report back before this thread gets too obsolete. Thanks for all the help.


-NifflerX
 
Old 10-21-2004, 11:08 AM   #7
nifflerX
Member
 
Registered: Dec 2003
Distribution: RedHat 8.0, 7.1 and Enterprise WS 3,4
Posts: 94

Original Poster
Rep: Reputation: 16
Hi,

So I was finally able to get the the machine to boot up off of the rescue CD in a stable environment and it appears as though my / partition is gone! I can mount /dev/hda1, 2,3, etc. and they all appear to have my different partitions in them, except than none of them correspond to the / partition. And, when I mount /dev/hda5, where I think the / partition is located, I just get an empty folder. Is there anyway for me to get a / partition back on this hard drive? Or should I try and mount my home partition, get all my data off and reformat the drive? Thanks so much.

Just as an update I got all of my data off of the the drive for precautionary measures. Is there any advantage to trying to just install the / partition, rather than reinstalling the entire operatering system? Thanks again.


-NifflerX

Last edited by nifflerX; 10-21-2004 at 12:05 PM.
 
  


Reply



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
need help.. power failure now no boot vbtalent Fedora 2 11-02-2005 06:51 PM
Power Failure On AC power ONLY Gateway 5300 marti35 Linux - Laptop and Netbook 1 05-22-2005 10:14 AM
rc.local and power failure omnia Red Hat 2 01-04-2005 10:40 AM
Workstation power failure etcetera Linux - Hardware 7 12-17-2004 09:05 AM
power failure = no root tobysaville Linux - General 1 06-22-2004 06:39 AM

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

All times are GMT -5. The time now is 08:34 AM.

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