Fix: grub os-prober module, xinit login
This commit is contained in:
parent
9f452ac222
commit
9f49dfcec8
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
# immutable globals
|
# immutable globals
|
||||||
readonly VER="1.7.30" # Installer version
|
readonly VER="1.7.33" # Installer version
|
||||||
readonly DIST="ArchLabs" # Linux distributor
|
readonly DIST="ArchLabs" # Linux distributor
|
||||||
readonly MNT="/mnt" # Install mountpoint
|
readonly MNT="/mnt" # Install mountpoint
|
||||||
readonly ERR="/tmp/errlog" # Built-in error log
|
readonly ERR="/tmp/errlog" # Built-in error log
|
||||||
@ -32,7 +32,7 @@ main()
|
|||||||
tput civis
|
tput civis
|
||||||
SELECTED=$(dialog --cr-wrap --stdout --backtitle "$BT" \
|
SELECTED=$(dialog --cr-wrap --stdout --backtitle "$BT" \
|
||||||
--title " $_PrepTitle " --default-item $SELECTED \
|
--title " $_PrepTitle " --default-item $SELECTED \
|
||||||
--menu "$_PrepBody" 0 0 0 \
|
--cancel-label "Exit" --menu "$_PrepBody" 0 0 0 \
|
||||||
"1" "$_PrepShowDev" "2" "$_PrepParts" \
|
"1" "$_PrepShowDev" "2" "$_PrepParts" \
|
||||||
"3" "$_PrepLUKS" "4" "$_PrepLVM" \
|
"3" "$_PrepLUKS" "4" "$_PrepLVM" \
|
||||||
"5" "$_PrepMount" "6" "$_PrepConfig" \
|
"5" "$_PrepMount" "6" "$_PrepConfig" \
|
||||||
|
@ -34,13 +34,32 @@ prep_for_grub()
|
|||||||
local cfg="$MNT/etc/default/grub"
|
local cfg="$MNT/etc/default/grub"
|
||||||
sed -i "s/GRUB_DISTRIBUTOR=.*/GRUB_DISTRIBUTOR=\"${DIST}\"/g;
|
sed -i "s/GRUB_DISTRIBUTOR=.*/GRUB_DISTRIBUTOR=\"${DIST}\"/g;
|
||||||
s/GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"\"/g" $cfg
|
s/GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"\"/g" $cfg
|
||||||
|
|
||||||
if [[ $LUKS_DEV ]]; then
|
if [[ $LUKS_DEV ]]; then
|
||||||
sed -i "s~#GRUB_ENABLE_CRYPTODISK~GRUB_ENABLE_CRYPTODISK~g;
|
sed -i "s~#GRUB_ENABLE_CRYPTODISK~GRUB_ENABLE_CRYPTODISK~g;
|
||||||
s~GRUB_CMDLINE_LINUX=.*~GRUB_CMDLINE_LINUX=\"${LUKS_DEV}\"~g" $cfg
|
s~GRUB_CMDLINE_LINUX=.*~GRUB_CMDLINE_LINUX=\"${LUKS_DEV}\"~g" $cfg
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $SYS == 'BIOS' && $LVM && $SEPERATE_BOOT == false ]]; then
|
if [[ $SYS == 'BIOS' && $LVM && $SEPERATE_BOOT == false ]]; then
|
||||||
sed -i "s/GRUB_PRELOAD_MODULES=.*/GRUB_PRELOAD_MODULES=\"lvm\"/g" $cfg
|
sed -i "s/GRUB_PRELOAD_MODULES=.*/GRUB_PRELOAD_MODULES=\"lvm\"/g" $cfg
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ $SYS == 'UEFI' ]]; then
|
||||||
|
# needed for os-prober module to work properly in the chroot
|
||||||
|
mkdir -p /run/lvm
|
||||||
|
mkdir -p /run/udev
|
||||||
|
mkdir -p $MNT/hostrun/lvm
|
||||||
|
mkdir -p $MNT/hostrun/udev
|
||||||
|
mount --bind /run/lvm $MNT/hostrun/lvm
|
||||||
|
mount --bind /run/udev $MNT/hostrun/udev
|
||||||
|
BCMDS[grub]="mkdir -p /run/udev; mkdir -p /run/lvm; \
|
||||||
|
mount --bind /hostrun/udev /run/udev; \
|
||||||
|
mount --bind /hostrun/lvm /run/lvm; \
|
||||||
|
${BCMDS[grub]}; \
|
||||||
|
umount /run/udev; \
|
||||||
|
umount /run/lvm"
|
||||||
|
fi
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -138,10 +157,13 @@ install_bootloader()
|
|||||||
# install/setup the bootloader by running the BCMD (boot command)
|
# install/setup the bootloader by running the BCMD (boot command)
|
||||||
printf "\nInstalling and setting up $BOOTLDR in ${BMNTS[$SYS-$BOOTLDR]}\n\n"
|
printf "\nInstalling and setting up $BOOTLDR in ${BMNTS[$SYS-$BOOTLDR]}\n\n"
|
||||||
|
|
||||||
mkdir -p $MNT/{hostrun,run/udev}
|
chrun "${BCMDS[$BOOTLDR]}"
|
||||||
mount --bind /run $MNT/hostrun
|
|
||||||
chrun "mount --bind /hostrun/lvm /run/lvm; mount --bind /hostrun/udev /run/udev ${BCMDS[$BOOTLDR]}; umount /run/lvm; umount /run/udev"
|
if [[ -d $MNT/hostrun ]]; then
|
||||||
echeck "${BCMDS[$BOOTLDR]}"
|
umount $MNT/hostrun/lvm
|
||||||
|
umount $MNT/hostrun/udev
|
||||||
|
rm -rf $MNT/hostrun
|
||||||
|
fi
|
||||||
|
|
||||||
# copy efi stub to generic catch all
|
# copy efi stub to generic catch all
|
||||||
[[ $SYS == 'UEFI' && $BOOTLDR =~ (grub|syslinux) ]] && uefi_boot_fallback
|
[[ $SYS == 'UEFI' && $BOOTLDR =~ (grub|syslinux) ]] && uefi_boot_fallback
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
# shellcheck disable=2153
|
# shellcheck disable=2153
|
||||||
|
|
||||||
readonly RUN="/run/archiso/bootmnt/arch/boot"
|
readonly RUN="/run/archiso/bootmnt/arch/boot"
|
||||||
readonly SERVICE="$MNT/etc/systemd/system/getty@tty1.service.d"
|
|
||||||
readonly VM="$(dmesg | grep -i "hypervisor")"
|
readonly VM="$(dmesg | grep -i "hypervisor")"
|
||||||
|
|
||||||
install()
|
install()
|
||||||
@ -57,7 +56,7 @@ install_base()
|
|||||||
{
|
{
|
||||||
# compressed image?
|
# compressed image?
|
||||||
if [[ -e /run/archiso/sfs/airootfs/etc/skel ]]; then
|
if [[ -e /run/archiso/sfs/airootfs/etc/skel ]]; then
|
||||||
printf "\n\nUnpacking base system --- Total: ~ 2.7G\n\n"
|
printf "\n\nUnpacking base system --- Total: ~ 2.6G\n\n"
|
||||||
rsync -ah --info=progress2 /run/archiso/sfs/airootfs/ $MNT/
|
rsync -ah --info=progress2 /run/archiso/sfs/airootfs/ $MNT/
|
||||||
else
|
else
|
||||||
# update the mirrorlist.. MUST be done before pacstrapping or it may be slow
|
# update the mirrorlist.. MUST be done before pacstrapping or it may be slow
|
||||||
@ -214,11 +213,11 @@ setup_xinit()
|
|||||||
# automatic startx for login shells
|
# automatic startx for login shells
|
||||||
local loginrc
|
local loginrc
|
||||||
case $MYSHELL in
|
case $MYSHELL in
|
||||||
*bash)
|
"/bin/bash")
|
||||||
loginrc=".bash_profile"
|
loginrc=".bash_profile"
|
||||||
rm -rf $MNT/home/$NEWUSER/.{z,mksh}*
|
rm -rf $MNT/home/$NEWUSER/.{z,mksh}*
|
||||||
;;
|
;;
|
||||||
*mksh)
|
"/usr/bin/mksh")
|
||||||
loginrc=".profile"
|
loginrc=".profile"
|
||||||
rm -rf $MNT/home/$NEWUSER/.{z,bash}*
|
rm -rf $MNT/home/$NEWUSER/.{z,bash}*
|
||||||
cat >> $MNT/home/$NEWUSER/.mkshrc << EOF
|
cat >> $MNT/home/$NEWUSER/.mkshrc << EOF
|
||||||
@ -265,7 +264,7 @@ fi
|
|||||||
EOF
|
EOF
|
||||||
else
|
else
|
||||||
rm -rf $SERVICE
|
rm -rf $SERVICE
|
||||||
rm -rf $MNT/home/$NEWUSER/.{xinitrc,profile,zprofile,bash_profile}
|
rm -rf $MNT/home/$NEWUSER/.{profile,zprofile,bash_profile}
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -290,6 +289,7 @@ EOF
|
|||||||
|
|
||||||
login_manager()
|
login_manager()
|
||||||
{
|
{
|
||||||
|
SERVICE="$MNT/etc/systemd/system/getty@tty1.service.d"
|
||||||
|
|
||||||
# remove welcome message
|
# remove welcome message
|
||||||
sed -i '/printf/d' $MNT/root/.zshrc
|
sed -i '/printf/d' $MNT/root/.zshrc
|
||||||
|
@ -16,7 +16,6 @@ declare -gA PKG_EXT=(
|
|||||||
[mpd]="mpc"
|
[mpd]="mpc"
|
||||||
[mupdf]="mupdf-tools"
|
[mupdf]="mupdf-tools"
|
||||||
[qt5ct]="qt5-styleplugins"
|
[qt5ct]="qt5-styleplugins"
|
||||||
# [steam]="steam-native-runtime"
|
|
||||||
[zathura]="zathura-pdf-poppler"
|
[zathura]="zathura-pdf-poppler"
|
||||||
[cairo-dock]="cairo-dock-plug-ins"
|
[cairo-dock]="cairo-dock-plug-ins"
|
||||||
[noto-fonts]="noto-fonts-emoji"
|
[noto-fonts]="noto-fonts-emoji"
|
||||||
|
Reference in New Issue
Block a user