From 7f43546f853e4ff6e14678a4c6d69cd9fc06c56c Mon Sep 17 00:00:00 2001 From: Tom Barrett Date: Sun, 22 Jan 2023 21:22:02 +0100 Subject: uuid didn't come up in chroot, fix vars from -e, new mkinitcpio hooks --- airootfs/root/bootstrap | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'airootfs/root/bootstrap') diff --git a/airootfs/root/bootstrap b/airootfs/root/bootstrap index 5bfcf11..4da3804 100755 --- a/airootfs/root/bootstrap +++ b/airootfs/root/bootstrap @@ -6,12 +6,12 @@ if ! timeout 1 curl -Is tombarrett.xyz | grep "200 OK" > /dev/null; then exit fi -if ! test -b "$1"; then +if ! test -b "${1:-}"; then echo "Please pass an existing drive as an argument. ie /dev/sda" exit fi -if [ -z "$2" ]; then +if [ -z "${2:-}" ]; then echo "Please pass a hostname also as the second argument." exit fi @@ -56,4 +56,5 @@ pacman-key --populate pacstrap /mnt base linux linux-firmware git vim grub efibootmgr arch-install-scripts networkmanager cp /root/.loader /mnt/root/loader -arch-chroot /mnt /root/loader "$1" "$2" "$ROOT_DIR" +UUID=$(lsblk --output UUID,PATH | grep "$ROOT_DIR" | cut -f 1 -d ' ') +arch-chroot /mnt /root/loader "$1" "$2" "$UUID" -- cgit v1.2.3