- Make fsck hook optional

- Use ro with refind
- fix lightdm erro with bspwm-minimal
- Generate fstab automatically
- FIx preparation menu height
merge-requests/273/head
Chrysostomus 5 years ago
parent 247b674abb
commit 49068ca2b4

@ -48,9 +48,13 @@ enable_services() {
# enable display manager for systemd # enable display manager for systemd
if [[ "$(cat /tmp/.display-manager)" == lightdm ]]; then if [[ "$(cat /tmp/.display-manager)" == lightdm ]]; then
set_lightdm_greeter if arch_chroot "pacman -Qq lightdm > /dev/null"; then
arch_chroot "systemctl enable lightdm" 2>$ERR set_lightdm_greeter
check_for_error "enable lightdm" "$?" arch_chroot "systemctl enable lightdm" 2>$ERR
check_for_error "enable lightdm" "$?"
else
echo "lightdm was listed but not actually installed. No display-manager was enabled"
fi
elif [[ "$(cat /tmp/.display-manager)" == sddm ]]; then elif [[ "$(cat /tmp/.display-manager)" == sddm ]]; then
arch_chroot "systemctl enable sddm" 2>$ERR arch_chroot "systemctl enable sddm" 2>$ERR
check_for_error "enable sddm" "$?" check_for_error "enable sddm" "$?"
@ -380,11 +384,7 @@ install_grub_uefi() {
else else
bootid="manjaro" bootid="manjaro"
fi 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 clear
mkdir /mnt/hostlvm mkdir /mnt/hostlvm
mount --bind /run/lvm /mnt/hostlvm mount --bind /run/lvm /mnt/hostlvm
@ -495,7 +495,7 @@ install_refind()
;; ;;
esac esac
# Mount as rw # Mount as rw
sed -i 's/ro\ /rw\ \ /g' /mnt/boot/refind_linux.conf #sed -i 's/ro\ /rw\ \ /g' /mnt/boot/refind_linux.conf
# Boot in graphics mode # Boot in graphics mode
sed -i -e '/use_graphics_for/ s/^#*//' ${MOUNTPOINT}${UEFI_MOUNT}/EFI/refind/refind.conf sed -i -e '/use_graphics_for/ s/^#*//' ${MOUNTPOINT}${UEFI_MOUNT}/EFI/refind/refind.conf

@ -308,7 +308,7 @@ install_desktop() {
filter_packages filter_packages
# remove grub # remove grub
sed -i '/grub/d' /mnt/.base sed -i '/grub/d' /mnt/.base
echo "nilfs-utils" >> /mnt/.base #echo "nilfs-utils" >> /mnt/.base
check_for_error "packages to install: $(cat /mnt/.base | sort | tr '\n' ' ')" check_for_error "packages to install: $(cat /mnt/.base | sort | tr '\n' ' ')"
clear clear
set -o pipefail set -o pipefail
@ -353,6 +353,14 @@ install_desktop() {
# the order is important here so strip out what we want changed and put it back in the correct order # the order is important here so strip out what we want changed and put it back in the correct order
sed -e '/^HOOKS=/s/\ filesystems//g' -e '/^HOOKS=/s/\ keyboard/\ keyboard\ zfs\ filesystems/g' -e '/^HOOKS=/s/\ fsck//g' -e '/^FILES=/c\FILES=("/usr/lib/libgcc_s.so.1")' -i ${MOUNTPOINT}/etc/mkinitcpio.conf sed -e '/^HOOKS=/s/\ filesystems//g' -e '/^HOOKS=/s/\ keyboard/\ keyboard\ zfs\ filesystems/g' -e '/^HOOKS=/s/\ fsck//g' -e '/^FILES=/c\FILES=("/usr/lib/libgcc_s.so.1")' -i ${MOUNTPOINT}/etc/mkinitcpio.conf
check_for_error "root on zfs volume. Amend mkinitcpio." check_for_error "root on zfs volume. Amend mkinitcpio."
;;
*)
if $FSCK_HOOK; then
# Remove fsck unless chosen otherwise
sed -e '/^HOOKS=/s/\ fsck//g' -i ${MOUNTPOINT}/etc/mkinitcpio.conf
check_for_error "no fsck specified. Removing fsck hook from mkinitcpio.conf."
fi
;; ;;
esac esac
@ -365,6 +373,11 @@ install_desktop() {
[[ $((LVM + LUKS + BTRFS_ROOT + ZFS_ROOT)) -gt 0 ]] && { arch_chroot "mkinitcpio -P" 2>$ERR; check_for_error "re-run mkinitcpio" $?; } [[ $((LVM + LUKS + BTRFS_ROOT + ZFS_ROOT)) -gt 0 ]] && { arch_chroot "mkinitcpio -P" 2>$ERR; check_for_error "re-run mkinitcpio" $?; }
# Generate fstab with UUID
fstabgen -U -p ${MOUNTPOINT} > ${MOUNTPOINT}/etc/fstab
# Edit fstab in case of btrfs subvolumes
sed -i "s/subvolid=.*,subvol=\/.*,//g" /mnt/etc/fstab
# If specified, copy over the pacman.conf file to the installation # If specified, copy over the pacman.conf file to the installation
if [[ $COPY_PACCONF -eq 1 ]]; then if [[ $COPY_PACCONF -eq 1 ]]; then
cp -f /etc/pacman.conf ${MOUNTPOINT}/etc/pacman.conf cp -f /etc/pacman.conf ${MOUNTPOINT}/etc/pacman.conf

@ -223,8 +223,8 @@ prep_menu() {
local PARENT="$FUNCNAME" local PARENT="$FUNCNAME"
declare -i loopmenu=1 declare -i loopmenu=1
while ((loopmenu)); do while ((loopmenu)); do
submenu 11 submenu 13
DIALOG " $_PrepMenuTitle " --default-item ${HIGHLIGHT_SUB} --menu "\n$_PrepMenuBody\n " 20 60 11 \ DIALOG " $_PrepMenuTitle " --default-item ${HIGHLIGHT_SUB} --menu "\n$_PrepMenuBody\n " 0 0 0 \
"1" "$_VCKeymapTitle" \ "1" "$_VCKeymapTitle" \
"2" "$_DevShowOpt" \ "2" "$_DevShowOpt" \
"3" "$_PrepPartDisk|>" \ "3" "$_PrepPartDisk|>" \
@ -235,7 +235,8 @@ prep_menu() {
"8" "$_PrepMirror|>" \ "8" "$_PrepMirror|>" \
"9" "$_PrepPacKey" \ "9" "$_PrepPacKey" \
"10" "$_HostCache" \ "10" "$_HostCache" \
"11" "$_Back" 2>${ANSWER} "11" "Enable fsck hook" \
"12" "$_Back" 2>${ANSWER}
HIGHLIGHT_SUB=$(cat ${ANSWER}) HIGHLIGHT_SUB=$(cat ${ANSWER})
case $(cat ${ANSWER}) in case $(cat ${ANSWER}) in
@ -270,6 +271,8 @@ prep_menu() {
;; ;;
"10") set_cache "10") set_cache
;; ;;
"11") set_fsck_hook
;;
*) loopmenu=0 *) loopmenu=0
return 0 return 0
;; ;;
@ -277,6 +280,16 @@ prep_menu() {
done done
} }
# Fsck hook
set_fsck_hook() {
DIALOG " Set fsck hook " --yesno "\nDo you want to use fsck hook?\n " 0 0
if [[ $? -eq 0 ]]; then
FSCK_HOOK=true
else
FSCK_HOOK=false
fi
}
# Base Installation # Base Installation
install_base_menu() { install_base_menu() {
local PARENT="$FUNCNAME" local PARENT="$FUNCNAME"

Loading…
Cancel
Save