LinuxQuestions.org
Visit the LQ Articles and Editorials section
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-03-2004, 07:44 AM   #1
jychin
LQ Newbie
 
Registered: Jul 2004
Posts: 6

Rep: Reputation: 0
Accidentaly deleted fstab file


hi...
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
Demonbane
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
pakage
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?

Cheers
 
Old 05-11-2006, 12:06 AM   #4
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian jessie/sid; OpenSuSE; Fedora
Posts: 1,591

Rep: Reputation: 162Reputation: 162
Distro CD

Use rescue mode on the distro CD1/DVD, as already stated.
 
Old 05-11-2006, 12:09 AM   #5
pakage
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..
Cheers
 
Old 05-11-2006, 12:40 AM   #6
Zmyrgel
Senior Member
 
Registered: Dec 2005
Location: Finland
Distribution: Slackware, CentOS, RHEL, OpenBSD
Posts: 1,006

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

Here's a sample for gentoo installation docs:
Code:
/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
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,126

Rep: Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985
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.
 
  


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
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


All times are GMT -5. The time now is 09:51 AM.

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