diff options
| author | Craig Jennings <c@cjennings.net> | 2026-01-19 14:04:42 -0600 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-01-19 14:04:42 -0600 |
| commit | 305c0d470976e182eeb677b337cd4e650850a8fc (patch) | |
| tree | d61c4321ab638c0fe55624702baea72e64368932 /custom | |
| parent | 7ffc229b11fec27f05281b3b113596737155270d (diff) | |
| download | archangel-305c0d470976e182eeb677b337cd4e650850a8fc.tar.gz archangel-305c0d470976e182eeb677b337cd4e650850a8fc.zip | |
Fix journald on ZFS: wait for mounts, enable persistent storage
Diffstat (limited to 'custom')
| -rwxr-xr-x | custom/install-archzfs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/custom/install-archzfs b/custom/install-archzfs index 2c679a7..64e6dda 100755 --- a/custom/install-archzfs +++ b/custom/install-archzfs @@ -959,6 +959,23 @@ EOF arch-chroot /mnt pacman-key -r DDF7DB817396A49B2A2723F7403BD972F75D9D76 2>/dev/null || true arch-chroot /mnt pacman-key --lsign-key DDF7DB817396A49B2A2723F7403BD972F75D9D76 2>/dev/null || true + # Configure journald for ZFS + # Problem: journald starts before ZFS mounts /var/log, so journal files + # get created in tmpfs then hidden when ZFS mounts over it. + # Solution: Make journal-flush wait for zfs-mount, and enable persistent storage. + info "Configuring journald for ZFS..." + mkdir -p /mnt/etc/systemd/journald.conf.d + cat > /mnt/etc/systemd/journald.conf.d/persistent.conf << 'EOF' +[Journal] +Storage=persistent +EOF + + mkdir -p /mnt/etc/systemd/system/systemd-journal-flush.service.d + cat > /mnt/etc/systemd/system/systemd-journal-flush.service.d/zfs.conf << 'EOF' +[Unit] +After=zfs-mount.service +EOF + # Set root password info "Setting root password..." echo "root:$ROOT_PASSWORD" | arch-chroot /mnt chpasswd |
