LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 07-11-2007, 10:56 PM   #1
pmw
LQ Newbie
 
Registered: Nov 2004
Distribution: Fedora 12
Posts: 16

Rep: Reputation: 0
Unhappy My fstab is readonly, and I can't change it!


Can someone help? My /etc/fstab file is readonly, and there's seemingly nothing I can do to change it - chmod doesn't work, remounting doesn't work, rebooting doesn't work. When I edit in vi, it says:

"/etc/fstab" [readonly] 9L, 695C

I can't replace it, either. I am working as a root (via su -). I'm running Fedora Core 6.

Thanks.

Last edited by pmw; 07-11-2007 at 10:58 PM.
 
Old 07-11-2007, 11:04 PM   #2
Kahless
Member
 
Registered: Jul 2003
Location: Pennsylvainia
Distribution: Slackware / Debian / *Ubuntu / Opensuse / Solaris uname: Brian Cooney
Posts: 503

Rep: Reputation: 30
are you SURE that you are running as root? is there a # or a $ next to your command prompt?
 
Old 07-11-2007, 11:09 PM   #3
pmw
LQ Newbie
 
Registered: Nov 2004
Distribution: Fedora 12
Posts: 16

Original Poster
Rep: Reputation: 0
Yep, sure I'm running as root. There's a # as my command prompt.
 
Old 07-11-2007, 11:19 PM   #4
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 59
Have you tried using vim from a super user terminal or edit it from a super user file manager. That is, if you have those features, you should if you have KDE, Gnome is a strange area for me.
 
Old 07-11-2007, 11:29 PM   #5
Kahless
Member
 
Registered: Jul 2003
Location: Pennsylvainia
Distribution: Slackware / Debian / *Ubuntu / Opensuse / Solaris uname: Brian Cooney
Posts: 503

Rep: Reputation: 30
very strange.


is it possible that it is on a read only file system? if so you would need to remount that file system as read only.



alternatively, i know this is very sub-ideal, but can you boot up to a live distro and edit it that way?

Last edited by Kahless; 07-11-2007 at 11:31 PM.
 
Old 07-12-2007, 12:04 AM   #6
pmw
LQ Newbie
 
Registered: Nov 2004
Distribution: Fedora 12
Posts: 16

Original Poster
Rep: Reputation: 0
All good ideas, but none of them worked. Using vim from a super-user terminal just gave me the same result (not being able to save the edited file). Using the super-user file manager gave me an "Access denied" message whenever I tried to change the fstab file (I noticed that the permissions are definitely set to read and write for the owner, who is root).

I remounted the filesystem as read-write, but to no avail. I'm not sure how to tell if the filesystem is read-only, so if you have info on that, I can check.

And I don't know how to boot from a live distribution - further info would be useful.

Thanks.
 
Old 07-12-2007, 12:15 AM   #7
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 59
Go here, pick the option you prefer and put it over top of Fedora to fix the problem.
 
Old 07-12-2007, 12:27 AM   #8
jonwatson
Member
 
Registered: Jun 2004
Location: Nova Scotia, Canada!
Distribution: Ubuntu
Posts: 170

Rep: Reputation: 30
Any chance the immutable flag is set?

chattr -i /etc/fstab
 
Old 07-12-2007, 12:35 AM   #9
pmw
LQ Newbie
 
Registered: Nov 2004
Distribution: Fedora 12
Posts: 16

Original Poster
Rep: Reputation: 0
Jonwatson, you are a god

I have no idea what the immutable flag is, but that was the problem. Thank you very much!
 
Old 07-12-2007, 12:45 AM   #10
jonwatson
Member
 
Registered: Jun 2004
Location: Nova Scotia, Canada!
Distribution: Ubuntu
Posts: 170

Rep: Reputation: 30
Quote:
Originally Posted by pmw
Jonwatson, you are a god

I have no idea what the immutable flag is, but that was the problem. Thank you very much!
Glad I could help.

I've always found that if root cannot do something to a file, it is almost always one of two things:

1. The file system is mounted read only (which someone else mentioned in this thread), or
2. The immutable flag is set

I must admit to having no idea why the immutable flag seems to get set now and again, but it does.
 
  


Reply

Tags
fstab, immutable, readonly, root


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to change fstab so the system can startup in multi-user mode zeta34 Linux - General 5 08-11-2007 04:07 AM
Change ntfs line in fstab jojojo Linux - Newbie 10 06-17-2006 06:42 PM
Mepis won't let fstab change yotamk Debian 7 07-30-2005 09:14 PM
readonly boot karlan Linux - General 1 03-10-2004 09:09 AM
How do I change "fstab" to Write/Edit Mode? sharathkv Linux - Newbie 4 07-29-2003 07:52 AM


All times are GMT -5. The time now is 11:06 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