diff --git a/README.md b/README.md index 4a2dc1d..d6a5606 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,11 @@ My personal Arch install script. ## HOW-TO -Clone the script, edit the `config` file to match your preferences and run the -`install.sh` script. +Install git, clone the script, edit the `config` file to match your preferences +and run the `install.sh` script. ```bash +pacman -Sy git git clone https://git.maby.dev/ange/archinstall.git cd archinstall $EDITOR config diff --git a/install.sh b/install.sh index 2442baa..8875772 100755 --- a/install.sh +++ b/install.sh @@ -4,4 +4,5 @@ set -a . ./config set +a -./modules/"$install_type".sh +# cp chroot? +bash ./modules/"$install_type".sh diff --git a/modules/00-prechroot/10-disk.sh b/modules/00-prechroot/10-disk.sh index bd55562..e6dccac 100644 --- a/modules/00-prechroot/10-disk.sh +++ b/modules/00-prechroot/10-disk.sh @@ -10,15 +10,17 @@ boot=/dev/disk/by-partlabel/boot root=/dev/disk/by-partlabel/root [ -n "$disk_passwd" ] && { - echo "$disk_passwd" | cryptsetup luksFormat "$root" - - echo "$disk_passwd" | cryptsetup open "$root" cryptroot - + echo -n "$disk_passwd" | cryptsetup luksFormat "$root" - + cryptsetup open "$root" cryptroot - <<< "$disk_passwd" root=/dev/mapper/cryptroot } -mkfs.vfat -F32 "$boot" -mkfs.ext4 "$root" +sleep 2 # wait for /dev/disk/by-partlabel/ to be populated + +mkfs.fat -F32 "$boot" +mkfs.ext4 -F "$root" mount "$root" /mnt/ -mount -mo fmask=0077,dmask=0077 /dev/disk/by-partlabel/boot /mnt/boot/ +mount -m -o fmask=0077,dmask=0077 /dev/disk/by-partlabel/boot /mnt/boot/ [ -n "$swapfile" ] && { dd if=/dev/zero of=/mnt/swapfile bs=1M count="$swapfile" status=progress diff --git a/modules/00-prechroot/20-pkg.sh b/modules/00-prechroot/20-pkg.sh index 80a6978..7b38356 100644 --- a/modules/00-prechroot/20-pkg.sh +++ b/modules/00-prechroot/20-pkg.sh @@ -13,3 +13,5 @@ esac pacstrap -C rootfs/etc/pacman.conf -K /mnt/ \ base linux{,-lts,-firmware} "$shell" "${pkg[@]}" + +find /mnt/etc -name '*.pacnew' -delete diff --git a/modules/desktop.sh b/modules/desktop.sh index f526991..2afffd0 100644 --- a/modules/desktop.sh +++ b/modules/desktop.sh @@ -40,6 +40,6 @@ case "$(lspci | grep 'VGA\|3D')" in *) ;; esac -./modules/base.sh +bash ./modules/base.sh xdg-user-dirs-update diff --git a/modules/dwm.sh b/modules/dwm.sh index 58c719b..df4d6e4 100644 --- a/modules/dwm.sh +++ b/modules/dwm.sh @@ -22,7 +22,7 @@ case "$(lsmod)" in ;; esac -./modules/desktop.sh +bash ./modules/desktop.sh git clone --depth 1 https://git.maby.dev/ange/.dotfiles.git dotfiles -arch-chroot ./dotfiles/.config/suckless/update.sh +arch-chroot /mnt/ bash -x ./dotfiles/.config/suckless/update.sh