System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

/etc/fstab corrupt - cannot boot

SOLVED
Go to solution
Ian Lochray
Respected Contributor

/etc/fstab corrupt - cannot boot

My /etc/fstab has been messed up. The "/" entry is wrong. My server will not boot up because of this. It goes into single-user mode with / mounted read-only.
I know what to change to fix the fstab but how can I edit it when the file system is read-only?
10 REPLIES
Steven Schweda
Honored Contributor

Re: /etc/fstab corrupt - cannot boot

Mount "/" manually (read-write) in
single-user mode?

Boot from a CD (escape from the usual OS
installation as soon as possible, create a
mount point where you can ("mkdir /tmp/a"?)
and mount the normal "/" file syatem
manually there)?
Ivan Ferreira
Honored Contributor

Re: /etc/fstab corrupt - cannot boot

You can use:

mount -u -o rw /
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Steven Schweda
Honored Contributor

Re: /etc/fstab corrupt - cannot boot

> mount -u -o rw /

But if

> The "/" entry is wrong

then you may need to specify a complete
parameter set in the "mount" command, no?
Ivan Ferreira
Honored Contributor
Solution

Re: /etc/fstab corrupt - cannot boot

Probably yes, in that case would be:

mount -u -o rw root_domain#root /
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Venkatesh BL
Honored Contributor

Re: /etc/fstab corrupt - cannot boot

1) Boot to single-user mode
2) Manual mount the root file-system.
3) Correct the fstab file.
4) Switch to multi-user mode.
Kapil Jha
Honored Contributor

Re: /etc/fstab corrupt - cannot boot

Venketesh,
I think as "/" entry is currupted boot in single usermode will not work
>>>bott -fl s

we will have to boot from CD as stevan said.
and then fix fstab.
Gurus,
Please stop me if m wrong.

BR,
Kapil
I am in this small bowl, I wane see the real world......
Steven Schweda
Honored Contributor

Re: /etc/fstab corrupt - cannot boot

> I think as "/" entry is currupted boot in
> single usermode will not work

But he said:

> It goes into single-user mode with /
> mounted read-only.

Apparently something is wrong with something,
but we can't see /etc/fstab, so we don't know
what, if anything, is actually wrong with it.
However, I'm willing (for now) to believe
that the system did boot into single-user
mode.
Venkatesh BL
Honored Contributor

Re: /etc/fstab corrupt - cannot boot

I have seen instances where, single user mode boot has shown '/' mounted by 'root_device' (RO mode).
Kapil Jha
Honored Contributor

Re: /etc/fstab corrupt - cannot boot

Thanks Stevan ,
I missed that line , Its bad :(
Well I think ur solution will work for sure.
And if Ian is using LSM in this system then he will have to boot from CD
start LSM manually
edit fstab
reboot.

BR,
Kapil
I am in this small bowl, I wane see the real world......
Ian Lochray
Respected Contributor

Re: /etc/fstab corrupt - cannot boot

mount -u -o rw root_domain#root /
That did the job. I was then able to edit the fstab and boot into multi-user mode.
Thanks for all the help.