LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 03-19-2009, 07:32 AM   #1
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,461
Blog Entries: 6

Rep: Reputation: 51
Mistakenly erased all the /etc/fstab entry?


One of my colleague mistakenly erased all the entries from /etc/fstab.
Now the machine is not coming up and stops at [Repair Filesystems]# cursor after Ctrl-D.
I tried booting through Runlevel 1 but again can't edit the /etc/fstab file due to Read-Only Permission.
What is the correct solution?
 
Old 03-19-2009, 07:54 AM   #2
Maligree
Member
 
Registered: Mar 2008
Distribution: Gentoo, CentOS, Fedora, Arch
Posts: 231
Blog Entries: 1

Rep: Reputation: 42
The standard LiveCD->mount drive->write a new fstab?
 
Old 03-19-2009, 08:20 PM   #3
JaksoDebr
Member
 
Registered: Mar 2009
Distribution: Fedora, Slackware
Posts: 104

Rep: Reputation: 21
Within the [Repair Filesystems]# rescue mode you can remount the root file system in writable mode by
mount -n -o remount,rw /dev/hda5 /
(replace the device name according to your device)

To write your new fstab file you should have a look at the '/sbin/fdisk -l' output to make sure it's correct for your devices.

Good luck!

Linux Archive

Last edited by JaksoDebr; 04-02-2009 at 06:11 AM.
 
Old 03-19-2009, 09:37 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,832

Rep: Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820
That is fine for a small/home system - gets ugly for lots of network mounts.
Need I mention a backup would make this trivial ?.
 
  


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
entry into /etc/fstab wetnose23 Slackware 2 01-07-2006 05:30 PM
/etc/fstab entry ryedunn Linux - Newbie 1 01-17-2005 02:45 AM
NTFS FSTAB Entry Campy19 Mandriva 2 11-02-2004 08:37 PM
entry in fstab file Tinku Linux - General 6 10-02-2004 01:06 AM
fstab entry albean Linux - Newbie 1 12-04-2002 02:33 PM


All times are GMT -5. The time now is 09:40 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration