LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-15-2008, 08:11 AM   #1
raghuveer520
LQ Newbie
 
Registered: Oct 2008
Location: New Delhi
Distribution: Redhat
Posts: 1

Rep: Reputation: 0
Thumbs up My filesystem is readonly , how can do read and write


my filesystem is read only ie in this file /etc/sysconfig/readonly
READONLY=YES
this is bydefault NO but i do READONLY=YES and reboot
now my system is boot properly but no any file create and modify and no command run like useradd, cp, ifconfig etc.
how can modify this file ie /etc/sysconfig/readonly
READONLY=NO
please tell me any person
thank you in advance.
 
Old 10-15-2008, 09:34 AM   #2
Total-MAdMaN
Member
 
Registered: May 2008
Distribution: Gentoo
Posts: 306

Rep: Reputation: 34
Boot using a LiveCD, mount the partition and edit the file.
 
Old 10-15-2008, 11:56 AM   #3
tim914
Member
 
Registered: Apr 2005
Location: Scottsdale, AZ USA
Distribution: Most of them :-)
Posts: 37

Rep: Reputation: 15
Have you tried:

mount -o remount,rw /mountpoint
 
Old 10-15-2008, 12:22 PM   #4
openSauce
Member
 
Registered: Oct 2007
Distribution: Fedora, openSUSE
Posts: 252

Rep: Reputation: 39
Quote:
Originally Posted by Total-MAdMaN View Post
Boot using a LiveCD, mount the partition and edit the file.
The above will work. Alternatively, if your system uses GRUB as its bootloader, there might be a quicker way:
  • At the GRUB menu, select the menu entry for your Linux install and type 'e' to edit the entry.
  • Select the line beginning with the word 'kernel' and type 'e' again to edit.
  • Add the word 'single' to the end of the line, hit enter, and type 'b' to boot.
You're now in single-user mode - logged in as root with minimal services running. Although whether this will allow you to mount your filesystem rw I'm not certain. Just try to edit the file in a console-mode text editor, e.g. emacs (use ctrl+x followed by ctrl+s to save, and ctrl+x followed by ctrl+c to exit), or vi if you know what you're doing but I don't recommend it!

Oh, you can probably get into single-user mode with LILO or another bootloader as well, just do a quick google.
 
Old 10-15-2008, 12:39 PM   #5
tim914
Member
 
Registered: Apr 2005
Location: Scottsdale, AZ USA
Distribution: Most of them :-)
Posts: 37

Rep: Reputation: 15
Exclamation That's a lot of work...

Quote:
Originally Posted by openSauce View Post
  • At the GRUB menu, select the menu entry for your Linux install and type 'e' to edit the entry.
  • Select the line beginning with the word 'kernel' and type 'e' again to edit.
  • Add the word 'single' to the end of the line, hit enter, and type 'b' to boot.
And that's quicker than a simple remount?

Take the simple path...

mount -o remount,rw /

The filesystem is now mounted read/write and you can make any modifications required.
 
Old 10-15-2008, 12:49 PM   #6
openSauce
Member
 
Registered: Oct 2007
Distribution: Fedora, openSUSE
Posts: 252

Rep: Reputation: 39
Quote:
Originally Posted by tim914 View Post
Take the simple path...

mount -o remount,rw /

The filesystem is now mounted read/write and you can make any modifications required.
Er, oh yeah, oops. Do it tim's way
 
Old 10-15-2008, 01:03 PM   #7
tim914
Member
 
Registered: Apr 2005
Location: Scottsdale, AZ USA
Distribution: Most of them :-)
Posts: 37

Rep: Reputation: 15
Smile Sometimes, the obvious eludes us

Quote:
Originally Posted by openSauce View Post
Er, oh yeah, oops. Do it tim's way
I've sent myself down the rabbit hole more than once when the direct path was right in front of me :-)
 
Old 10-15-2008, 08:42 PM   #8
hu8mypho
LQ Newbie
 
Registered: Aug 2007
Posts: 2

Rep: Reputation: 0
check this out.
cat /etc/fstab
tuxfiles.org/linuxhelp/fstab.html
 
Old 10-16-2008, 07:19 AM   #9
yen_yang
LQ Newbie
 
Registered: Sep 2008
Posts: 8

Rep: Reputation: 0
hi,
for hu8mypho
editing /etc/fstab will make your customization as a default setting for the system, and for security issues, you shouldn't make your mount wrof course not for the root user to do so here is an example :

/dev/sda4 /mnt/mnt-1 defaults 0 0

if you have a different character set you may add
",iocharset=utf8" just after defaults if you have another lang other than english.
for these two zeros they mean that no one can read write except the root user
 
Old 10-16-2008, 07:32 AM   #10
openSauce
Member
 
Registered: Oct 2007
Distribution: Fedora, openSUSE
Posts: 252

Rep: Reputation: 39
Quote:
Originally Posted by yen_yang View Post
for these two zeros they mean that no one can read write except the root user
Hi yen_yang, that's not what the two zeroes mean. From man fstab:

Quote:
The fifth field, (fs_freq), is used for these filesystems by the dump(8) command to determine which filesystems need to be dumped.
If the fifth field is not present, a value of zero is returned and dump will assume that the filesystem does not need to be dumped.

The sixth field, (fs_passno), is used by the fsck(8) program to determine the order in which filesystem checks are done at reboot
time. The root filesystem should be specified with a fs_passno of 1, and other filesystems should have a fs_passno of 2. Filesys-
tems within a drive will be checked sequentially, but filesystems on different drives will be checked at the same time to utilize
parallelism available in the hardware. If the sixth field is not present or zero, a value of zero is returned and fsck will assume
that the filesystem does not need to be checked.
You can't set the user/group/other permission bits from fstab, except in the case of a filesystem which doesn't support permission bits (in which case you can set a mask applying to all files) - presumably this doesn't apply to the OP's / filesystem. You can set ro/rw settings for all users, but the OP had the ro setting in a different file.
 
Old 10-16-2008, 12:49 PM   #11
hu8mypho
LQ Newbie
 
Registered: Aug 2007
Posts: 2

Rep: Reputation: 0
My apologies, I assumed that user was root, and was just having difficulty with ro on boot. This suggested to me that the file system that was hung under /etc/sysconfig/<readonly> - mount point.

rather manually mount/umount, fstab could be a permanent solution if truly intended for r/w.
 
Old 10-16-2008, 11:55 PM   #12
yen_yang
LQ Newbie
 
Registered: Sep 2008
Posts: 8

Rep: Reputation: 0
hi OpenSauce, i do aplogize for that mistake, and thanx so much for your clarification, i think i should have meant the umask values added after defaults
 
Old 06-30-2017, 05:57 AM   #13
EdN
Member
 
Registered: Jun 2009
Location: Temecula, CA
Distribution: Fedora 19
Posts: 38

Rep: Reputation: 0
tim914:

Currently my filesystem is mounted as indicated in the following output from the mount command:

/dev/sda3 on /run/media/enowak/Seagate_2TB-1 type fuseblk (ro,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper= udisks2)

I did as you suggested by issuing the following command:

sudo mount -o remount,rw /dev/sda3

I then issued the mount command and got:

/dev/sda3 on /run/media/enowak/Seagate_2TB-1 type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper= udisks2)

ro got changed to rw. I thought this would do the trick.
Unfortunately I still can't create a new file in the filesystem Seagate_2TB-1.
For example I created a file with LibreOffice Writer and tried to save it in Seagate_2TB-1.
I got the following error message:

Error saving the document Untitled 1:
/run/media/enowak/Seagate_2TB-1/Miscellaneous/Untitled 1.odt does not exist.

There must be some other options besides ro that have to be changed.

Quote:
Originally Posted by tim914 View Post
Have you tried:

mount -o remount,rw /mountpoint

Last edited by EdN; 06-30-2017 at 06:16 AM. Reason: posted in wrong place
 
  


Reply

Tags
filesystem, mount, readonly, remount


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
How can I have: Root has Read-Write, user has read only for the boot filesystem? xmrkite Linux - Software 6 10-16-2008 04:31 AM
External hard-drive - readonly, can't make it read/write mooseman Linux - Hardware 3 05-18-2007 02:27 AM
ext3 filesystem read/write in xp babysparrow Linux - General 18 11-29-2006 02:03 PM
how do I change the filesystem from read-only to read-write? les_chow Linux - Newbie 5 05-26-2004 03:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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