You are not logged in.
Pages: 1
After the recent initscripts upgrade, whenever I poweroff or reboot my EeePC 901, the root filesystem is not unmounted, and at reboot the disk is fscked.
Unmounting Filesystem [Fail]
Remounting Root Filesystem Read-only [Fail]
All of the daemons are successfully reported stopped (including Laptop-mode which I stop with a script in rc.local.shutdown when on battery: https://bbs.archlinux.org/viewtopic.php … 14#p930314).
The laptop is completely up-to-date. How would I go about diagnosing what is preventing the clean shutdown?
Offline
Try adding --verbose to the umount command in rc.shutdown maybe. Inserting `lsof <device>' after the umount might help too.
Also try booting into single-user mode and see if the problem persists. If not, try disabling daemons in steps in multi-user mode.
Last if the previous version of initscripts works, doing a diff against the current scripts should help identify the faulty code.
This silver ladybug at line 28...
Offline
Thanks for the suggestions lolilolicon. Oddly, --verbose and -v both have no effect.
Adding lsof /dev/blahblah does work, but outputs quite a bit of text that is quickly cleared as the machine shuts down. I have tried to redirect it to a file but, unsurprisingly, as nothing is mounted by that time, it errors with "can't locate unmount.txt..."
I'll keep fiddling around with it.
Offline
Sure.
# <file system> <dir> <type> <options> <dump> <pass>
devpts /dev/pts devpts defaults 0 0
shm /dev/shm tmpfs defaults 0 0
#/dev/cdrom /media/cd auto ro,user,noauto,unhide 0 0
#/dev/dvd /media/dvd auto ro,user,noauto,unhide 0 0
#/dev/fd0 /media/fl auto user,noauto 0 0
UUID=78b9738e-dd5b-4616-a6dc-1ca8c96e0209 / ext2 defaults,noatime 0 1
UUID=f1e7eedd-66e0-4e86-821d-f57b1fa2c0ca /home ext2 defaults,noatime 0 1
tmpfs /var/log tmpfs size=1M 0 0
Offline
I have the same problem. My fstab:
# <file system> <dir> <type> <options> <dump> <pass>
devpts /dev/pts devpts defaults 0 0
shm /dev/shm tmpfs nodev,nosuid 0 0
#/dev/cdrom /media/cd auto ro,user,noauto,unhide 0 0
#/dev/dvd /media/dvd auto ro,user,noauto,unhide 0 0
#/dev/fd0 /media/fl auto user,noauto 0 0
/dev/disk/by-label/boot /boot ext2 defaults 0 1
/dev/disk/by-label/linux / ext4 defaults,noatime 0 1
/dev/disk/by-label/home /home ext4 defaults,noatime 0 1
/dev/disk/by-label/swap swap swap defaults 0 0
Offline
Vieira: are you using laptop-mode-tools?
Offline
Sure.
# <file system> <dir> <type> <options> <dump> <pass> devpts /dev/pts devpts defaults 0 0 shm /dev/shm tmpfs defaults 0 0 #/dev/cdrom /media/cd auto ro,user,noauto,unhide 0 0 #/dev/dvd /media/dvd auto ro,user,noauto,unhide 0 0 #/dev/fd0 /media/fl auto user,noauto 0 0 UUID=78b9738e-dd5b-4616-a6dc-1ca8c96e0209 / ext2 defaults,noatime 0 1 UUID=f1e7eedd-66e0-4e86-821d-f57b1fa2c0ca /home ext2 defaults,noatime 0 1 tmpfs /var/log tmpfs size=1M 0 0
Hmm, nothing at all stands out here, and we we explicitly don't unmount API filesystems or anything else mounted on a RAM based FS. I'd be curious what's running right before the call to umount. Just before line 55 of /etc/rc.shutdown where everything is unmounted, can you stick in a call to ps and lsof?
/bin/ps aux > /ps.out; /usr/sbin/lsof > /lsof.out
Unrelated -- you don't need those /dev/{pts,shm} entries anymore. They're mounted by /etc/rc.sysinit. Also, your home should have a passno of 2, not 1, meaning fsck it after root. (reference fstab(5)).
Offline
Vieira: are you using laptop-mode-tools?
Yes, I am. I will try disabling it and report what happens.
EDIT: With !laptop-mode in rc.conf it works fine.
EDIT2: If you don't disable it but instead run sudo /etc/rc.d/laptop-mode stop before shutting down it also works fine.
EDIT3: As a temporary workaround I'm using this in /etc/rc.local.shutdown (without sleep it still fails)
/etc/rc.d/laptop-mode stop
sleep 1
Last edited by Vieira (2011-08-08 01:36:56)
Offline
I'd be curious what's running right before the call to umount. Just before line 55 of /etc/rc.shutdown where everything is unmounted, can you stick in a call to ps and lsof?
Thanks Dave.
lsof.out: http://paste.pocoo.org/show/454616/
ps.out: http://paste.pocoo.org/show/454618/
I have since updated to 3.0 (and this included a laptop-mode-tools update): from the 6 or so reboots I have done, I can now only reproduce the failure if I only boot into (and remain in TTY), if I start X, then the filesystems are unmounted cleanly.
Unrelated -- you don't need those /dev/{pts,shm} entries anymore. They're mounted by /etc/rc.sysinit. Also, your home should have a passno of 2, not 1, meaning fsck it after root. (reference fstab(5)).
Thanks for the tip!
Offline
root 1672 0.0 0.0 3480 676 ? S 21:15 0:00 /bin/sh /usr/sbin/laptop_mode stop
root 1673 2.0 0.0 3596 1288 ? S 21:15 0:00 /bin/sh /usr/sbin/laptop_mode stop
root 2063 0.0 0.0 3596 728 ? S 21:15 0:00 /bin/sh /usr/sbin/laptop_mode stop
So you stop laptop_mode in rc.local.shutdown, right? It looks the command runs in the background and takes a little long to finish.
The reason why shutting down from X hides the problem is there are more programs to kill, thus more time for laptop_mode to stop.
Correct me if I'm wrong.
Edit:
* If this is the case, would it be correct to file a bug for laptop-mode?
* Would adding -l flag to the umount command be a good idea? (I think not...)
Last edited by lolilolicon (2011-08-08 09:55:46)
This silver ladybug at line 28...
Offline
So you stop laptop_mode in rc.local.shutdown, right? It looks the command runs in the background and takes a little long to finish.
The reason why shutting down from X hides the problem is there are more programs to kill, thus more time for laptop_mode to stop.
Correct me if I'm wrong.
No: I think you are right on the money
So I just need to kill it manually when in TTY.
Vieira, if you can confirm, I'll report this to the LMT ML.
Offline
Offline
lolilolicon wrote:So you stop laptop_mode in rc.local.shutdown, right? It looks the command runs in the background and takes a little long to finish.
The reason why shutting down from X hides the problem is there are more programs to kill, thus more time for laptop_mode to stop.
Correct me if I'm wrong.No: I think you are right on the money :)
So I just need to kill it manually when in TTY.
Vieira, if you can confirm, I'll report this to the LMT ML.
I always need to stop it otherwise it fails. Even with /etc/rc.d/laptop-mode stop in rc.local.shutdown it fails if I don't put a sleep 1 after that. I think lolilolicon is right.
Last edited by Vieira (2011-08-08 15:19:02)
Offline
This is bad behavior in initscripts as far as I can tell. We're supposed to wait for everything to exit before proceeding to unmount/remount. That's clearly not happening here.
Could this be the cause of my unmounting failure as well?
I'm going to assume it is, and post the output of the ps and lsof commands you suggested over there. Please take a look!
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
This is bad behavior in initscripts as far as I can tell. We're supposed to wait for everything to exit before proceeding to unmount/remount. That's clearly not happening here.
Is that an invitation to file a bug report?
Offline
Offline
That's what I love about this distro: you get exactly what it says on the box...
Offline
To fix error you can disable mount options (CONTROL_MOUNT_OPTIONS=0) in /etc/laptop-mode/laptop-mode.conf
Offline
To fix error you can disable mount options (CONTROL_MOUNT_OPTIONS=0) in /etc/laptop-mode/laptop-mode.conf
This doesn't work for me.
Offline
It worked for me. I disable CONTROL_MOUNT_OPTIONS and added noatime to root partition options in /etc/fstab (its basicly the same thing laptop-mode does).
Offline
I've just encountered this problem on my netbook. I'm currently using Vieira's trick of telling laptop mode to stop in /etc/rc.local.shutdown. It seems to be an adequate fix for the moment. Hope this gets worked out soon.
Offline
jasonwryan wrote:Vieira: are you using laptop-mode-tools?
Yes, I am. I will try disabling it and report what happens.
EDIT: With !laptop-mode in rc.conf it works fine.
EDIT2: If you don't disable it but instead run sudo /etc/rc.d/laptop-mode stop before shutting down it also works fine.
EDIT3: As a temporary workaround I'm using this in /etc/rc.local.shutdown (without sleep it still fails)/etc/rc.d/laptop-mode stop sleep 1
Yep, with those two lines left in the file /etc/rc.local.shutdown. the umounting-fail problem is gone. thanks.
but as Vieira said, it is a workaround, hope the bug behind it can be fixed.
Offline
Another workaround is to set a hook at shutdown https://wiki.archlinux.org/index.php/Ar … stom_hooks.
In the 'shutdown_postkillall' hook, I've put a 'sleep 5'.
Offline
Pages: 1