From fb60176f30177a99fec6ab12d001169711cd6c1f Mon Sep 17 00:00:00 2001 From: Chrysostomus Date: Sat, 21 Jan 2017 00:03:19 +0200 Subject: [PATCH] Customize files if root filesystem is in btrfs volume --- manjaro-architect | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/manjaro-architect b/manjaro-architect index 3174337..1a415d7 100755 --- a/manjaro-architect +++ b/manjaro-architect @@ -1619,6 +1619,9 @@ install_base() { [[ $(cat ${ANSWER}) -eq 1 ]] && basestrappy ${MOUNTPOINT} $(cat /tmp/.base) 2>/tmp/.errlog [[ $(cat ${ANSWER}) -eq 2 ]] && basestrappy ${MOUNTPOINT} $(cat ${PACKAGES}) 2>/tmp/.errlog check_for_error + # If root is on btrfs volume, amend mkinitcpio.conf + [[ $(lsblk -lno FSTYPE,MOUNTPOINT | awk '/ \/mnt$/ {print $1}') == btrfs ]] && sed -e '/^HOOKS=/s/\ fsck//g' -i ${MOUNTPOINT}/etc/mkinitcpio.conf + # Use mhwd to install selected kernels with right kernel modules # This is as of yet untested arch_chroot "mhwd-kernel -i $(cat ${PACKAGES} | xargs -n1 | grep "^linux" | xargs)" 2>/tmp/.errlog @@ -1671,6 +1674,9 @@ bios_bootloader() { # If encryption used amend grub [[ $LUKS_DEV != "" ]] && sed -i "s~GRUB_CMDLINE_LINUX=.*~GRUB_CMDLINE_LINUX=\"$LUKS_DEV\"~g" ${MOUNTPOINT}/etc/default/grub + # If root is on btrfs volume, amend grub + [[ $(lsblk -lno FSTYPE,MOUNTPOINT | awk '/ \/mnt$/ {print $1}') == btrfs ]] && sed -e '/GRUB_SAVEDEFAULT/ s/^#*/#/' -i ${MOUNTPOINT}/etc/default/grub + arch_chroot "grub-mkconfig -o /boot/grub/grub.cfg" 2>>/tmp/.errlog check_for_error fi @@ -1736,6 +1742,9 @@ uefi_bootloader() { # If encryption used amend grub [[ $LUKS_DEV != "" ]] && sed -i "s~GRUB_CMDLINE_LINUX=.*~GRUB_CMDLINE_LINUX=\"$LUKS_DEV\"~g" ${MOUNTPOINT}/etc/default/grub + # If root is on btrfs volume, amend grub + [[ $(lsblk -lno FSTYPE,MOUNTPOINT | awk '/ \/mnt$/ {print $1}') == btrfs ]] && sed -e '/GRUB_SAVEDEFAULT/ s/^#*/#/' -i ${MOUNTPOINT}/etc/default/grub + # Generate config file arch_chroot "grub-mkconfig -o /boot/grub/grub.cfg" 2>>/tmp/.errlog check_for_error