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 |
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.
|
|
10-15-2008, 08:11 AM
|
#1
|
LQ Newbie
Registered: Oct 2008
Location: New Delhi
Distribution: Redhat
Posts: 1
Rep:
|
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.
|
|
|
10-15-2008, 09:34 AM
|
#2
|
Member
Registered: May 2008
Distribution: Gentoo
Posts: 306
Rep:
|
Boot using a LiveCD, mount the partition and edit the file.
|
|
|
10-15-2008, 11:56 AM
|
#3
|
Member
Registered: Apr 2005
Location: Scottsdale, AZ USA
Distribution: Most of them :-)
Posts: 37
Rep:
|
Have you tried:
mount -o remount,rw /mountpoint
|
|
|
10-15-2008, 12:22 PM
|
#4
|
Member
Registered: Oct 2007
Distribution: Fedora, openSUSE
Posts: 252
Rep:
|
Quote:
Originally Posted by Total-MAdMaN
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.
|
|
|
10-15-2008, 12:39 PM
|
#5
|
Member
Registered: Apr 2005
Location: Scottsdale, AZ USA
Distribution: Most of them :-)
Posts: 37
Rep:
|
That's a lot of work...
Quote:
Originally Posted by openSauce
- 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.
|
|
|
10-15-2008, 12:49 PM
|
#6
|
Member
Registered: Oct 2007
Distribution: Fedora, openSUSE
Posts: 252
Rep:
|
Quote:
Originally Posted by tim914
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
|
|
|
10-15-2008, 01:03 PM
|
#7
|
Member
Registered: Apr 2005
Location: Scottsdale, AZ USA
Distribution: Most of them :-)
Posts: 37
Rep:
|
Sometimes, the obvious eludes us
Quote:
Originally Posted by openSauce
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 :-)
|
|
|
10-15-2008, 08:42 PM
|
#8
|
LQ Newbie
Registered: Aug 2007
Posts: 2
Rep:
|
check this out.
cat /etc/fstab
tuxfiles.org/linuxhelp/fstab.html
|
|
|
10-16-2008, 07:19 AM
|
#9
|
LQ Newbie
Registered: Sep 2008
Posts: 8
Rep:
|
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
|
|
|
10-16-2008, 07:32 AM
|
#10
|
Member
Registered: Oct 2007
Distribution: Fedora, openSUSE
Posts: 252
Rep:
|
Quote:
Originally Posted by yen_yang
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.
|
|
|
10-16-2008, 12:49 PM
|
#11
|
LQ Newbie
Registered: Aug 2007
Posts: 2
Rep:
|
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.
|
|
|
10-16-2008, 11:55 PM
|
#12
|
LQ Newbie
Registered: Sep 2008
Posts: 8
Rep:
|
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
|
|
|
06-30-2017, 05:57 AM
|
#13
|
Member
Registered: Jun 2009
Location: Temecula, CA
Distribution: Fedora 19
Posts: 38
Rep:
|
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
Have you tried:
mount -o remount,rw /mountpoint
|
Last edited by EdN; 06-30-2017 at 06:16 AM.
Reason: posted in wrong place
|
|
|
All times are GMT -5. The time now is 12:35 PM.
|
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
|
|