Where is log of shutdown?
This thread belongs to

2008-12-27 17:20 GMT   |   #1
I'm seeing something about sda2 being busy while shutting down but can't
catch it enough to read.
This must be logged somewhere, right?

Where can I find this log afterwards, during next run?

An unclean unmount obviously takes place because of that error and the
next boot says sda2 is not clean and checks it every time.

The sda2 is /home
Can I run something at shutdown to find out?

lsof +D /home shows a _lot_ of stuff of course but how to see what's
maybe left there when the system is trying to shut down?
2008-12-27 17:20 GMT   |   #2
Not if syslog has already been shutdown, as it should be, before the local
disks are unmounted.
2008-12-27 17:20 GMT   |   #3
Your best bet is to do a halt without a poweroff. No idea how to do
that these days. Used to be the default behavior in the past when doing
"sudo halt" with no parameters. The machine would just halt and all
messages are there to read. Dunno how to do that today though.
2008-12-27 21:20 GMT   |   #4
You might want to have a look at /var/log/boot.omsg. I think that might be
what you're looking for.
2008-12-28 07:20 GMT   |   #5
I think I've found the one who doesn't let go:/.xsession-errors

I can shut down without the unmounting problem if I go via runlevels 3,
sometimes it takes 1.

It's about X for sure. What, no idea.

I found that same errors occur on other machines but they don't cause
that unmount problem.

Can the shutdown procedure be tuned somewhere?
I'm thinking of giving more time for the pids to go down.

2008-12-28 09:20 GMT   |   #6
boot.omsg contains the previous boot's dmesg listing not a log of the
shutdown procedure.

Furthermore, if /var is on a separate partition, /var will have been
unmounted by the shutdown script that is under discussion, so anything
which writes to /var will have already been shutdown.
2008-12-28 19:20 GMT   |   #7
If I look at the files /var/log/boot.msg and /var/log/boot.omsg the first
shows the boot-up information and the latter shows the shutdown information.
The timestamp of the files also reflects this Or it does on my machine,
unless I'm missing something.
2008-12-28 23:20 GMT   |   #8
That's the first part of the boot sequence.
2008-12-29 03:20 GMT   |   #9
That being the case, why does it show process's shutting down. If it was
part of the boot I would have expected process's starting up. Here is a
section from mine.

Shutting down service kdm done
Shutting down cupsd done
Shutting down mail service (Postfix) done
Shutting down rpcbind done
Stopping VirtualBox kernel module done
Shutting down network time protocol daemon (NTPD) done
Shutting down acpid done
Shutting down syslog services done
Shutting down Avahi daemon done
Stopping Conexant HSF softmodem
Shutting down java.binfmt_misc done
2008-12-29 07:20 GMT   |   #10
After having a better look: You're right Smile

/var/log/boot.omsg contains the beginning of the boot sequence _and_ the
last shutdown while /var/log/boot.msg keeps the end of the boot

Still the error I see is not there because it happens at unmount.

I know now it's X now. And I have a laborous work around: First init 3 and
then shutdown.

I'm trying to see if that can be put in the shutdown script.