Click to See Complete Forum and Search --> : fstab reset?!
aaronk42
08-30-2002, 08:15 AM
So here's a weird thing...I modify my fstab file so that I can access my Windows partition. All is well and good. It works just fine. But if I reboot, then fstab is mysteriously restored to its unmodified state. Why is this? How can I stop it? I'm getting a bit sick of adding a line to it every time I want to mount my Windows drive.
JohnT
08-30-2002, 08:54 AM
What application are you editing it in?
aaronk42
08-30-2002, 09:19 AM
Kate, usually. Although the choice of editor hasn't seemed to matter.
JohnT
08-30-2002, 09:31 AM
Do you have write permission? Are you "Saving As"?
aaronk42
08-30-2002, 11:23 AM
Yes. I have to be logged in as root to save fstab, I know. No, I'm not Sav[ing] As. So that's not the problem, either. I'm really rather stumped as to why this would be happening.
JohnT
08-30-2002, 11:27 AM
" No, I'm not Sav[ing] As."
Try it.
aaronk42
08-31-2002, 05:41 PM
I tried Save As rather than just Save. I don't know what difference it could possibly have made, but I tried it nonetheless.
It didn't work.
fstab is still being restored to its old state after reboot. Argh! :confused:
bwkaz
08-31-2002, 07:17 PM
After you edit it, open a terminal and (as root) do a chattr +i /etc/fstab. This sets the immutable bit on fstab, so that nothing, not even stuff done by root, can change it.
If you ever want to change it yourself, you can chattr -i /etc/fstab before editing it, and then +i it again afterwards.
My guess is that there's an init script running that's setting it back to something, but I don't know what's running or what it's setting it to. Setting immutable on that file should give you an error when the init script (or whatever) tries to change it.
justlinux.com
Copyright 2007 Jupitermedia Corporation All Rights Reserved.