Skip to main content
added 194 characters in body; edited title
Source Link
0xC0000022L
  • 17k
  • 27
  • 114
  • 182

Accessing a systemd jounraljournal of an offline systemd instance

TL;DR: how to access the systemd journal of an offline systemd instance.

So I am migrating some machines over to Ubuntu 16.04 now from the previous LTS version. This means everything is now based on systemd.

Normally I am bootstrapping my machines from a rescue disk of the same version I intend to install, using debootstrap. The reason for this is that for many of my machines I have to run a headless setup.

In a recent case, a machine I am supposed to prepare was booted for me by someone on a remote site, an SSH server was started and a user account configured such that I could log on. That machine had a screen, but due to setting an incompatible mode, the screen remained blank from the point where Ubuntu shows the splash screen. I solved this in the GRUB2 config meanwhile, but the point is, that it was also essentially a headless scenario.

So I set up the machine using debootstrap and tried to boot. The screen remained blank (and either way, I would not have seen the screen myself like in an actual headless installation).

Nothing happened, but the machine could be pinged, but SSH was evidently not running. Puzzling ...

When I rebooted the machine, I was faced with the task to access the systemd journal from the offline machine to figure out what went wrong. I.e. a journal of a systemd instance that wasn't running but of the same version as the one running.

Question: how can I access the systemd journal of a systemd instance that isn't currently running?

# systemd --version systemd 229 +PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN 

Accessing a systemd jounral of an offline systemd instance

TL;DR: how to access the systemd journal of an offline systemd instance.

So I am migrating some machines over to Ubuntu 16.04 now from the previous LTS version. This means everything is now based on systemd.

Normally I am bootstrapping my machines from a rescue disk of the same version I intend to install, using debootstrap. The reason for this is that for many of my machines I have to run a headless setup.

In a recent case, a machine I am supposed to prepare was booted for me by someone on a remote site, an SSH server was started and a user account configured such that I could log on. That machine had a screen, but due to setting an incompatible mode, the screen remained blank from the point where Ubuntu shows the splash screen. I solved this in the GRUB2 config meanwhile, but the point is, that it was also essentially a headless scenario.

So I set up the machine using debootstrap and tried to boot. The screen remained blank (and either way, I would not have seen the screen myself like in an actual headless installation).

Nothing happened, but the machine could be pinged, but SSH was evidently not running. Puzzling ...

When I rebooted the machine, I was faced with the task to access the systemd journal from the offline machine to figure out what went wrong. I.e. a journal of a systemd instance that wasn't running but of the same version as the one running.

Question: how can I access the systemd journal of a systemd instance that isn't currently running?

Accessing a systemd journal of an offline systemd instance

TL;DR: how to access the systemd journal of an offline systemd instance.

So I am migrating some machines over to Ubuntu 16.04 now from the previous LTS version. This means everything is now based on systemd.

Normally I am bootstrapping my machines from a rescue disk of the same version I intend to install, using debootstrap. The reason for this is that for many of my machines I have to run a headless setup.

In a recent case, a machine I am supposed to prepare was booted for me by someone on a remote site, an SSH server was started and a user account configured such that I could log on. That machine had a screen, but due to setting an incompatible mode, the screen remained blank from the point where Ubuntu shows the splash screen. I solved this in the GRUB2 config meanwhile, but the point is, that it was also essentially a headless scenario.

So I set up the machine using debootstrap and tried to boot. The screen remained blank (and either way, I would not have seen the screen myself like in an actual headless installation).

Nothing happened, but the machine could be pinged, but SSH was evidently not running. Puzzling ...

When I rebooted the machine, I was faced with the task to access the systemd journal from the offline machine to figure out what went wrong. I.e. a journal of a systemd instance that wasn't running but of the same version as the one running.

Question: how can I access the systemd journal of a systemd instance that isn't currently running?

# systemd --version systemd 229 +PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN 
Source Link
0xC0000022L
  • 17k
  • 27
  • 114
  • 182

Accessing a systemd jounral of an offline systemd instance

TL;DR: how to access the systemd journal of an offline systemd instance.

So I am migrating some machines over to Ubuntu 16.04 now from the previous LTS version. This means everything is now based on systemd.

Normally I am bootstrapping my machines from a rescue disk of the same version I intend to install, using debootstrap. The reason for this is that for many of my machines I have to run a headless setup.

In a recent case, a machine I am supposed to prepare was booted for me by someone on a remote site, an SSH server was started and a user account configured such that I could log on. That machine had a screen, but due to setting an incompatible mode, the screen remained blank from the point where Ubuntu shows the splash screen. I solved this in the GRUB2 config meanwhile, but the point is, that it was also essentially a headless scenario.

So I set up the machine using debootstrap and tried to boot. The screen remained blank (and either way, I would not have seen the screen myself like in an actual headless installation).

Nothing happened, but the machine could be pinged, but SSH was evidently not running. Puzzling ...

When I rebooted the machine, I was faced with the task to access the systemd journal from the offline machine to figure out what went wrong. I.e. a journal of a systemd instance that wasn't running but of the same version as the one running.

Question: how can I access the systemd journal of a systemd instance that isn't currently running?