You are not logged in.

#1 2009-01-23 13:55:52

varaahan
Member
From: Chennai , India
Registered: 2006-05-29
Posts: 145

Booting problem

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

#2 2009-01-23 14:04:37

falkman
Member
Registered: 2009-01-01
Posts: 7

Re: Booting problem

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

#3 2009-01-23 16:20:37

mcmillan
Member
Registered: 2006-04-06
Posts: 737

Re: Booting problem

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

#4 2009-01-23 18:20:13

kludge
Member
Registered: 2008-08-03
Posts: 294

Re: Booting problem

varaahan wrote:

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

#5 2009-01-28 11:46:49

varaahan
Member
From: Chennai , India
Registered: 2006-05-29
Posts: 145

Re: Booting problem

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

#6 2009-01-28 13:18:19

u_no_hu
Member
Registered: 2008-06-15
Posts: 453

Re: Booting problem

I don't have the CD to boot.

...
Any live CD or even the arch installer cd ?


Don't be a HELP VAMPIRE. Please search before you ask.

Subscribe to The Arch Daily News.

Offline

#7 2009-01-28 14:22:40

varaahan
Member
From: Chennai , India
Registered: 2006-05-29
Posts: 145

Re: Booting problem

The CD drive is out of order.


Linux learner and admirer - ALWAYS
Regd Linux User : 431318

Offline

#8 2009-01-28 15:25:14

u_no_hu
Member
Registered: 2008-06-15
Posts: 453

Re: Booting problem

Did you try to remount the filesystem as read write as kludge suggested? ..


Don't be a HELP VAMPIRE. Please search before you ask.

Subscribe to The Arch Daily News.

Offline

#9 2009-01-28 20:19:41

kludge
Member
Registered: 2008-08-03
Posts: 294

Re: Booting problem

varaahan wrote:

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

#10 2009-02-01 09:35:07

varaahan
Member
From: Chennai , India
Registered: 2006-05-29
Posts: 145

Re: Booting problem

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

#11 2009-02-01 11:01:40

u_no_hu
Member
Registered: 2008-06-15
Posts: 453

Re: Booting problem

Did you try remounting your root file system? Reread what kludge wrote and i hope you will find your solution


Don't be a HELP VAMPIRE. Please search before you ask.

Subscribe to The Arch Daily News.

Offline

#12 2009-02-01 15:06:33

kludge
Member
Registered: 2008-08-03
Posts: 294

Re: Booting problem

varaahan wrote:

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

#13 2009-02-02 13:03:49

varaahan
Member
From: Chennai , India
Registered: 2006-05-29
Posts: 145

Re: Booting problem

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

Board footer

Powered by FluxBB