LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Mistakenly erased all the /etc/fstab entry? (https://www.linuxquestions.org/questions/linux-newbie-8/mistakenly-erased-all-the-etc-fstab-entry-712785/)

your_shadow03 03-19-2009 06:32 AM

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?

Maligree 03-19-2009 06:54 AM

The standard LiveCD->mount drive->write a new fstab?

JaksoDebr 03-19-2009 07:20 PM

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

syg00 03-19-2009 08:37 PM

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


All times are GMT -5. The time now is 07:26 AM.