You are not logged in.
Pages: 1
In a sleepy mood I erroneously edited the /etc/fstab file and commented out the root file system and swap file system lines. Hence the system booted after a long time with HAL. The file /etc/fstab is read-only and I don't know how to edit it. I tried chmod u+rwx but I could not change the read-only attribute.
Even pppoe-start does not work.
Linux learner and admirer - ALWAYS
Regd Linux User : 431318
Offline
If you have root:
$ su
# vi /etc/fstab
And, to save it, use :x!, rather than :x, and it will save even if it is readonly.
/etc/sudoers is readonly too, and thats how i write to it.
Offline
I was going to suggest booting using some liveCD and mounting the root partition to edit it, though falkman's description should work to if :x! works the way he said (I'm wasn't familiar with using :x in vim).
/etc/sudoers is readonly too, and thats how i write to it.
The reason /etc/sudoers is read only is that it's meant to be written using visudo. This will check to make sure you don't mess something up when editing it.
Offline
In a sleepy mood I erroneously edited the /etc/fstab file and commented out the root file system and swap file system lines. Hence the system booted after a long time with HAL. The file /etc/fstab is read-only and I don't know how to edit it. I tried chmod u+rwx but I could not change the read-only attribute.
Even pppoe-start does not work.
was it file permissions that prevented writing, or was the file system mounted read-only?
if it's the former, then using sudo or a root login would let you fix your problems, as falkman and mcmillan have pointed out.
if it's the latter, then you can remount the filesystem read-write (which is an important thing to learn how to do, anyhow) with mount's options. 'man mount' will be your friend there.
[23:00:16] dr_kludge | i want to invent an olfactory human-computer interface, integrate it into the web standards, then produce my own forked browser.
[23:00:32] dr_kludge | can you guess what i'd call it?
[23:01:16] dr_kludge | nosilla.
[23:01:32] dr_kludge | i really should be going to bed. i'm giggling madly about that.
Offline
The problem is /etc/fstab is with a sticky bit and I don't know how to change this.
The :x! command in vi didn't work. The man page on mount baffles me. I tried "chmod" with 744 for /etc/fstab but it again mounts as read-only file.
I don't have the CD to boot.
Linux learner and admirer - ALWAYS
Regd Linux User : 431318
Offline
I don't have the CD to boot.
...
Any live CD or even the arch installer cd ?
Offline
The CD drive is out of order.
Linux learner and admirer - ALWAYS
Regd Linux User : 431318
Offline
Did you try to remount the filesystem as read write as kludge suggested? ..
Offline
The man page on mount baffles me. I tried "chmod" with 744 for /etc/fstab but it again mounts as read-only file.
I don't have the CD to boot.
man pages are not always the most new-user-friendly documents. but that's what google's for:
http://linux.about.com/od/embedded/l/blnewbie_toc.htm
specifically:
http://linux.about.com/od/linux101/l/blnewbie4_2_3.htm
also, to ease reading man pages, it's good to know you can search by hitting '/', entering a search string, and hitting <enter>. pressing 'n' will then jump to the next match.
try searching for 'read-write'.
one more thing. file *permissions*--set with chmod and chown--determine who can access a given file and how. *mount options* determine the set-up an entire tree within the filesystem once it is mounted. a read-write *filesystem* is a different thing from a read-write *file*. this is an important, basic distinction.
[23:00:16] dr_kludge | i want to invent an olfactory human-computer interface, integrate it into the web standards, then produce my own forked browser.
[23:00:32] dr_kludge | can you guess what i'd call it?
[23:01:16] dr_kludge | nosilla.
[23:01:32] dr_kludge | i really should be going to bed. i'm giggling madly about that.
Offline
The mount command works for block devices only . I couldn't use either mount or remount. Tried umask too but in vain. I don't know how to proceed further .
Linux learner and admirer - ALWAYS
Regd Linux User : 431318
Offline
Did you try remounting your root file system? Reread what kludge wrote and i hope you will find your solution
Offline
The mount command works for block devices only . I couldn't use either mount or remount. Tried umask too but in vain. I don't know how to proceed further .
um. that thing that mounts on /? /dev/sda3 or whatever? yeah, that's a block device, unless you're doing something very strange.
no actual output to read, nor your /etc/fstab. there seems to be a fundamental misunderstanding, or a fundamental language barrier. i don't know how to proceed further.
[23:00:16] dr_kludge | i want to invent an olfactory human-computer interface, integrate it into the web standards, then produce my own forked browser.
[23:00:32] dr_kludge | can you guess what i'd call it?
[23:01:16] dr_kludge | nosilla.
[23:01:32] dr_kludge | i really should be going to bed. i'm giggling madly about that.
Offline
At last settled the issue by using Nimblex live CD and edited the /etc/fstab file.
Of course my problem is solved but I am not satisfied with the method.
Had I found a way out to change the read-only attribute of /etc/fstab file I would have been happier.
Anyhow thanks for you friends for all your help and kindness.
Linux learner and admirer - ALWAYS
Regd Linux User : 431318
Offline
Pages: 1