11.04 hangs on reboot/shutdown
I have Kubuntu 11.04 as a result of upgrade from 10.04 -> 10.10 -> 11.04.
I also have clean install of Ubuntu 11.04. Following text is about my Kubuntu installation, but issue is the same for Ubuntu. Since I made an upgrade, it takes 5 munutes (300 seconds) for laptop to shutdown/reboot. Or I can use Power button of course. I have network drive mounted with CIFS and I suppose my issue is like this: https://bugs.launchpad.net/ubuntu/+s...ba/+bug/211631 I also found /etc/init.d/umountnfs.sh script with links to it in /etc/rc0.d and /etc/rc6.d. This script intended to do exactly what required - force unmounting of network drives during reboot/shutdown. I added couple of lines in that script (create a file in /tmp and put a string in this file) to check if it actually works. Looks like it does not. Can't understand why, because there are definitely links to this file (/etc/rc0.d/K15umountnfs.sh and /etc/rc6.d/K15umountnfs.sh) Has anybody had similar experience? Any solutions or suggestions? |
Have you taken a look at /var/log/messages ?
E. g. if something is crashing or waiting for some operation to complete, it might post a notification in there. You might then be able to trace any error reports or messages logged in /var/log/messages around shutdown time to whatever is causing the delay. It does sound like some form of timeout or wait state, and it might be in your samba shares not disconnecting. You might want to try a Code:
umount -l /mnt/mnt_name Might be completely OT, but is your system connected to the internet? If I, for example, on my Fedora 11 system, loose my connection, whole segments of my normal set of applications behave in exactly this way. Apparently there are many more connections made than I thought, e. g. emacs takes 5 minutes to start, mysqlcc takes 5 minutes, etc. I'm not sure if maybe you close or loose your connection, BEFORE the shutdown proceeds. Some processes or applications might then wait the entire connection timeout time to try and send or receive over the network connection, causing the long delay you are experiencing. (This one is a long shot, though...) |
Stefan,
I checked /var/log/messages and many other logs in /var/log Nothing conspicuous. If I watch 5 minutes at my screen, I see couple of lines flying on it just before it actually goes into reboot. But I could not catch these lines anywhere in /var/log. I forgot to mention that if I do umount /my/share, then reboot takes just couple of seconds. That's why I think the issue IS in samba share connection. This could be cured by script mentioned in my first post. If I run the script manually just before reboot, it helps. But for whatever reason script is not executed automatically. |
I seem to have the same/similar issue.
Recently I upgraded from 10.10 to 11.04 (downloaded and installed over pre-existing 10.10 HD install) and now on boot I only get a blank screen. I've left it sit for a good 5-10 minutes and nothing happens. Presumably I need to call up a terminal and try the umount -1 command mentioned above? How to I get terminal running when there is no icon for terminal or anything else for that matter on the screen? |
Quote:
|
cheers I guess I'll have to start a new thread!
|
Quote:
I suspect it might be as easy as editing a certain file in the Ubuntu config file tree and simply adding one line that does something like Code:
sh -f my_umount_script.sh Hope this helps! |
Quote:
|
Hmm... maybe it is getting executed concurrently?
Though that doesn't make sense, I'd think a shutdown script gets executed sequentially... |
Stefan, the point is that script is not executed at all. If you read my first post, it states
Quote:
|
After months of attempts to fix this, I've finally found one that works for Kubuntu 11.04 (Natty). The problem is that Kubuntu (and I believe KDE more generally) starts the shutdown process in a way different than Gnome/Ubuntu, so even the dbus / netbase fixes and using autofs that I've seen proposed in different forums all didn't work. I think KDE begins shutting down userspace functions like network manager first before the /etc/init scripts or /home/user/.kde/shutdown scripts are called upon. Just speculation on my part, but that'd be my guess.
But I apparently found the place where Kubuntu actually starts the shutdown process, or close to it - it's in the /usr/bin/starkde script. Immediately after the line saying "echo 'startkde: Shutting down...' 1>&2", I inserted a line saying "sudo umount -t cifs -a -f -l". Then, using visudo as root ("sudo visudo"), I edited the sudoers file to allow the sudo command to execute umount without a password by adding the line (at the bottom of the file) "username ALL=(root) NOPASSWD:/bin/umount". Worked like a charm. |
THANK YOU! This solution, editing starkde and sudoers, worked splendidly. I am kind of OCD when it comes to things running smoothly on my machine and this was driving me crazy. You have made my evening.
|
You're welcome! I searched high and low for the answer. By the way, I'm the same way about my machine - I like it to work.
|
All times are GMT -5. The time now is 05:23 AM. |