LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 10-06-2006, 09:21 AM   #1
biruhh
LQ Newbie
 
Registered: Oct 2006
Posts: 3

Rep: Reputation: 0
how can I restore /etc/fstab


Hi all,

I am somewhat of a newbie just introfucing Linux to colleagues. I am having a problem where Fedora core 4 was installed and running fine for some time; recently, some minor modifications were made to /etc/fstab, to automatically mount windows partition at boot time. A copy of /etc/fstab was also placed on /root/Desktop for practice (if you will?) and when the user could not mount a flash disk, the system was restarted.

At which time, /etc/fstab could not be found; X server would not start but was able to log in through CLI. The file in /etc has been renamed as fstab~ for some reason, which would explain why the system cannot find it. I tried to replace it with the copy which was placed on /root/Desktop but /etc is 'Read-only file system.' Have tried chmod to change permissions but it doesn't allow it; it seems the whole / partition was mounted as a Read-only file system, probably cuz /etc/fstab was not found. I also tried Linux rescue but it doesn't even find Linux partitions to mount to /mnt/sysimage. I mounted the partition with the / directory manually but all I can find inside is 'rhinstall-stage2.img'. Can anyone help???
 
Old 10-06-2006, 09:30 AM   #2
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Try using a live cd such as Mepis. You should be able to mount the drive that has /etc and make the changes you need. It seems like someone may have used mv instead of cp when they put the fstab in /root/Desktop. /etc/fstab~ is actually a backup of your original fstab before your made your last changes to it.

Last edited by reddazz; 10-06-2006 at 09:46 AM. Reason: typos
 
Old 10-06-2006, 09:30 AM   #3
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Tilde after a file name usually indicates that the file is being edited, and the filename~ is there as long as the file is not closed (saved/quitted) properly, and sometimes even after that. Though the original file should be there too..

If no fstab is found, then no partitions can usually be mounted (since that's what fstab is all about), and thus you don't have a working system. Root partition is mounted read-only if you boot into a "safe mode", and you would need to remount it read-write to get access to the files. If you have a copy of /etc/fstab, you should be able to use a live-cd to copy that in place of the original file /etc/fstab.

I really wonder what partition you mounted if all it includes is rhinstall-stage2.img. I can't say much about this..but if you have a copy of fstab file, use a live-cd or single-user mode to copy it where it should be, and reboot.
 
  


Reply



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
fstab problem: mount: can't find dvd in /etc/fstab or /etc/mtab Nikon01 Slackware 5 11-17-2006 06:15 AM
how can I restore /etc/fstab biruhh Linux - Newbie 5 10-06-2006 12:51 PM
Restore chris2pher_28 Linux - Newbie 1 09-04-2005 10:37 PM
newbie vs fstab. fstab wins :( blop Linux - Newbie 3 01-07-2005 05:54 AM
(version 5.1 chapter 08 fstab) vs (man fstab) rgiggs Linux From Scratch 2 06-03-2004 05:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 12:04 AM.

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
Open Source Consulting | Domain Registration