From 07d41cf83547a46f07585f6f64059f25baa2ff83 Mon Sep 17 00:00:00 2001 From: freenen Date: Wed, 25 Sep 2024 17:20:45 +0200 Subject: [PATCH] fix some bugs --- elfLaptop.sh | 8 +++----- gitconfig | 3 +++ in-root.sh | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 gitconfig diff --git a/elfLaptop.sh b/elfLaptop.sh index eb356c5..19e480b 100644 --- a/elfLaptop.sh +++ b/elfLaptop.sh @@ -29,7 +29,7 @@ echo echo === setup partitions echo -run "applly partion table" "sfdisk $DISK <<./sfdisk" +run "applly partion table" "sfdisk $DISK <./elfLaptop.sfdisk" echo -n "disk encryption password: " read -s PASS @@ -44,7 +44,7 @@ if [ "$PASS" != "$PASSRE" ]; then fi echo -run "format boot partition" "mkfs.fat ${DISK}1" +run "format boot partition" "mkfs.fat -F 32 ${DISK}1" run "format swap partition" "mkswap ${DISK}2" echo -n "$PASS" >keyfile.luks run "encrypt root partition" "cryptsetup luksFormat --batch-mode --key-file keyfile.luks ${DISK}3" "rm keyfile.luks" @@ -68,9 +68,7 @@ echo run "install base of arch" "pacstrap /mnt base linux linux-firmware grub efibootmgr" run "intall utitlities" "pacstrap /mnt btrfs-progs man vim" - -echo "generate fstab" -genfstab -U /mnt >>/mnt/etc/fstab +run "generate fstab" "genfstab -U /mnt >>/mnt/etc/fstab" run "copy in-root script" "cp in-root.sh /mnt/root" echo diff --git a/gitconfig b/gitconfig new file mode 100644 index 0000000..83e5a2a --- /dev/null +++ b/gitconfig @@ -0,0 +1,3 @@ +[user] + email = git@finnvanreenen.nl + name = freenen diff --git a/in-root.sh b/in-root.sh index 32608c5..0e07b7b 100644 --- a/in-root.sh +++ b/in-root.sh @@ -31,10 +31,10 @@ echo "127.0.0.1 localhost" >/etc/hosts echo "::1 localhost" >>/etc/hosts echo "127.0.1.1 $HOSTNAME" >>/etc/hosts -run "config initramfs" "sed --in-place -e 's/HOOKS=(.*)/HOOKS=(base udev autodetect keyboard keymap modconf block encrypt filesystems fsck)/' /etc/mkinitcpio.conf" +run "config initramfs" "sed --in-place -e 's/HOOKS=(.*)/HOOKS=(base udev autodetect microcode modconf kms keyboard block encrypt filesystems fsck)/' /etc/mkinitcpio.conf" run "generate initramfs" "mkinitcpio -P" -DISKUUID=$(blkid --output export ${DISK}10 | grep '^UUID' | sed 's/UUID=//') +DISKUUID=$(blkid --output export ${DISK}3 | grep '^UUID' | sed 's/UUID=//') run "run grub-install" "grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot" run "grub: enable crypt disk" "sed --in-place -E -e 's/#?GRUB_ENABLE_CRYPTODISK=(.*)/GRUB_ENABLE_CRYPTODISK=y/' /etc/default/grub" run "grub: crypt disk map" "sed --in-place -E -e 's/#?GRUB_CMDLINE_LINUX=\"(.*)\"/GRUB_CMDLINE_LINUX=\"\/dev\/disk\/by-uuid\/${DISKUUID}:cryptroot \1\"/' /etc/default/grub"