diff --git a/src/archlabs-installer b/src/archlabs-installer index 6e15fa7..70904c3 100755 --- a/src/archlabs-installer +++ b/src/archlabs-installer @@ -10,7 +10,7 @@ # immutable globals -readonly VER="1.7.30" # Installer version +readonly VER="1.7.33" # Installer version readonly DIST="ArchLabs" # Linux distributor readonly MNT="/mnt" # Install mountpoint readonly ERR="/tmp/errlog" # Built-in error log @@ -32,7 +32,7 @@ main() tput civis SELECTED=$(dialog --cr-wrap --stdout --backtitle "$BT" \ --title " $_PrepTitle " --default-item $SELECTED \ - --menu "$_PrepBody" 0 0 0 \ + --cancel-label "Exit" --menu "$_PrepBody" 0 0 0 \ "1" "$_PrepShowDev" "2" "$_PrepParts" \ "3" "$_PrepLUKS" "4" "$_PrepLVM" \ "5" "$_PrepMount" "6" "$_PrepConfig" \ diff --git a/src/lib/boot.sh b/src/lib/boot.sh index cad9142..93fe8ea 100644 --- a/src/lib/boot.sh +++ b/src/lib/boot.sh @@ -34,13 +34,32 @@ prep_for_grub() local cfg="$MNT/etc/default/grub" sed -i "s/GRUB_DISTRIBUTOR=.*/GRUB_DISTRIBUTOR=\"${DIST}\"/g; s/GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"\"/g" $cfg + if [[ $LUKS_DEV ]]; then sed -i "s~#GRUB_ENABLE_CRYPTODISK~GRUB_ENABLE_CRYPTODISK~g; s~GRUB_CMDLINE_LINUX=.*~GRUB_CMDLINE_LINUX=\"${LUKS_DEV}\"~g" $cfg fi + if [[ $SYS == 'BIOS' && $LVM && $SEPERATE_BOOT == false ]]; then sed -i "s/GRUB_PRELOAD_MODULES=.*/GRUB_PRELOAD_MODULES=\"lvm\"/g" $cfg fi + + if [[ $SYS == 'UEFI' ]]; then + # needed for os-prober module to work properly in the chroot + mkdir -p /run/lvm + mkdir -p /run/udev + mkdir -p $MNT/hostrun/lvm + mkdir -p $MNT/hostrun/udev + mount --bind /run/lvm $MNT/hostrun/lvm + mount --bind /run/udev $MNT/hostrun/udev + BCMDS[grub]="mkdir -p /run/udev; mkdir -p /run/lvm; \ + mount --bind /hostrun/udev /run/udev; \ + mount --bind /hostrun/lvm /run/lvm; \ + ${BCMDS[grub]}; \ + umount /run/udev; \ + umount /run/lvm" + fi + return 0 } @@ -138,10 +157,13 @@ install_bootloader() # install/setup the bootloader by running the BCMD (boot command) printf "\nInstalling and setting up $BOOTLDR in ${BMNTS[$SYS-$BOOTLDR]}\n\n" - mkdir -p $MNT/{hostrun,run/udev} - mount --bind /run $MNT/hostrun - chrun "mount --bind /hostrun/lvm /run/lvm; mount --bind /hostrun/udev /run/udev ${BCMDS[$BOOTLDR]}; umount /run/lvm; umount /run/udev" - echeck "${BCMDS[$BOOTLDR]}" + chrun "${BCMDS[$BOOTLDR]}" + + if [[ -d $MNT/hostrun ]]; then + umount $MNT/hostrun/lvm + umount $MNT/hostrun/udev + rm -rf $MNT/hostrun + fi # copy efi stub to generic catch all [[ $SYS == 'UEFI' && $BOOTLDR =~ (grub|syslinux) ]] && uefi_boot_fallback diff --git a/src/lib/install.sh b/src/lib/install.sh index e843122..f314897 100644 --- a/src/lib/install.sh +++ b/src/lib/install.sh @@ -9,7 +9,6 @@ # shellcheck disable=2153 readonly RUN="/run/archiso/bootmnt/arch/boot" -readonly SERVICE="$MNT/etc/systemd/system/getty@tty1.service.d" readonly VM="$(dmesg | grep -i "hypervisor")" install() @@ -57,7 +56,7 @@ install_base() { # compressed image? if [[ -e /run/archiso/sfs/airootfs/etc/skel ]]; then - printf "\n\nUnpacking base system --- Total: ~ 2.7G\n\n" + printf "\n\nUnpacking base system --- Total: ~ 2.6G\n\n" rsync -ah --info=progress2 /run/archiso/sfs/airootfs/ $MNT/ else # update the mirrorlist.. MUST be done before pacstrapping or it may be slow @@ -214,11 +213,11 @@ setup_xinit() # automatic startx for login shells local loginrc case $MYSHELL in - *bash) + "/bin/bash") loginrc=".bash_profile" rm -rf $MNT/home/$NEWUSER/.{z,mksh}* ;; - *mksh) + "/usr/bin/mksh") loginrc=".profile" rm -rf $MNT/home/$NEWUSER/.{z,bash}* cat >> $MNT/home/$NEWUSER/.mkshrc << EOF @@ -265,7 +264,7 @@ fi EOF else rm -rf $SERVICE - rm -rf $MNT/home/$NEWUSER/.{xinitrc,profile,zprofile,bash_profile} + rm -rf $MNT/home/$NEWUSER/.{profile,zprofile,bash_profile} fi } @@ -290,6 +289,7 @@ EOF login_manager() { + SERVICE="$MNT/etc/systemd/system/getty@tty1.service.d" # remove welcome message sed -i '/printf/d' $MNT/root/.zshrc diff --git a/src/lib/package.sh b/src/lib/package.sh index 2312dca..020d27d 100644 --- a/src/lib/package.sh +++ b/src/lib/package.sh @@ -16,7 +16,6 @@ declare -gA PKG_EXT=( [mpd]="mpc" [mupdf]="mupdf-tools" [qt5ct]="qt5-styleplugins" -# [steam]="steam-native-runtime" [zathura]="zathura-pdf-poppler" [cairo-dock]="cairo-dock-plug-ins" [noto-fonts]="noto-fonts-emoji"