# hangs on remounting remaining filesystems readonly

## tilt

This problem has been bugging me for some time: When I shut down or reboot, the system hangs after "remounting remaining filesystems readonly". I've searched the forums, and this is not the usual APM problem. There is never an [OK] after that message. I've put some debug output in /etc/init.d/halt.sh to see what's going on. First, this is the script's problem part:

```
ebegin "Remounting remaining filesystems readonly"

# Get better results with a sync and sleep

sync; sync

sleep 1

if ! mount_readonly

then

        killall5 -9  &>/dev/null

        sync; sync    <----------------------- locks up here

        sleep 1

        if ! mount_readonly

        then

                eend 1

                sync; sync

                [ -f /etc/killpower ] && ups_kill_power

                /sbin/sulogin -t 10 /dev/console

        else

                eend 0

        fi

else

        eend 0

fi

```

I've found out that "mount_readonly" tries to unmount /var (which is on its own partition) first, succeeds, then tries to unmount / twice! Both times, mount returns a value of 32 (according to its man page that's a mount failure). The script then enters the if branch and hangs on the "sync; sync" line. The sleep command never gets executed.

The last time everything went fine was with gentoo-dev-sources 2.6.7. I've updated to 2.6.8 and the bug appeared, and now on 2.6.9 it's still there.

edit: shortened title

----------

## tilt

Hrm... seems I'm the only one with that problem   :Sad: 

I've figured out some more details, but don't have a solution yet. First, the reason given why / fails to remount is:

```
mount: / is busy
```

The halt.sh script gets the partitions it's supposed to remount from /proc/mounts. This is how my /proc/mounts looks at that point:

```
rootfs / rootfs rw 0 0

none /sys sysfs rw 0 0

none /proc/bus/usb usbfs rw 0 0

none /proc proc rw,nodiratime 0 0

none /dev/pts devpts rw 0 0

none /dev ramfs rw 0 0

/dev/root / reiserfs rw,noatime 0 0

/dev/hdb8 /var reiserfs ro 0 0
```

The first thing that strikes me are "rootfs" and "/dev/root". I've never seen those before. Seems like it has something to do with udev? (I'm running a udev-only system, latest udev ebuild installed).

Clues, anyone?   :Rolling Eyes: 

----------

## tilt

Seems like I've found the culprit. It isn't a kernel issue after all.

The problem won't appear if I don't start X (rc-config del xdm default).

If I start X, however, remounting the filesystem fails. A quick call of "ps auxf" revealed the (possible) culprit: bonobo-activation-server and evolution-data-server-1.0 are still running and are probably blocking the read-only remount.

Those two get killed by the "killall5" command in halt.sh, but then the system locks up at the "sync; sync" line (see 1st post).

So... still no solution to my problem, but at least some info to file a bug report. Can anyone of the mods please move this thread out of "Kernel & Hardware"?

----------

## tilt

Just to tie up this loose end: Bug report is here, and a workaround is to put 

```
killall evolution-data-server
```

into /etc/conf.d/local.stop

----------

## rhill

glad we could help.

 :Razz: 

----------

