fix(repart): depend on sysroot-run mount

This commit is contained in:
Lars Sjöström 2025-03-04 12:16:49 +01:00
parent 10090a75b0
commit 83bb3599a4
No known key found for this signature in database
3 changed files with 11 additions and 3 deletions

View file

@ -12,7 +12,7 @@ find rootfs/ -type d -exec chmod 755 {} \;
# set default target to multi-user
ln -sf multi-user.target rootfs/usr/lib/systemd/system/default.target
# mount /etc overlay and patos state
# mount /etc overlay
ln -sf ../etc.mount rootfs/usr/lib/systemd/system/local-fs.target.wants/etc.mount
# enable dbus

View file

@ -21,6 +21,10 @@ ln -sf initrd.target ./usr/lib/systemd/system/default.target
mkdir ./usr/lib/systemd/system/systemd-repart.service.d
cat <<EOF > ./usr/lib/systemd/system/systemd-repart.service.d/override.conf
[Unit]
After=sysroot-run.mount
Requires=sysroot-run.mount
[Service]
ExecStart=systemd-repart --dry-run=no --generate-crypttab=/run/crypttab --generate-fstab=/run/fstab
EOF

View file

@ -39,9 +39,13 @@ cat <<EOF > $out/etc/issue
EOF
# replace agetty with busybox getty
sed -i 's#ExecStart=.*#ExecStart=-/sbin/getty -L %I 115200 vt100#' $out/usr/lib/systemd/system/serial-getty@.service
mkdir $out/usr/lib/systemd/system/serial-getty@.service.d
cat <<EOF > $out/usr/lib/systemd/system/serial-getty@.service.d/override.conf
[Service]
ExecStart=
ExecStart=-/sbin/getty -L %I 115200 vt100
EOF
sed -i 's#After=\(.*\)#After=sysroot.mount \1#' $out/usr/lib/systemd/system/systemd-repart.service
cat <<EOF > $out/etc/repart.d/10-esp.conf
[Partition]
Type=esp