Re: [systemd-devel] Error while trying to boot kernel

2022-12-08 Thread Nikolay Borisov




On 1.12.22 г. 18:40 ч., Michal Koutný wrote:

Hi.

On Sat, Nov 26, 2022 at 11:37:09PM +0200, Nikolay Borisov 
 wrote:

I'm booting it inside qemu but I use ubuntu to create the initrd, as can be 
seen from the
attached log everything works up until switch root has to happen and then I get 
a
SIGTERM and booting dies.


Why do you conclude it's SIGTERM?


You are of course you were right. The problem was rather more trivial...

Since the distro is based on RHEL9 and glibc was blowing because qemu 
wasn't advertising AVX-AES and this has become mandatory for RHEL9. I 
only figured this out when I used RHEL9's systemd as an init process and 
saw it was blowing in glibc while loading the initrd. Posting in case 
someone else runs into something similar...





[9.047894] Kernel panic - not syncing: Attempted to kill init! 
exitcode=0x7f00


This looks loke PID1 exited on its own volition with exit value 127.
I am not able to attribute it to anything in systemd.

Is the re-execed binary (/[usr/]lib/systemd) systemd at all? (Perhaps it
failed to find an executable at some stage, hence 127)

HTH,
Michal


Re: [systemd-devel] Error while trying to boot kernel

2022-12-01 Thread Michal Koutný
Hi.

On Sat, Nov 26, 2022 at 11:37:09PM +0200, Nikolay Borisov 
 wrote:
> I'm booting it inside qemu but I use ubuntu to create the initrd, as can be 
> seen from the
> attached log everything works up until switch root has to happen and then I 
> get a
> SIGTERM and booting dies.

Why do you conclude it's SIGTERM?

> [9.047894] Kernel panic - not syncing: Attempted to kill init! 
> exitcode=0x7f00

This looks loke PID1 exited on its own volition with exit value 127.
I am not able to attribute it to anything in systemd.

Is the re-execed binary (/[usr/]lib/systemd) systemd at all? (Perhaps it
failed to find an executable at some stage, hence 127)

HTH,
Michal


signature.asc
Description: Digital signature


[systemd-devel] Error while trying to boot kernel

2022-11-26 Thread Nikolay Borisov



Hello,

I'm trying to boot a custom kernel which is based off rhel9, the environment is 
a bit crazy.
I'm booting it inside qemu but I use ubuntu to create the initrd, as can be 
seen from the
attached log everything works up until switch root has to happen and then I get 
a
SIGTERM and booting dies. Kernel command line is:

systemd.log_level=debug systemd.log_target=console root=/dev/mapper/vhs-root 
rd.lvm.lv=vhs/root console=ttyS0

Systemd in initrd is:
systemd 249 (249.11-0ubuntu3.6)
+PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT +GNUTLS +OPENSSL 
+ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP 
+LIBFDISK +PCRE2 -PWQUALITY -P11KIT -QRENCODE +BZIP2 +LZ4 +XZ +ZLIB +ZSTD 
-XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified



initrd-switch-root.service: AssertPathExists=/etc/initrd-release succeeded.
Failed to read pids.max attribute of cgroup root, ignoring: No data available
initrd-switch-root.service: Passing 0 fds to service
initrd-switch-root.service: About to execute systemctl --no-block switch-root 
/sysroot
initrd-switch-root.service: Forked systemctl as 517
initrd-switch-root.service: Changed dead -> start
 Starting Switch Root...
Got cgroup empty notification for: 
/system.slice/initrd-udevadm-cleanup-db.service
initrd-switch-root.service: Executing: systemctl --no-block switch-root /sysroot
systemd-journald.service: Got notification message from PID 161 (FDSTORE=1)
systemd-journald.service: Added fd 11 (n/a) to fd store.
Bus private-bus-connection: changing state UNSET → OPENING
sd-bus: starting bus private-bus-connection on fds 15/15 (socket:[16383], 
socket:[16383])...
Bus private-bus-connection: changing state OPENING → AUTHENTICATING
Registering bus object implementation for path=/org/freedesktop/systemd1 
iface=org.freedesktop.systemd1.Manager
Registering bus object implementation for path=/org/freedesktop/systemd1/job 
iface=org.freedesktop.systemd1.Job
Registering bus object implementation for path=/org/freedesktop/systemd1/unit 
iface=org.freedesktop.systemd1.Unit
Registering bus object implementation for path=/org/freedesktop/systemd1/unit 
iface=org.freedesktop.systemd1.Automount
Registering bus object implementation for path=/org/freedesktop/systemd1/unit 
iface=org.freedesktop.systemd1.Device
Registering bus object implementation for path=/org/freedesktop/systemd1/unit 
iface=org.freedesktop.systemd1.Mount
Registering bus object implementation for path=/org/freedesktop/systemd1/unit 
iface=org.freedesktop.systemd1.Path
Registering bus object implementation for path=/org/freedesktop/systemd1/unit 
iface=org.freedesktop.systemd1.Scope
Registering bus object implementation for path=/org/freedesktop/systemd1/unit 
iface=org.freedesktop.systemd1.Service
Registering bus object implementation for path=/org/freedesktop/systemd1/unit 
iface=org.freedesktop.systemd1.Slice
Registering bus object implementation for path=/org/freedesktop/systemd1/unit 
iface=org.freedesktop.systemd1.Socket
Registering bus object implementation for path=/org/freedesktop/systemd1/unit 
iface=org.freedesktop.systemd1.Swap
Registering bus object implementation for path=/org/freedesktop/systemd1/unit 
iface=org.freedesktop.systemd1.Target
Registering bus object implementation for path=/org/freedesktop/systemd1/unit 
iface=org.freedesktop.systemd1.Timer
Registering bus object implementation for path=/org/freedesktop/LogControl1 
iface=org.freedesktop.LogControl1
Accepted new private connection.
Bus private-bus-connection: changing state AUTHENTICATING → RUNNING
Got message type=method_call sender=n/a destination=org.freedesktop.systemd1 
path=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager 
member=SwitchRoot cookie=1 reply_cookie=0 signature=ss error-name=n/a 
error-message=n/a
Sent message type=method_return sender=org.freedesktop.systemd1 destination=n/a 
path=n/a interface=n/a member=n/a cookie=1 reply_cookie=1 signature=n/a 
error-name=n/a error-message=n/a
Serializing systemd-state to memfd.
Bus private-bus-connection: changing state RUNNING → CLOSING
Failed to send reloading signal: Connection reset by peer
-.mount: not serializing before switch-root
tmp.mount: not serializing before switch-root
sysroot.mount: not serializing before switch-root
sys-fs-fuse-connections.mount: not serializing before switch-root
Switching root.
systemd-journald.service: Releasing resources.
systemd-journald.service: Releasing all stored fds
Bus private-bus-connection: changing state CLOSING → CLOSED
[9.047894] Kernel panic - not syncing: Attempted to kill init! 
exitcode=0x7f00
[9.048468] CPU: 2 PID: 1 Comm: systemd ve: / Not tainted 
5.14.0-70.22.1.ovz9.17.8-default #9 ovz9.17.8
[9.049149] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 
1.15.0-1 04/01/2014
[9.049905] Call Trace:
[9.050146]  dump_stack_lvl+0x45/0x59
[9.050412]  panic+0x10f/0x2c4
[9.050653]  do_exit.cold+0x67/0xad
[9.051256]