Fix: refind-efi issues
This commit is contained in:
parent
83a3882f31
commit
969cdf6c74
@ -8,7 +8,7 @@
|
|||||||
# check for syntax errors
|
# check for syntax errors
|
||||||
# set -n
|
# set -n
|
||||||
|
|
||||||
VER=2.1.12
|
VER=2.1.13
|
||||||
|
|
||||||
# default values {
|
# default values {
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ declare -A WM_SESSIONS=(
|
|||||||
[deepin]='startdde' [gnome]='gnome-session' [fluxbox]='startfluxbox' [openbox]='openbox-session' [cinnamon]='cinnamon-session'
|
[deepin]='startdde' [gnome]='gnome-session' [fluxbox]='startfluxbox' [openbox]='openbox-session' [cinnamon]='cinnamon-session'
|
||||||
) # }
|
) # }
|
||||||
|
|
||||||
# packages installed for each wm/de, most are depends of the skel packages {
|
# Packages installed for each wm/de, most are depends of the skel packages {
|
||||||
declare -A WM_EXT=(
|
declare -A WM_EXT=(
|
||||||
[dwm]='nitrogen polkit-gnome gnome-keyring dunst lxappearance' [jwm]='' [deepin]='deepin-extra'
|
[dwm]='nitrogen polkit-gnome gnome-keyring dunst lxappearance' [jwm]='' [deepin]='deepin-extra'
|
||||||
[gnome]='gnome-tweaks' [cinnamon]='gnome-terminal' [plasma]='kde-applications-meta powerdevil'
|
[gnome]='gnome-tweaks' [cinnamon]='gnome-terminal' [plasma]='kde-applications-meta powerdevil'
|
||||||
@ -166,6 +166,7 @@ _lvmdelask="\nConfirm deletion of volume group(s) and logical volume(s).\n\nDele
|
|||||||
# Errors
|
# Errors
|
||||||
_errexpart="\nCannot mount partition due to a problem with the mountpoint.\n\nEnsure it begins with a slash (/) followed by at least one character.\n"
|
_errexpart="\nCannot mount partition due to a problem with the mountpoint.\n\nEnsure it begins with a slash (/) followed by at least one character.\n"
|
||||||
_errpart="\nYou need create the partition(s) first.\n\n\nBIOS systems require at least one partition (ROOT).\n\nUEFI systems require at least two (ROOT and EFI).\n"
|
_errpart="\nYou need create the partition(s) first.\n\n\nBIOS systems require at least one partition (ROOT).\n\nUEFI systems require at least two (ROOT and EFI).\n"
|
||||||
|
_errchoice="\nIf you want to fix the issue yourself use Ctrl-z to pause the installer. From there you can do whatever is needed to resolve the error.\nOnce finished use the 'fg' command to resume the installer, then select 'Continue'.\n"
|
||||||
_lukserr="\nA minimum of two partitions are required for encryption:\n\n 1. root (/) - standard or LVM.\n 2. boot (/boot) - standard (unless using LVM on BIOS systems).\n"
|
_lukserr="\nA minimum of two partitions are required for encryption:\n\n 1. root (/) - standard or LVM.\n 2. boot (/boot) - standard (unless using LVM on BIOS systems).\n"
|
||||||
_lvmerr="\nThere are no viable partitions available to use for LVM, a minimum of one is required.\n\nIf LVM is already in use, deactivating it will allow the partition(s) to be used again.\n"
|
_lvmerr="\nThere are no viable partitions available to use for LVM, a minimum of one is required.\n\nIf LVM is already in use, deactivating it will allow the partition(s) to be used again.\n"
|
||||||
_lvmerrvgname="\nInvalid name entered.\n\nThe volume group name may be alpha-numeric, but may not contain spaces, start with a '/', or already be in use.\n"
|
_lvmerrvgname="\nInvalid name entered.\n\nThe volume group name may be alpha-numeric, but may not contain spaces, start with a '/', or already be in use.\n"
|
||||||
@ -1384,14 +1385,14 @@ install_packages()
|
|||||||
|
|
||||||
# update and install crucial packages first to avoid issues
|
# update and install crucial packages first to avoid issues
|
||||||
al_repo "$MNT/etc/pacman.conf"
|
al_repo "$MNT/etc/pacman.conf"
|
||||||
chrun "pacman -Syyu $KERNEL $BASE_PKGS base-devel ${LOGIN_PKGS[$LOGIN_TYPE]} $MYSHELL --noconfirm --needed" 2> "$ERR" 2>&1
|
chrun "pacman -Syyu $BASE_PKGS base-devel ${LOGIN_PKGS[$LOGIN_TYPE]} $MYSHELL --noconfirm --needed" 2> "$ERR" 2>&1
|
||||||
errshow 1 "chrun 'pacman -Syyu $KERNEL $BASE_PKGS base-devel ${LOGIN_PKGS[$LOGIN_TYPE]} $MYSHELL --noconfirm --needed'"
|
errshow 1 "chrun 'pacman -Syyu $BASE_PKGS base-devel ${LOGIN_PKGS[$LOGIN_TYPE]} $MYSHELL --noconfirm --needed'"
|
||||||
|
|
||||||
# remove the packages we don't want on the installed system
|
# remove the packages we don't want on the installed system
|
||||||
[[ $rmpkg ]] && chrun "pacman -Rnsc $rmpkg --noconfirm"
|
[[ $rmpkg ]] && chrun "pacman -Rnsc $rmpkg --noconfirm"
|
||||||
|
|
||||||
# reinstalling iputils fixes the network issue for non-root users
|
# reinstalling iputils fixes the network issue for non-root users
|
||||||
chrun "pacman -S iputils $UCODE --noconfirm"
|
chrun "pacman -S iputils $UCODE $KERNEL --noconfirm"
|
||||||
|
|
||||||
# install the packages chosen throughout the install
|
# install the packages chosen throughout the install
|
||||||
chrun "pacman -S $inpkg --needed --noconfirm" 2> "$ERR" 2>&1
|
chrun "pacman -S $inpkg --needed --noconfirm" 2> "$ERR" 2>&1
|
||||||
@ -1780,10 +1781,10 @@ prerun_refind-efi()
|
|||||||
cat > "$MNT/boot/refind_linux.conf" <<- EOF
|
cat > "$MNT/boot/refind_linux.conf" <<- EOF
|
||||||
"$DIST Linux" "root=$ROOT_ID $([[ $LUKS_DEV ]] &&
|
"$DIST Linux" "root=$ROOT_ID $([[ $LUKS_DEV ]] &&
|
||||||
printf "%s " "$LUKS_DEV")rw add_efi_memmap $([[ $UCODE ]] &&
|
printf "%s " "$LUKS_DEV")rw add_efi_memmap $([[ $UCODE ]] &&
|
||||||
printf "initrd=%s " "/$UCODE.img")initrd=/initramfs-$KERNEL.img"
|
printf "initrd=%s " "/$UCODE.img")initrd=/initramfs-%v.img"
|
||||||
"$DIST Linux Fallback" "root=$ROOT_ID $([[ $LUKS_DEV ]] &&
|
"$DIST Linux Fallback" "root=$ROOT_ID $([[ $LUKS_DEV ]] &&
|
||||||
printf "%s " "$LUKS_DEV")rw add_efi_memmap $([[ $UCODE ]] &&
|
printf "%s " "$LUKS_DEV")rw add_efi_memmap $([[ $UCODE ]] &&
|
||||||
printf "initrd=%s " "/$UCODE.img")initrd=/initramfs-$KERNEL-fallback.img"
|
printf "initrd=%s " "/$UCODE.img")initrd=/initramfs-%v-fallback.img"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
mkdir -p "$MNT/etc/pacman.d/hooks"
|
mkdir -p "$MNT/etc/pacman.d/hooks"
|
||||||
@ -2447,10 +2448,10 @@ errshow()
|
|||||||
|
|
||||||
local fatal=$1
|
local fatal=$1
|
||||||
shift # always shift off the fatal level arg
|
shift # always shift off the fatal level arg
|
||||||
local err="$(errmsg)"
|
|
||||||
|
|
||||||
# try to rerun the command to make sure it's consistently failing
|
# try to rerun the command to make sure it's consistently failing
|
||||||
sleep 1 && $1 > "$ERR"
|
local err="$(errmsg)"
|
||||||
|
sleep 1 && $1 2> "$ERR"
|
||||||
[ $? -eq 0 ] && return 0
|
[ $? -eq 0 ] && return 0
|
||||||
local err2="$(errmsg)"
|
local err2="$(errmsg)"
|
||||||
|
|
||||||
@ -2460,14 +2461,20 @@ errshow()
|
|||||||
local txt="\nCommand: $1\n\n\n\nFirst run error:\n$err\n\nSecond run error:\n$err2\n\n"
|
local txt="\nCommand: $1\n\n\n\nFirst run error:\n$err\n\nSecond run error:\n$err2\n\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
tput cnorm
|
||||||
|
|
||||||
if (( fatal )); then
|
if (( fatal )); then
|
||||||
msg "Install Error" "${txt}Errors at this stage are fatal, the install cannot continue.\n"
|
yesno "Install Error" "${txt}Errors at this stage must be fixed before the install can continue.\n$_errchoice" \
|
||||||
|
"Handle normally" "Continue, it's fixed" || return 0
|
||||||
|
|
||||||
[[ -r $DBG && $TERM == 'linux' ]] && less "$DBG"
|
[[ -r $DBG && $TERM == 'linux' ]] && less "$DBG"
|
||||||
die 1
|
die 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
msg "Install Error" "${txt}Errors at this stage are non-fatal and may be fixed or ignored depending on the error.\n"
|
yesno "Install Error" "${txt}Errors at this stage may be fixed or ignored depending on the error.\n$_errchoice" \
|
||||||
return 1
|
"Handle normally" "Continue, it's fixed" && return 1
|
||||||
|
|
||||||
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
prechecks()
|
prechecks()
|
||||||
|
Reference in New Issue
Block a user