[ubuntu-za] Restoring fstab from the command line

Weiers Coetser coetserw at hbc.ac.za
Sat Feb 17 08:02:52 GMT 2007


Robert Holm wrote:
> I had to make a change to fstab.
>
> I made a backup copy and did the change.
>
> Of course I got it wrong (don't even smile!) and when
> loading linux it left me on a command line.
>
> So I tried to copy my carefully made backup onto the
> current file and got "permission denied", and sudo is
> an unrecognised command.
>
> Is there a way I can get root privileges on this command
> line?
>
> Greetings to all.
>
> Robert
>
>
>
>   
Hi Robert,

I've been using Ubuntu since the Hoary version was released, and I must 
admit that these problems still get me stumped sometimes. I am not sure 
if you should take my input too seriously therefore:

1. Is there perhaps a faint possibility that you made an input syntax 
error when you used the "sudo cp /path/to/backup-fstab ..... command? I 
know I am a bit of a rookie, but I have not encountered a situation 
where sudo does not work. (I might be wrong).

2. Again... I am not sure how valid this is but I found that I do not 
have to reboot after I changed the fstab. I find that it is much safer 
to use the following two commands:  "sudo umount -a", and "sudo mount 
-a" in succession. This allows you to see if fstab works without 
rebooting. And if it does not work it should give you error messages and 
you would be able to fix it before the familiar environment around you 
disappears.

I hope you come right.

I think it is a psychological thing, but I feel very lost at the command 
line. The other day I did a kernel update and my xserver got broken (I 
had just installed the beta version of Nvidia drivers and Berryl). I had 
no idea how to re-install my nvidia drivers from the commandline - 
without having access to a written out "recipe"... So I just 
re-installed ubuntu (a much longer and more tedious approach.) I have a 
lot of sympathy with your situation.






More information about the ubuntu-za mailing list