Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 08-03-2004, 07:44 AM   #1
LQ Newbie
Registered: Jul 2004
Posts: 6

Rep: Reputation: 0
Accidentaly deleted fstab file

i know this sounds stupid but i accidentaly deleted the contents of the fstab file. Now i wont boot. it says something like file system corrupted. what can i do ?? any help would be apprecaited. thanks.

Last edited by jychin; 08-03-2004 at 07:48 AM.
Old 08-03-2004, 08:12 AM   #2
LQ Guru
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
Use the rescue mode provided by your distro CD, then create another /etc/fstab.
That's why you shouldn't muck around using the root account.
Old 05-10-2006, 11:59 PM   #3
LQ Newbie
Registered: May 2006
Posts: 2

Rep: Reputation: 0
I have done the same thing.. i backed up the fstab file but the backup too appears to be blank. My machine is still on and i dont plan on rebooting till ive got that fstab file all propper. How do you recreate it with the correct settings in there?

Old 05-11-2006, 12:06 AM   #4
LQ Guru
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,370

Rep: Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978
Distro CD

Use rescue mode on the distro CD1/DVD, as already stated.
Old 05-11-2006, 12:09 AM   #5
LQ Newbie
Registered: May 2006
Posts: 2

Rep: Reputation: 0
ahk, cool.. sorry..
I thought that the rescue tool simply allowed you to boot with no fstab file and then from there you had to re create it some other way..
Old 05-11-2006, 12:40 AM   #6
Senior Member
Registered: Dec 2005
Location: Finland
Distribution: Slackware, CentOS, RHEL, OpenBSD
Posts: 1,006

Rep: Reputation: 37
You can always write your own fstab by hand. It's not hard.

Here's a sample for gentoo installation docs:
/dev/hda1   /boot     ext2    defaults,noatime     1 2
/dev/hda2   none      swap    sw                   0 0
/dev/hda3   /         ext3    noatime              0 1

none        /proc     proc    defaults             0 0
none        /dev/shm  tmpfs   nodev,nosuid,noexec  0 0

/dev/cdroms/cdrom0    /mnt/cdrom    auto      noauto,user    0 0
Just modify the above to suit your system and that's it

Last edited by Zmyrgel; 05-11-2006 at 12:43 AM.
Old 05-11-2006, 01:34 AM   #7
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 16,963

Rep: Reputation: 2564Reputation: 2564Reputation: 2564Reputation: 2564Reputation: 2564Reputation: 2564Reputation: 2564Reputation: 2564Reputation: 2564Reputation: 2564Reputation: 2564
If I still had an active machine, I'd cat /etc/mtab to fstab. Will be missing some things like CD, floppy, mount options ...
Should be enough to get you up though.

Then play all you like with recovery options.


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
I accidentaly deleted my files...Help Please LinuxSeeker Linux - General 4 09-13-2005 03:26 PM
Simple question: i deleted accidentaly the /dev/mixer0 entry. how can i restore it ? Hell255 Linux - Software 3 06-18-2004 08:43 AM
Help: Accidently deleted file patske Linux - Newbie 5 02-17-2004 09:34 AM
Deleted file klmn1 Linux - Software 2 12-12-2003 06:04 AM
accidentaly deleted /dev/ttyS4 DAChristen29 Linux - Hardware 2 07-03-2003 04:34 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:39 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration