diff --git a/chscript.sh b/chscript.sh index 37c2a46..ac7d47d 100755 --- a/chscript.sh +++ b/chscript.sh @@ -20,21 +20,26 @@ echo "Blue password" passwd blue +echo "Does this build use EFI? [y/N]" +read efiCheck -# mkdir /boot/efi - -# mount /dev/sda1 /boot/efi - -# grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot/efi - -# grub-mkconfig -o /boot/grub/grub.cfg - -grub-install /dev/sda - -grub-mkconfig -o /boot/grub/grub.cfg +if [[ $efiCheck == y ]]; then + fdisk -l + echo "Enter the boot device name /dev/..." + read $bootdevice + mkdir /boot/efi + mount /dev/$bootdevice /boot/efi + grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot/efi + grub-mkconfig -o /boot/grub/grub.cfg +else + grub-install $(cat /proc/mounts|grep btrfs |grep ' / '|head -n 1|cut -f 1 -d ' ') + grub-mkconfig -o /boot/grub/grub.cfg +fi systemctl enable lightdm +systemctl enable NetworkManager.service +systemctl enable systemd-resolved cd /opt @@ -46,6 +51,4 @@ echo "blue ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers sudo -u blue makepkg -si -exit - -reboot \ No newline at end of file +exit \ No newline at end of file diff --git a/install.sh b/install.sh index 8f0497d..f477d2e 100755 --- a/install.sh +++ b/install.sh @@ -7,7 +7,7 @@ pacman -Syy -pacstrap /mnt base linux linux-firmware grub efibootmgr xorg leafpad vim git lxde lightdm lightdm-gtk-greeter lxde-common lxterminal lxsession openbox sudo base-devel go +pacstrap /mnt base linux linux-firmware grub efibootmgr xorg leafpad vim git lxde lightdm lightdm-gtk-greeter lxde-common lxterminal lxsession openbox sudo base-devel go nm-connection-editor networkmanager fdisk genfstab -U /mnt >> /mnt/etc/fstab