Fixing stage install commands for systemd and fixed missing dracut command on initrd

This commit is contained in:
Eric Renfro 2024-08-05 13:21:27 -04:00
parent dbc8922d77
commit 5cd4866b69
Signed by: psi-jack
SSH key fingerprint: SHA256:1TKB8Z257L8EHK8GWNxKgMhD8a+FAR+f+j3nnlcuNVM

View file

@ -308,12 +308,14 @@ function stage_step() {
${cmd} rm -f /mnt/gentoo/etc/machine-id
fi
${cmd} arch-chroot /mnt/gentoo systemd-machine-id-setup
${cmd} arch-chroot /mnt/gentoo systemd-firstboot --prompt
${cmd} arch-chroot /mnt/gentoo systemctl preset-all --preset-mode=enable-only
${cmd} arch-chroot /mnt/gentoo emerge --sync
${cmd} arch-chroot /mnt/gentoo grub-install --efi-directory=/efi
#arch-chroot /mnt/gentoo dracut --host-only
while read -r rd; do
rd="$(basename "$rd")"
${cmd} arch-chroot --force "/boot/initramfs-${rd}.img" --kver "$rd"
${cmd} arch-chroot /mnt/gentoo dracut --force "/boot/initramfs-${rd}.img" --kver "$rd"
done < <(find /mnt/gentoo/lib/modules -mindepth 1 -maxdepth 1 -type d)
${cmd} arch-chroot /mnt/gentoo grub-mkconfig -o /boot/grub/grub.cfg
}