From 5593144e037542acb4a1d08dd76f20f62725ce95 Mon Sep 17 00:00:00 2001 From: Evan James Date: Thu, 27 Dec 2018 18:45:39 -0600 Subject: [PATCH 1/4] Non-block device support for filesystems check --- lib/util.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/util.sh b/lib/util.sh index 8a3c018..632a0a8 100644 --- a/lib/util.sh +++ b/lib/util.sh @@ -328,7 +328,7 @@ select_language() { CURR_LOCALE="uk_UA.UTF-8" KEYMAP="ua" fl="u" - + ;; *) clear && exit 0 ;; esac @@ -467,7 +467,7 @@ arch_chroot() { # Ensure that a partition is mounted check_mount() { - if [[ $(lsblk -o MOUNTPOINT | grep ${MOUNTPOINT}) == "" ]]; then + if [[ $(findmnt --list -o TARGET | grep ${MOUNTPOINT}) == "" ]]; then DIALOG " $_ErrTitle " --msgbox "\n$_ErrNoMount\n " 0 0 ANSWER=0 HIGHLIGHT=0 @@ -572,7 +572,7 @@ final_check() { } exit_done() { - if [[ $(lsblk -o MOUNTPOINT | grep ${MOUNTPOINT} 2>/dev/null) != "" ]]; then + if [[ $(findmnt --list -o TARGET | grep ${MOUNTPOINT} 2>/dev/null) != "" ]]; then final_check dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --yesno "$(printf "\n$_CloseInstBody\n$(cat ${CHECKLIST})\n ")" 20 40 if [[ $? -eq 0 ]]; then From 9efd36493625bb563d03028509a6fd25e845191d Mon Sep 17 00:00:00 2001 From: Chrysostomus Date: Tue, 1 Jan 2019 22:16:42 +0200 Subject: [PATCH 2/4] =?UTF-8?q?Check=20for=20the=20right=20grub=20name,=20?= =?UTF-8?q?do=CD=84n't=20use=20fsck=20with=20grub?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/util-base.sh | 13 +++++++++++-- lib/util.sh | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/util-base.sh b/lib/util-base.sh index d2f0f60..e3b7627 100644 --- a/lib/util-base.sh +++ b/lib/util-base.sh @@ -268,7 +268,7 @@ install_base() { # If root is on nilfs2 volume, amend mkinitcpio.conf [[ $(lsblk -lno FSTYPE,MOUNTPOINT | awk '/ \/mnt$/ {print $1}') == nilfs2 ]] && sed -e '/^HOOKS=/s/\ fsck//g' -i ${MOUNTPOINT}/etc/mkinitcpio.conf && \ check_for_error "root on nilfs2 volume. Amend mkinitcpio." - + recheck_luks # add luks and lvm hooks as needed @@ -334,7 +334,11 @@ install_grub_uefi() { else bootid="manjaro" fi - + # For quiet grub, remove fsck + if grep "^HOOKS" ${MOUNTPOINT}/etc/mkinitcpio.conf | grep -q fsck; then + sed -e '/^HOOKS=/s/\ fsck//g' -i ${MOUNTPOINT}/etc/mkinitcpio.conf + arch_chroot "mkinitcpio -P" + fi clear if $(mount | awk '$3 == "/mnt" {print $0}' | grep btrfs | grep -qv subvolid=5) ; then basestrap ${MOUNTPOINT} grub-btrfs efibootmgr dosfstools 2>$ERR @@ -548,6 +552,11 @@ bios_bootloader() { #grub_mkconfig basestrap ${MOUNTPOINT} grub-theme-manjaro 2>$ERR check_for_error "$FUNCNAME grub" $? + # For quiet grub, remove fsck + if grep "^HOOKS" ${MOUNTPOINT}/etc/mkinitcpio.conf | grep -q fsck; then + sed -e '/^HOOKS=/s/\ fsck//g' -i ${MOUNTPOINT}/etc/mkinitcpio.conf + arch_chroot "mkinitcpio -P" + fi fi else # Syslinux diff --git a/lib/util.sh b/lib/util.sh index 8a3c018..83a9a91 100644 --- a/lib/util.sh +++ b/lib/util.sh @@ -550,7 +550,7 @@ final_check() { # Check if bootloader is installed if [[ $SYSTEM == "BIOS" ]]; then arch_chroot "pacman -Qq grub" &> /dev/null || echo "- $_BootlCheck" >> ${CHECKLIST} - elif ! [[ -e ${MOUNTPOINT}${UEFI_MOUNT}/EFI/manjaro_grub/grubx64.efi ]] && ! [[ -e ${MOUNTPOINT}${UEFI_MOUNT}/EFI/refind/refind_x64.efi ]] && ! [[ -e ${MOUNTPOINT}${UEFI_MOUNT}/EFI/systemd/systemd-bootx64.efi ]]; then + elif ! [[ -e ${MOUNTPOINT}${UEFI_MOUNT}/EFI/Manjaro/grubx64.efi ]] && ! [[ -e ${MOUNTPOINT}${UEFI_MOUNT}/EFI/refind/refind_x64.efi ]] && ! [[ -e ${MOUNTPOINT}${UEFI_MOUNT}/EFI/systemd/systemd-bootx64.efi ]]; then echo "- $_BootlCheck" >> ${CHECKLIST} fi From 0fe790819f984c7b99b9dbbf7111b5e7fd90050a Mon Sep 17 00:00:00 2001 From: Chrysostomus Date: Tue, 1 Jan 2019 22:29:19 +0200 Subject: [PATCH 3/4] add zstd support --- lib/util-disk.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util-disk.sh b/lib/util-disk.sh index a550d34..403d910 100644 --- a/lib/util-disk.sh +++ b/lib/util-disk.sh @@ -252,7 +252,7 @@ select_filesystem() { ;; "btrfs") FILESYSTEM="mkfs.btrfs -f" CHK_NUM=16 - fs_opts="autodefrag compress=zlib compress=lzo compress=no compress-force=zlib compress-force=lzo discard \ + fs_opts="autodefrag compress=zlib compress=lzo compress=zstd compress=no compress-force=zlib compress-force=lzo compress-force=zstd discard \ noacl noatime nodatasum nospace_cache recovery skip_balance space_cache nossd ssd ssd_spread commit=120" modprobe btrfs ;; From 0fa085b7ed373c15db4652b6e69d437e2dc93bb3 Mon Sep 17 00:00:00 2001 From: Chrysostomus Date: Sun, 6 Jan 2019 09:14:39 +0200 Subject: [PATCH 4/4] Detect graphics card for early kms and microcode --- lib/util.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/util.sh b/lib/util.sh index dd897c1..23b6e54 100644 --- a/lib/util.sh +++ b/lib/util.sh @@ -91,6 +91,21 @@ VB_MOD="" # headers packages to install depending on kernel(s) SHOW_ONCE=0 # Show de_wm information only once COPY_PACCONF=0 # Copy over installer /etc/pacman.conf to installed system? +GRAPHIC_CARD=$(lspci | grep -i "vga" | sed 's/.*://' | sed 's/(.*//' | sed 's/^[ \t]*//') + # Set microcode based on hardware. Extra work is needed for NVIDIA + if [[ $(echo $GRAPHIC_CARD | grep -i "nvidia") != "" ]]; then + MODULE="nouveau" + # If NVIDIA, first need to know the integrated GC + [[ $(lscpu | grep -i "intel\|lenovo") != "" ]] && MCODE=intel + # All non-NVIDIA cards / virtualisation + elif [[ $(echo $GRAPHIC_CARD | grep -i 'intel\|lenovo') != "" ]]; then MCODE=intel + MODULE="i915" + elif [[ $(echo $GRAPHIC_CARD | grep -i 'ati') != "" ]]; then MCODE=amd + MODULE="amdgpu radeon" + elif [[ $(echo $GRAPHIC_CARD | grep -i 'virtualbox') != "" ]]; then HIGHLIGHT_SUB_GC=8 + else MCODE="all" + fi + import(){ if [[ -r $1 ]];then source $1