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 | 3b51fa5a1880ba409e171bcc2444d80f4cfb8550 (patch) | |
| tree | 5cc706927f7f6af996688467dbc574e943546222 /custom/install-archzfs | |
| parent | 002fa3e2c1067fedd5aab356ef1e337f83da2232 (diff) | |
| download | archangel-3b51fa5a1880ba409e171bcc2444d80f4cfb8550.tar.gz archangel-3b51fa5a1880ba409e171bcc2444d80f4cfb8550.zip | |
Fix journald on ZFS: wait for mounts, enable persistent storage
Diffstat (limited to 'custom/install-archzfs')
| -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 |
