LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 08-15-2005, 09:05 PM   #1
woranl
Member
 
Registered: Apr 2003
Location: Toronto
Distribution: Fedora Core
Posts: 119

Rep: Reputation: 15
Power failure killed my fstab PLEASE HELP


First of all, I post this thread in "Linux - Enterprise" forum before, but because I think this is more like a Newbie FAQ.. so I decide to post in here again.. BTW, this is quite Urgent.. please help

After the power failure, my system cannot boot up...Please help..

the following is the error message:

WARNING: bad format on line 1 of /etc/fstab
WARNING: Your /etc/fstab does not contain the fsck passno field. I will kludge around things for you, but you should fix your /etc/fstab file as soon as you can.

fsck ext2: Is a directory while trying to open / [Failed]

***An error occured during the file system check
***Dropping you to a shell; the system will reboot
***when you leave the shell
***Warning SElinux is active
***Disabling security enforcement for system recovering
***Run 'setenforce1' to reenable
Give root password for maintenance
(or Control-D to continue):

Please help!! I don't have a back up of my /etc/fstab.... How do I recover my system without losting my data . .. . really need your help
 
Old 08-15-2005, 09:15 PM   #2
kencaz
Senior Member
 
Registered: Mar 2005
Location: Las Vegas, NV
Distribution: Mandriva Slackware FreeBSD
Posts: 1,468

Rep: Reputation: 48
Hmm, Usually if there is a power failure during a Read/Write process it may cause the Read/Write head to crash into the platter causing damage. I don't think your fstab has changed but may be a physical problem with the drive.

Don't know the FC rescue process but you may want if you have access to boot a LiveCD or a bootable, either Linux or DOS disk to attempt to recover your data.

KC
 
Old 08-15-2005, 09:29 PM   #3
woranl
Member
 
Registered: Apr 2003
Location: Toronto
Distribution: Fedora Core
Posts: 119

Original Poster
Rep: Reputation: 15
Physical disk problem?? Oh god !!

Can anyone tell me how to back up my system? Step by Step please
I've never experience with a linux crash before....

this is bad..
 
Old 08-15-2005, 09:36 PM   #4
kencaz
Senior Member
 
Registered: Mar 2005
Location: Las Vegas, NV
Distribution: Mandriva Slackware FreeBSD
Posts: 1,468

Rep: Reputation: 48
Are you able to get any sort of command prompt or login either as root or user? when you boot are you able to get passed the point where it say's to "give root Password" ???

More information please...

KC
 
Old 08-15-2005, 09:40 PM   #5
woranl
Member
 
Registered: Apr 2003
Location: Toronto
Distribution: Fedora Core
Posts: 119

Original Poster
Rep: Reputation: 15
I meant not back up.. but how do I recover my data... DOS or LiveCD or whatever...

oh god..
I think I'm doomed....
 
Old 08-15-2005, 09:50 PM   #6
woranl
Member
 
Registered: Apr 2003
Location: Toronto
Distribution: Fedora Core
Posts: 119

Original Poster
Rep: Reputation: 15
Yes it does ask me to give root password as follow:

Give root password for maintenance
(or Control-D to continue):



when I type in my root password, I'm able to get into the maintenance mode.. (but I don't know what to do next)... I try to "vi" to the read only /etc/fstab file, and it seem the file is messed up...it contains numbers, not the fstab I used to know before.


 
Old 08-16-2005, 02:31 AM   #7
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 51
When using Maintenance Mode, try doing
Code:
fsck /dev/whatever
on each of your Linux partitions, where /dev/whatever is the name of the partition. That will try to fix errors in the filesystem.

If that doesn't work, try booting the FC install CD and going to rescue mode by typing "linux rescue" at the boot: prompt. Then do fsck on all your partitions.
 
Old 08-16-2005, 05:26 PM   #8
woranl
Member
 
Registered: Apr 2003
Location: Toronto
Distribution: Fedora Core
Posts: 119

Original Poster
Rep: Reputation: 15
I still can't recover my data...PLEASE HELP

I try to use the FC rescue disc and type

Code:
fsck /dev/hda
But because it can't read /etc/fstab, it gives me some error message.

I tried to boot using Slax LiveCD.. and try to mount my hda manually...
the /dev/hda1 was mount ok, and it contains grub, some .img files, some System.map files.. etc... I think this is the boot partition

Problem is .. I can't mount my /dev/hda2 (I suspect my linux installation is hda2, but I maybe wrong because I'm not sure) BTW, I only have 1 hard drive, so it makes sense it's hda and not other thing else

I type

Code:
mount -t ext3 /dev/hda2 /mnt/hda2
and it gives me the following error:

Code:
wrong fs type, bad option, bad superblock on /dev/hda2
missing codepage or other error
In some case useful info is found in syslog - try
dmsg | tail or so
So I type dmsg | tail and the following error occured
Code:
Can't find ext3 filesystem on dev hda2
What should I do now?
what else can I try
Please HELP...
 
Old 08-16-2005, 05:35 PM   #9
woranl
Member
 
Registered: Apr 2003
Location: Toronto
Distribution: Fedora Core
Posts: 119

Original Poster
Rep: Reputation: 15
maybe hda2 is swap...
ok.. here are some of the blocks that I have under /dev

hda
hda1
hda2
hdc
Loop0 , Loop1 ... etc
and some for floppy

I don't know where my linux is installed into.. I only have 1 hard drive and only 3 partitions i think,.... one for boot, one for swap and one for the main partition.

I think i'm doomed
 
Old 08-16-2005, 06:43 PM   #10
woranl
Member
 
Registered: Apr 2003
Location: Toronto
Distribution: Fedora Core
Posts: 119

Original Poster
Rep: Reputation: 15
Hi,

I've just notice that my linux is install in /dev/VolGroup00/LogVol00

This is how my partition looks like

Code:
        Device                 Mount Point/Raid/Volume        Type          

LVM Volume Groups       
     VolGroup00
            LogVol01                                          swap         
            LogVol00                                          ext3          

Hard Drives
    /dev/hda
         /dev/hda1                                            ext3
         /dev/hda2                     VolGroup00            LVM PV
What kind of filesystem is LVM PV?? How do I mount that when I boot using Slax LiveCD?

When I go to the directory /dev , I can't find the directory of /dev/VolGroup00/LogVol00 ... so where exactly is it?? I'm confused...
 
Old 08-16-2005, 07:16 PM   #11
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHEL, AltimaLinux, Rocky
Posts: 1,151

Rep: Reputation: 46
Logical Volume Manager (see the HowTo: http://www.ibiblio.org/pub/Linux/doc...LVM-HOWTO.html ). It’s a fancy way to do disk management.

/dev/hda1 = /boot
/dev/VolGroup00/LogVol00 = /
/dev/VolGroup00/LogVol01 = swap


Try mounting the “/” logical volume from the terminal like this:

mkdir /mnt/temp
mount /dev/VolGroup00/LogVol00 /mnt/temp

You may need to activate the logical volumes before you can mount/access them. Use this series of commands to activate the LVs:

lvm vgscan
lvm lvscan
lvm vgchange -a y
lvm lvscan

Only the third line should really be needed, but sometimes, you also need the first two lines.

You can now mount the LV and use vi to edit/check fstab.

When done, be sure to:

cd /
umount /mnt/temp


P.S. I have never seen swap set up as a logical volume, but I guess anything is possible.

Last edited by WhatsHisName; 08-16-2005 at 07:17 PM.
 
Old 08-16-2005, 10:21 PM   #12
woranl
Member
 
Registered: Apr 2003
Location: Toronto
Distribution: Fedora Core
Posts: 119

Original Poster
Rep: Reputation: 15
Thank You EVERYONE !!!
you guys rock !


My system is now up and running w/ all data recovered !!!


It was a good lesson and exciting experience

again, thank you all !
 
  


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 Off
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 killed my fstab PLEASE HELP woranl Linux - Enterprise 3 08-15-2005 10:34 PM
Power Failure On AC power ONLY Gateway 5300 marti35 Linux - Laptop and Netbook 1 05-22-2005 10:14 AM
Workstation power failure etcetera Linux - Hardware 7 12-17-2004 09:05 AM
Crash after power failure deesto *BSD 8 07-29-2003 01:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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