fix: bad hardcoded disk
This commit is contained in:
parent
76de231f73
commit
ed50d9f04e
7
base.sh
7
base.sh
@ -59,14 +59,17 @@ bootctl install
|
|||||||
root="$(findmnt -nr -o source /)"
|
root="$(findmnt -nr -o source /)"
|
||||||
cryptdev="$(cryptsetup status "$root" | grep device | awk '{print $2}' || true)"
|
cryptdev="$(cryptsetup status "$root" | grep device | awk '{print $2}' || true)"
|
||||||
if [ -n "$cryptdev" ]; then
|
if [ -n "$cryptdev" ]; then
|
||||||
uuid="$(blkid | grep /dev/nvme0n1p2 | awk '{print $2}')"
|
uuid="$(blkid | grep "$cryptdev" | awk '{print $2}')"
|
||||||
options="cryptdevice=$uuid:$(basename "$root") "
|
options="cryptdevice=$uuid:$(basename "$root") "
|
||||||
fi
|
fi
|
||||||
|
|
||||||
options="${options}root=$root"
|
options="${options}root=$root"
|
||||||
|
|
||||||
for f in /boot/loader/entries/*.conf; do
|
for f in /boot/loader/entries/*.conf; do
|
||||||
echo "options $options rw" >> "$f"
|
cat << EOF >> "$f"
|
||||||
|
initrd /$cpu-ucode.img
|
||||||
|
options $options rw
|
||||||
|
EOF
|
||||||
done
|
done
|
||||||
|
|
||||||
echo -e "${BOLD}${GREEN}DONE. You can install a desktop environment \
|
echo -e "${BOLD}${GREEN}DONE. You can install a desktop environment \
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
title Arch Linux (fallback)
|
title Arch Linux (fallback)
|
||||||
linux /vmlinuz-linux
|
linux /vmlinuz-linux
|
||||||
initrd /initramfs-linux-fallback.img
|
initrd /initramfs-linux-fallback.img
|
||||||
initrd /$cpu-ucode.img
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
title Arch Linux
|
title Arch Linux
|
||||||
linux /vmlinuz-linux
|
linux /vmlinuz-linux
|
||||||
initrd /initramfs-linux.img
|
initrd /initramfs-linux.img
|
||||||
initrd /$cpu-ucode.img
|
|
||||||
|
Loading…
Reference in New Issue
Block a user