Red Hat This forum is for the discussion of Red Hat Linux. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-11-2006, 07:27 AM
|
#1
|
Member
Registered: Dec 2005
Location: The most beautiful city in the world.
Distribution: Mostly RedHat. Also Suse, Ubuntu, PHLAK etc.
Posts: 149
Rep:
|
Read-only file system???
I'm trying to recover a root account someone renamed by accident.
I get as far as logging into # and editing /etc/passwd, but when I try to save it, I get the message that the file-system is read-only!
How can I get this little problem sorted out?
ADDED: I tried :wq! already
Last edited by kinetik; 01-11-2006 at 07:29 AM.
|
|
|
Click here to see the post LQ members have rated as the most helpful post in this thread.
|
01-11-2006, 07:56 AM
|
#2
|
Member
Registered: Oct 2005
Location: Rajasthan
Distribution: RHEL 4 ES
Posts: 66
Rep:
|
Hi,
Issue the following command before editing the /etc/passwd file
mount -o remount, rw X /
in place of X specify the disk label where your Linux system partition resides mine is
/dev/hda5
Now you can edit the file.
Regards
Be Open By Source
|
|
|
01-11-2006, 08:05 AM
|
#3
|
Member
Registered: Dec 2005
Location: The most beautiful city in the world.
Distribution: Mostly RedHat. Also Suse, Ubuntu, PHLAK etc.
Posts: 149
Original Poster
Rep:
|
Thanks man, but it still doesn't do anything...
I did a mount -o remount, rw X /dev/sda2
It only gives me information on the mount command itself (this system's a bit messed up).
Any other ideas?
|
|
|
01-11-2006, 08:07 AM
|
#4
|
Member
Registered: Oct 2005
Location: Rajasthan
Distribution: RHEL 4 ES
Posts: 66
Rep:
|
Hey man u need to grow up
I said replace X with /dev/sda2.
Now issue the following command:
mount -o remount, rw /dev/sda2 /
remember to put the forward slash at the last
man u need to grow up really i m telling u seriously !
|
|
|
01-11-2006, 08:53 AM
|
#5
|
Member
Registered: Dec 2005
Location: The most beautiful city in the world.
Distribution: Mostly RedHat. Also Suse, Ubuntu, PHLAK etc.
Posts: 149
Original Poster
Rep:
|
OK, was that sarcasm / trying to be funny and failing miserably / genuine irritation?
I'll refrain from calling you an a-hole since you tried helping me out, and because I didn't read what was on the screen.
Another reason I'll refrain from insulting you is because it still doesn't work and I could use some further assistance, message being:
mount: /dev/sda2 not mounted already, or bad option
<seriously now>
If you could help me out here I'd really appreciate it.
</seriously now>
ADDED: Come on OpenBySource, I didn't mean to offend you here or anything (sorry if I did, unintentional), just really need your help. When I run mount, it lists /dev/sda2 as rw, yet when I try to edit anything it sez read-only filesystem. I'm really stumped here!
Last edited by kinetik; 01-11-2006 at 09:39 AM.
|
|
|
01-11-2006, 10:26 AM
|
#6
|
Member
Registered: Oct 2005
Location: Rajasthan
Distribution: RHEL 4 ES
Posts: 66
Rep:
|
Hey,
It doesn't matter. These kinda talks are common if something is mis-understood.
Well as far as your problems goes can you please tell me which runlevel you are:
This can be easily find out by issuing the command
runlevel
Regards
OpenSource
|
|
|
01-11-2006, 11:31 AM
|
#7
|
Member
Registered: Dec 2005
Location: The most beautiful city in the world.
Distribution: Mostly RedHat. Also Suse, Ubuntu, PHLAK etc.
Posts: 149
Original Poster
Rep:
|
That's a relief! I appreciate your help OpenBySource!
Well, I booted up using the GRUB section found here http://linuxgazette.net/107/tomar.html (I know the root password, problem is I just never get the chance to type it in)
When I ran runlevel, here's what I got: N 5
NOTE: I'm using VMWare GSX to do this, don't know if that's of any relevance
|
|
|
01-18-2006, 12:04 AM
|
#8
|
Member
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 25, 26, RHL 5.2
Posts: 560
Rep:
|
Interesting that you are in runlevel 5. Did you enter the password for a regular user to get to this point? Are you able to use "su -" or is it messed up because of the rename on the root account?
I'm not certain what effect renaming the root user would cause to a system. Many startup scripts and daemons usually run as root so it may upset the balance of the universe. Hopefully the person who renamed root didn't mess with any of the filesystem owners:groups otherwise there could be a real mess to clean up.
The article from linuxgazette is a good reference. I would first try booting up in single user mode. If that didn't work I would go with using a LiveCD to permit mounting of the root partition in rw mode and then edit /etc/passwd. With RedHat I know you can use the install CD's to go into rescue mode and solve the problem similar to using a LiveCD.
Bill
Last edited by wmakowski; 01-18-2006 at 12:06 AM.
|
|
|
01-20-2006, 04:40 PM
|
#9
|
Member
Registered: Dec 2005
Location: The most beautiful city in the world.
Distribution: Mostly RedHat. Also Suse, Ubuntu, PHLAK etc.
Posts: 149
Original Poster
Rep:
|
Hi Wmakowski, thanks for your advice!
No I wasn't able to su, login as root or any of that. Even after repairing the passwd file, problems still didn't want to dissappear.
I've now reinstalled everything from scratch, with one important difference: I now made the VMWare Disk as Undoable. Now if something goes wrong and I can't figure out what the problem was, I simply reboot and say "Discard changes". Presto, system's back online and ready to roll!
|
|
|
10-30-2007, 02:56 PM
|
#10
|
Member
Registered: Oct 2003
Location: Florida USA
Distribution: Fedora, RHEL
Posts: 57
Rep:
|
I know this thread is old but the problem still exists. The original poster was using GSX server which is a VMware product. I ran into the same problem on my ESX server with RHEL4 Update 4. So far one of the filesystems has gone read only twice now in a 10 days throwing my bugzilla/mysql/splunk installs into a spin. This is now a known and acked problem by VMware as of this post (Oct 30,2007).
The problem is fixed by using the patch instructions provided at the following URL:
http://kb.vmware.com/vmtnkb/search.d...20KB%20Article
Happy VMing
|
|
|
04-03-2008, 06:30 AM
|
#11
|
LQ Newbie
Registered: Apr 2008
Posts: 2
Rep:
|
Quote:
Originally Posted by openbysource
Hi,
Issue the following command before editing the /etc/passwd file
mount -o remount, rw X /
in place of X specify the disk label where your Linux system partition resides mine is
/dev/hda5
Now you can edit the file.
Regards
Be Open By Source
|
For the benefit of the next person who googles across this thread
I had a similar problem (read only in single user mode)
I found
mount -o remount, rw /dev/hda2 /
failed
however
mount -o remount, -rw /dev/hda2 /
worked (where /dev/hda2 was my root partition).
|
|
2 members found this post helpful.
|
03-13-2009, 06:43 AM
|
#12
|
LQ Newbie
Registered: Mar 2009
Posts: 2
Rep:
|
mount remount
Thanks for this thread I managed to use it after failing to get my head around all the options for mount on the man pages. Please note that it looks that where everyone on this thread has typed or copied...
mount -o remount, rw X /
There is a space between the comma and the rw the comma is to separate option from -o. This will fail saying that you must specify the file type and return 32 (mount failure)
The command should be
mount -o remount,rw X / where X is the filesystem
cheers
|
|
|
11-17-2011, 08:58 AM
|
#13
|
LQ Newbie
Registered: Jun 2008
Posts: 3
Rep:
|
Quote:
Originally Posted by mjlush
For the benefit of the next person who googles across this thread
I had a similar problem (read only in single user mode)
I found
mount -o remount, rw /dev/hda2 /
failed
however
mount -o remount, -rw /dev/hda2 /
worked (where /dev/hda2 was my root partition).
|
Thanks for taking the time to tell us this
|
|
|
11-18-2011, 01:52 AM
|
#14
|
Member
Registered: Dec 2005
Location: The most beautiful city in the world.
Distribution: Mostly RedHat. Also Suse, Ubuntu, PHLAK etc.
Posts: 149
Original Poster
Rep:
|
Not related, but it's quite funny looking back at this thread now over 6 years later and seeing the way I spoke back then ("man", "dude" ).
Anyways, this just once again reminds me how great a forum this is.
Last edited by kinetik; 11-18-2011 at 01:56 AM.
|
|
|
All times are GMT -5. The time now is 12:50 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|