Problem description
-------------------
I'm having problems getting my Redhat 7.2 [2.4.7-10] boot up process to
mount my / (root) partition read-write after performing a SysRq+Unmount
prior to rebooting with SysRq+reBoot. I believe it is an ext3 journal
related problem where the root partition is loading the journal and the
journal believes the partition was last mounted read-only (due to
SysRq+Unmount) and tries to mount it as read-only again during startup (and
remains read-only).
More info
---------
It all started when I had to reboot my computer after I was unable to
remount a hard-mounted NFS directory.
I decided to ``shutdown -r now'', which crashed the shutdown process when
attempting to kill rpc processes with an "unable to talk to rpc process or
portmapper" or similar error. So I decided to use my SysRq commands:
SysRq+Sync, SysRq+Unmount, SysRq+reBoot. All of the SysRq operations
returned "Ok" and the system cold booted on SysRq+reBoot.
When the system was starting up, I noticed all these "...: Read-only file
system" errors. eg:
----------------------------------------------------------------------------
--
/etc/rc.sysinit: /var/run/utmp: Read-only file system
touch: creating `/var/log/wtmp': Read-only file system
chmod: changing permissions of
`/var/run/
utmp': Read-only file system
chmod: changing permissions of `/var/log/wtmp': Read-
only file system
Enabling swap space: [ OK ]
/etc/rc.sysinit: /var/log/dmesg: Read-only file system
mv: cannot
move `/var/l
og/ksysms.5' to `/var/log/ksyms.6': Read-only file system
mv: cannot move
`/var/log/ksy
ms.4' to `/var/log/ksyms.5': Read-only file system
/etc/rc.sysinit:
/var/log/ksyms.0:
Read-only file system
touch: creating `/.autofsck':
Read-only f
ile system
----------------------------------------------------------------------------
----
and the bootup will crash at some stage eg. loading the Syslogger.
There were two solutions when I was tweaking for 2 hrs:
1)
The clue was gotten when I got into linux single mode, and checked what was
mounted and saw that the NFS directory was still listed. I gathered
/etc/mtab wasn't updated properly, so did a ``mount -a'' which didn't work.
I thought the journal was rolling back old data since mounting all
partitions read-only with SysRq+Unmount was the last thing that the journal
probably recorded, so I added the "noload" option to all my ext3 partitions
in /etc/fstab. This did the trick, and the system rebooted properly but
still gave 1 or 2 (instead of the dozens) of ": Read-only file system"
errors, but this time I was glad to get to the login prompt.
When I logged in, none of my other ext3 partitions were mounted, which
wasn't a big deal I installed linux on a single partition and the other
partitions were extras. I had to manually mount the others. I decided to
remove the "noload" entries from /etc/fstab and ``shutdown -r now''
properly, but got the same "... Read-only" problems during system boot.
2)
Boot into single user mode, ``mount -o remount,rw /dev/hda3 /'' and
_continue_ with bootup by exiting single user mode. Then manually remount
all the other partitions in /etc/fstab.
Question
--------
Is there a way to update the ext3 journal, or delete/reinitialize it ? Maybe
with debugfs ? I checked my partitions with dumpe2fs for any "read-only"
flags but didn't find any. I'm currently unable to perform unattended
reboots without either remounting the root partition (rw) in single user
mode, or with the "noload" option; which is undesirable as I need
journaling.
--
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug