LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices

Reply
 
Search this Thread
Old 08-15-2005, 08:54 PM   #1
woranl
Member
 
Registered: Apr 2003
Location: Toronto
Distribution: Fedora Core
Posts: 119

Rep: Reputation: 15
Power failure killed my fstab 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:38 PM   #2
aikidoist72
Member
 
Registered: Jan 2005
Location: Australia
Distribution: Slackware Archlinux FreeBSD
Posts: 218

Rep: Reputation: 30
2 ways. Easy or hard?

Easy - grab a live cd, and edit your fstab.... The process is load the cd in the cdrom, boot up, mount your root drive and navigate to /etc folder. This makes it easy to see what is wrong and to navigate around your file systems if need be.

Hard - Give your root password at the prompt and try to edit the files that way. I find this hard as the editors I usually use are not loaded at this point.
 
Old 08-15-2005, 09:58 PM   #3
woranl
Member
 
Registered: Apr 2003
Location: Toronto
Distribution: Fedora Core
Posts: 119

Original Poster
Rep: Reputation: 15
I never use a liveCD before... I've a fedora rescue disc.. is it the same thing?

Let say I'm able to edit my fstab file, what should I put in that file to mount it and access it?

I've never experience in a linux crash before... a step by step would help.... thank you

 
Old 08-15-2005, 10:34 PM   #4
aikidoist72
Member
 
Registered: Jan 2005
Location: Australia
Distribution: Slackware Archlinux FreeBSD
Posts: 218

Rep: Reputation: 30
Fedorea rescue disk would work, but I can not advise you further on how to use it, as I have never used a rescue disk from a distro.

I can however tell you about live-cd's and they are fantastic. The principle is this. You have an entire OS on cd. It only uses your ram, and cdrom. Once the OS is loaded, you then can gain access to anything on that computer. Yes - This is why computer security involves "who" can access your physical computer - but that is another subject.

Here is a list of most of the live cd's around

http://distrowatch.hostcentral.net.a...hp?resource=cd

Once downloaded and burnt, pop the cd in the cdrom and reboot. Once loaded log in as root and go to the file manager that you use. i will assume a KDE base for simplicity.

1) Open konqueror
2) Click on /mnt
3) find where your main root partition is eg /mnt/hda1

This part is important because it dictates what we need to use in the mount command.

4) open a console and enter

mount -t ext3 /dev/hda1 /mnt/hda1

This means mount - with file type "ext3" - the device "/dev/hda1" - on the file structure "/mnt/hda1"
If your file system is reiserfs the change ext3 to reiserfs

5) Go back to your browser and you should be able to see you hard drive files under /mnt/hda1
6) Edit /ect/fstab by right clicking on the fstab file. Choose "open with" then "Kate"




Code:
# <file system>        <dir>           <type>        <options>    <dump> <pass>

none                   /dev/pts        devpts        defaults     0      0
none                   /dev/shm        tmpfs         defaults     0      0
tmpfs                  /tmp            tmpfs         defaults     0      0
usbfs                  /proc/bus/usb   usbfs         defaults     0      0

#dvd-rw
/dev/hdc               /mnt/dvd        auto          noauto,users,rw     0      0


#Slackware 10.1
/dev/hda1        /boot		ext3		defaults         1   1
/dev/hda3        /home		reiserfs    defaults         1   1
/dev/hda4        /data		reiserfs    defaults         1   2
/dev/hda5        /			reiserfs    defaults         0   1
/dev/hda6        swap		swap        defaults         0   0
/dev/hda7        /var			reiserfs    defaults         1   2
/dev/hda8        /opt			reiserfs    defaults         1   2
/dev/hda9        /usr			reiserfs    defaults         1   2
Once adjusted, click save and reboot. Please realise this is only a guide. Do not put in my actual values. Also, there are so many ways of doing this, but I am trying to give you the easiest way using a mouse with a file manager. Hope this helps
 
  


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
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 - Newbie 11 08-16-2005 10:21 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


All times are GMT -5. The time now is 03:46 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration