Re: Most directories locked read-only: how to unlock them?
On Mon, Jan 16, 2006 at 07:42:38PM -0500, Ken Heard wrote:
> Thanks to Stural Holm Hansen and Steve Kemp for answering my post.
> Unfortunately I my problem is still not solved.
>
> I first tried Steve Kemp's suggestion, because it was the simpler,
> as it did not require use of a live CDROM. He warned me that the command
> "mount -n -o remount,rw /" might not work. It didn't. It returned
>
> EXT3-fs: Unrecognized mount option "drfaults" or missing value
> mount: / not mounted already, or bad option
>
> I then ran "mount -n -o remount,defaults,rw /" and "mount -n -o
> defaults,rw /". The first command returned the same result as above.
> The second returned:
>
> mount: /dev/mapper/SOL-root is already mounted or / busy
> mount: according to mtab, /dev/mapper/SOL-root is already
> mounted on /
If all else fails, you could try the following approach:
Copy /etc/fstab to /tmp/fstab and fix your "drfaults" typo in there.
Then patch a temporary copy of /bin/mount and libc.so to use /tmp/fstab
instead of /etc/fstab. To do so, create this little script, make it
executable, and run it as root:
#!/bin/sh
FSTAB=/tmp/fstab
LIBC=/lib/libc.so.6
perl -pe "s|/etc/fstab|$FSTAB|g" $LIBC >/tmp/libc.so.6
perl -pe "s|/etc/fstab|$FSTAB|g" /bin/mount >/tmp/mount
chmod +x /tmp/mount
export LD_PRELOAD=/tmp/libc.so.6
/tmp/mount -n -o remount,rw /
(I'm assuming you can still write in /tmp -- if not, you could of
course also use some other writable location, but make sure the length
of the string you then use in place of "/tmp/fstab" always is exactly
10 characters long.)
Use at your own risk!
Almut
Reply to: