0

After installing Ubuntu 22.04.3 with the option to manually choose the partitions (for dual boot reasons; I chose /boot on an 2 GB ext2 partition and / on an encrypted ext4 partition), systemd-resolved and systemd-timesyncd fail with a chdir error. Then user-space OOM killer, avahi-daemon, thermald, dbus, and rsyslog also fail to start during boot.

The thermald failure can be addressed by creating the group "power" in recovery mode.

The dbus and rsyslog startup failures seem to be the most serious ones that block user logins from starting up. Various things say they fail to connect to the system message bus socket, but it seems to exist on the file system, the problem seems to be that the dbus daemon didn't start.

The systemd-resolved and systemd-timesyncd failures suggest that the installer failed to set up some directories correctly. The "power" group / thermald failure suggests that the installer omitted some steps.

I tried installing 20.04.1, and got roughly the same failures. Installing on the same hardware with automatic partitioning (either whole disk or next to Windows) works (but the automatic options won't let me have encrypted Ubuntu partition next to Windows).

Is this failure mode known and how can it be resolved?

hsivonen
  • 2,627
  • Are you sure you only created two partitions, and not extra temporary ones? Can you post the systemctl "chdir error"? Mine have /proc/*/cwd -> / , so the error looks weird. Also consider using badblocks. Alternatively, it might be easier to reinstall unencrypted, and use either ecryptfs or cryptsetup-reencrypt from https://askubuntu.com/q/366749/1004020 – Daniel T Jan 28 '24 at 08:57
  • From sysctl status systemd-resolved.service, the error that I can see is just "(code=exited, status=200/CHDIR)". I don't know how to get more detail. – hsivonen Jan 28 '24 at 10:24
  • journalctl -b -0 -ru systemd-resolved. That is weird. What about cat /proc/mounts? – Daniel T Jan 28 '24 at 10:28
  • The only interesting thing that journalctl shows in addition to the same exit code as above is "Failed to connect stdout to the journal socket, ignoring: Permission denied". cat /proc/mounts shows only /boot and / as normal mounts. The rest is /dev, /sys, /proc stuff. – hsivonen Jan 28 '24 at 12:09
  • sudo chmod 755 / and sudo chown root:root /? – Daniel T Jan 28 '24 at 12:18

1 Answers1

0

The above failure mode arises if the file systems have been created previously (with Gnome Disks). To get a working system, one has to check the boxes to make the installer format (re-create the filesystems on) the pre-existing partitions even if they were of the appropriate-looking type to begin with.

(What a time sink. I wish the installer just refused to install onto a root filesystem it hasn't initialized itself.)

hsivonen
  • 2,627