Debian :: How To Log Bootup And Shutdown Messages (with Systemd)
Jun 23, 2015
During the boot-sequence of jessie there is more text flying by on the screen (including some errors or warnings) than I can read thorugh fast enough. I don't think this is very serious stuff, and if it were I could always look at dmesg and or syslog i /var/log but I would find it really convenient to log these messages in a file instead of sifting through or grep-ing dmesg.
When duckduckgoing this matter I found [URL] ....
I installed tried bootlogd but when configuring it to "yes" and rebooting nothing comes up in /var/log/boot.
Then I saw this line in above link
If you use systemd as your init system, you may need to use systemctl to debug boot problems.
After grub loads the kernel I'll get an on screen message from the console showing: cannot reserve MMIO region And I was wondering is there a way to silence console messages so you don't see them at bootup?
Could setting dmesg work:-nlevel Set the level at which logging of messages is done to the console. For example, -n 1 prevents all messages, expect panic messages, from appearing on the console.So typing at a term 'dmesg -n 1' will work?
I am at a loss trying to figure out the options to not show the scrolling boot messages during the boot-up of Clonezilla. Is there a way to have a loading splash screen or even have a static logo that is displayed during the boot process? I have my automated recovery method all ready to go short this one last feature. I have searched all over and am coming up empty on this one.
I didn't notice any relevant complaints regarding 11.2 in the archives. The bootup & shutdow may be different problems. Randomly my recent install boots up fine or hangs with a blank black screen. A Ctl Alt F2 gets me to a prompt. Startx returns a lockfile comment that X is already running.
From here I can shut 11.2 down and restart it OK. There must be a bootlog kept in /var somewhere. I haven't tried the non-automatic bootup. The shutdown randomly drops back to the logout screen. Usually a shutdown command from there will shut it down. Sometimes shutdown doesn't work, but restart will finish the shutdown.
My home desktop computer upgraded to Ubuntu Lucid Lynx 10.04 without any problems. However, after all was said and done, the boot up and shut down screens look like crap. They are all in terminal text, and without any graphics. I have attached pictures of what they look like. This can't be right. Is there a way I can set the system to use the proper graphics when booting up and shutting down? I like my computer to be pretty.
This is what it does for most of the boot process: boot1.jpg It does this just before the screen where I enter my password. boot2.jpg This is how it looks when it shuts down: shutdown.jpg
I have a problem where the resolution during bootup, shutdown, switching users, and the theme icons look very grainy & cheap. It might have started when I booted in failsafe graphics mode and after that, it never went away. Could be wrong about how it happened but is there a way to get out of failsafe mode? Or a way to reconfigure default, normal graphics?
When I shut down fedora 14, no messages are displayed. I commented out "rhgb quiet" to display the startup messages. How do I configure Fedora 14 to display the shutdown messages when shutting down?
During boot-up and shutdown of Fedora-14-x86_64-Live-Desktop.iso live USB, I just see some graphical stuff. What needs to be done so that the screen shows text messages about what's happening during boot-up and shutdown?
When my computer shuts down, I always get a long error message from the kernel. It's the very last thing the computer does and I can't even use the keyboard, since the system is halted. I wanted to read it more carefully (it's very long and doesn't fit the screen) and file a bug report against the kernel with it. But for that, I needed to save all that text in a file.
I have Lucid installed on two PCs. The PCs are identical except one uses the on-board Intel G33 video controller while the other has an nvidia 210 video card attached. The nvidia PC restarts/shuts down without showing any console text messages, however the Intel based PC has the following problem. The software on both machines is identical (except for the nvidia packages).
On restart or shutdown on the intel based PC plymouth gives way to a console for 2 or 3 seconds showing the following (none of which are errors as far as i know)...
Code: Broadcast Message from root@xyz-desktop (unknown) at 11:44 ... The System is going down for restart NOW! * Deactivating Swap ... * Unmounting weak filesystems ...
everytime I try to shutdown/reboot, it gets to the screen where it has the green/bold status messages on the side, but then it simply stops. The cursor doesn't blink, nothing happens...you could wait 10 minutes, and it would still be at that same screen. I don't know if I've described this well enough for anyone to understand, but I hope so! I don't have a camera, but if I did...I'd post a picture of where I mean...
But like I said, after getting to a certain, without actually shutting down, it simply stops and does absolutely nothing. This is rather inconvenient, and I'd like to find a solution to this if possible. EDIT: I'm sorry I didn't provide any hardware info, but I'm using Gnome...This didn't happen 100% of the time KDE like it does now though. (But it DID happen in KDE as well) I'm using OpenSUSE 11.2... I'll be back in a moment with hardware info, assuming it may aid in a solution.
I leave my system in suspend mode overnight and wake it up first thing in the morning. At 9:15 it will automatically run housekeeping scripts via cron and these are completed by 9:30. Some time later I will turn on the monitor and start work. Since moving from Wheezy to Jessie the system has switched off for no apparent reason. I checked the syslog and auth.log and found it completed all it's tasks at 9:30 then started shutting down at 9:35. Relevant extracts from these logs are attached ...
My OS is Jessie 64 bit with Cinnamon on a quite standard Gigabyte desktop with dual core intel processor, 4Gb RAM and SSD drive. It uses NVidia drivers and there were no unusual entries in x.org.log.
AUTH LOG May 21 09:36:15 michael systemd-logind[685]: System is powering down. May 21 09:36:15 michael gnome-keyring-daemon[1477]: g_dbus_connection_real_closed: Remote peer vanished with error: Underlying GIOStream returned 0 bytes on an async read (g-io-error-quark, 0). Exiting. May 21 09:36:15 michael lightdm: pam_unix(lightdm:session): session closed for user michael May 21 09:36:16 michael polkitd(authority=local): Unregistered Authentication Agent for unix-session:1 (system bus name :1.39, object path /org/gnome/PolicyKit1/AuthenticationAgent, locale en_AU.UTF-8) (disconnected from bus) May 21 09:36:16 michael sshd[680]: Received signal 15; terminating.
I was trying to install recent updates, but apt-get couldn't do this. Here's the output I got:
Code: Select all(Reading database ... 187979 files and directories currently installed.) Preparing to unpack .../udev_215-17+deb8u1_i386.deb ... Failed to execute operation: Connection reset by peer
Message from syslogd@debian-LAPTOP at Jun 6 14:56:49 ... kernel:[357720.299647] systemd[1]: segfault at b87cf92c ip b765e480 sp bf872e60 error 4 in systemd[b762f000+130000] Unpacking udev (215-17+deb8u1) over (215-17) ... Failed to execute operation: Activation of org.freedesktop.systemd1 timed out
[Code] ....
Now I can't continue upgrading because every time it tries to finish the previous update and fails to process udev.
I don't know if it's relevant, but while upgrading udev for the first time, my laptop switched to tty1 on its own. When I switched it back to graphic subsystem, it still was in process of upgrading udev or systemd and after all failed to finish.
When i login on localhost with pubkey-auth, i get the following in my log
Code: Select allSep 20 12:42:27 aldebaran sshd[19745]: Accepted publickey for root from 127.0.0.1 port 37520 ssh2: RSA 45:4e:27:4d:30:f5:3d:25:10:d0:92:88:53:77:1a:3b Sep 20 12:42:27 aldebaran sshd[19745]: pam_unix(sshd:session): session opened for user root by (uid=0) Sep 20 12:42:27 aldebaran systemd[19757]: pam_unix(systemd-user:session): session opened for user root by (uid=0) Sep 20 12:42:27 aldebaran systemd-logind[585]: New session 70 of user root. Sep 20 12:42:27 aldebaran systemd[19757]: Starting Paths.
I tried to set up my linux server with a specific script that can control my gameserver (mta). The thing is, I wanted to let this script be forced to start by the systemd, so I created a service called 'mtadef' (btw: same name as the user).
On macbook air 6.2, i've installed a Debian jessie mate DE, dual boot using refind. I'm currently fine-tuning it. I've made a script following powertop advice:
I upgraded my machine from Wheezy to Jessie, opted to not install systemd yet. When i try to upgrade kde-plasma-desktop, apt doesn't let me do it.
For some reason "libpam-systemd : Depends: systemd (= 215-17+deb8u1) but it is not installable"
Installing systemd-shim doesn't work. Libpam-systemd package site gives impression that you would be able to use systemd or systemd-shim.
Tried looking through changelog, but it didn't really give any hint.
At 215-6 there are just Code: Select allSwitch libpam-systemd dependencies to prefer systemd-shim over systemd-sysv, to implement the CTTE decision #746578. This is a no-op on systems which already have systemd-sysv installed, but will prevent installing that on upgrades. (Closes: #769747) Version of libpam-systemd that would be installed is "Candidate: 215-17+deb8u1"
When I first started running Jessie 8.1 I noticed that after the disk check the boot was quiet, ie. no messages to the terminal . However, something has happened and now when I boot the machine I get a verbose listing of all the processes being started. Is there a way to change it back to the way it was? In other words a quiet boot. The only thing I know of that has been 'anomalous' behavior is the other day when doing a mp4 to avi conversion, using avconv, I apparently had an over temp condition which closed my LXDE session and brought me to the login prompt. Don't know what other info one may need but feel free to ask for more, if necessary.
3 packets transmitted, 0 received, 100% packet loss, time 1999ms.Same result when using the standard Debian ntp time servers like "server 0.debian.pool.ntp.org iburst" in /etc/ntp.conf.
How to enable persistent logging with systemd? I find it really weird that all this machinery that is systemd doesn't store persistent logs, what if I'm trying to retrieve some information regarding previous boots?
For instance: I have random suspend issues, after rebooting the computer there's no trace left in the logs of what happened, and furthermore (at least in Jessie) I can no longer see a pm-suspend log.
So, at first it sounds like all you have to do is edit journald.conf setting #Storage=auto to "persistent" and create the /var/log/journal directory, but then reading here /usr/share/doc/systemd/README.Debian
Code: Select allEnabling persistent logging in journald =======================================
To enable persistent logging, create /var/log/journal and set up proper permissions:
There are two main reasons why I decided to not enable persistent logging just yet ....
We did get corrupt journal files in the past where the journal then no longer worked at all [1]. With volatile you can just reboot and have a clean state again. Admittedly, the journal has seen a lot of improvements in the mean time and hopefully is more robust, so this point is no longer true.
We still install rsyslog by default. That means we get store them twice. This is something we don't want to do atm.
I have SSD drives without SCT support, because of this I want to tune /sys/block/device-name/device/timeout in order to force mdadm put these drives offline. So, I can see my drive like this:
Where can I tune /sys/block/device-name/device/timeout from 30 to 7 sec only for these drive? I don't want to use rc.local.
Can I create right udev rules for it in /etc/udev/rules.d?
I want to avoid any conflict with /lib/udev/rules.d.
Code: Select all# udevadm monitor --environment --udev monitor will print the received events for: UDEV - the event which udev sends out after rule processing
A computer upgraded from 7.3 to 8.2 suffered a number of stability issues which were traced to systemd having replaced sysvinit in this version. Worst of these was that instead of shutting down it just cut the power instantly, causing disk corruption. Basically, from what I can find out, this systemd component seems like it works OK on a completely fresh install but causes multiple issues if it finds its way onto an updated system. I found some instructions on reinstating sysvinit, which cured the issues.
However, on attempting to install the Brasero CD/DVD app via synaptic, I notice that this will force reinstallation of systemd as a dependency, even though it's been locked-out of updates. Luckily I spotted this in time and cancelled. You really wonder why a CD writing app would need to do this. I certainly seems rather naughty for any desktop package to be changing system startup code in a manner which could break the OS.
At the moment I'm not sure if it's the only app which does this -although k3b seemingly does not. Any thoughts on this gotcha, and how to prevent a repeat, other than being extremely careful when installing anything?
a NAS running Debian that frequently (but not always) has two removable media attached,a Debian desktop that mounts the above NAS via sshfs,the aforementioned removable media are symlinked to the directory on tha NAS that is then mounted by the desktop.
What I'd like this setup to do is to immediately time out if mounts as unavailable. Instead, I only get the expected behaviour if the NAS is down (the ssh client takes about 3 seconds to do that); if it's up, the removable media automounts (they are symlinked to the directory shared with the desktop) seem to never time out, ever. This happens locally on the NAS as well, when ssh'ing to the NAS and trying to run `ls /media/Storage` or `ls /media/Backup`, these commands never return. It's as if systemd was ignoring the x-systemd.device-timeout setting on the NAS.
I find it highly interesting that despite both removable media being detached, only one is flagged as having a dependency failed. Both paths exhibit the hang behaviour, though.
What can I do to actually time out when the media are not there?
as far as I can see, there is currently no option to delete this files from within systemd facilities, is that correct?
Should they be deleted manually, or just left alone?
Apparently I can still read all older logs regardless of such reported corruption, using the journalctl --boot -n option.
EDIT:Another thing coming to mind is that this has been happening for me not only in Jessie but in every systemd-based distro that I've tried, once permanent logging is enabled: is that some kind of systemd bug?
I thought I'd have a go at putting back sysvinit to run the start up daemons, after I discovered that upgrading to jessie removed it and slapped on systemd.
I didn't have any problems at all with systemd, infact it was pure speed at start-up, but after some reading I thought I'd like to go back to usual start-up scripts.
What I did was to boot a Live Debian and mount and chroot into my Debian system, then I ran
On reboot, I hit a grub rescue prompt which says error: file not found.
Trying the methods to get that sorted out gets stuck with "unknown file system" after I use ls and ls(hd1,msdos2) -as well as other combinations - it only seems to work for a plugged in flash drive.
Then I chroot again and run update-grub and grub-install /dev/sdb but reboot still stops at grub rescue.
So I wonder, firstly, why replacing systemd mucked up grub. Then, besides re-install of systemd, how do I get a booting system?