efibootmgr order

This commit is contained in:
mfgbhatti 2022-02-19 16:21:45 +00:00
parent 3cbb893ee3
commit 46a88ca0c0
3 changed files with 16 additions and 8 deletions

View File

@ -198,14 +198,14 @@ uefi)
echo "Installing efistub" echo "Installing efistub"
install_pkg efibootmgr install_pkg efibootmgr
if [[ "$LUKS" -eq 1 ]]; then if [[ "$LUKS" -eq 1 ]]; then
efibootmgr --disk "$DISK" --part 1 --create --label "ArchTitus" --loader "/vmlinuz-linux" --unicode "cryptdevice=PARTUUID=$PART_UUID:luks:allow-discards root=/dev/$LVM_VG/${LVM_NAMES[0]} rw initrd=\\$IMG initrd=\initramfs-linux.img"
efibootmgr --disk "$DISK" --part 1 --create --label "ArchTitus-Fallback" --loader "/vmlinuz-linux" --unicode "cryptdevice=PARTUUID=$PART_UUID:luks:allow-discards root=/dev/$LVM_VG/${LVM_NAMES[0]} rw initrd=\\$IMG initrd=\initramfs-linux-fallback.img" efibootmgr --disk "$DISK" --part 1 --create --label "ArchTitus-Fallback" --loader "/vmlinuz-linux" --unicode "cryptdevice=PARTUUID=$PART_UUID:luks:allow-discards root=/dev/$LVM_VG/${LVM_NAMES[0]} rw initrd=\\$IMG initrd=\initramfs-linux-fallback.img"
efibootmgr --disk "$DISK" --part 1 --create --label "ArchTitus" --loader "/vmlinuz-linux" --unicode "cryptdevice=PARTUUID=$PART_UUID:luks:allow-discards root=/dev/$LVM_VG/${LVM_NAMES[0]} rw initrd=\\$IMG initrd=\initramfs-linux.img"
elif [[ "$LVM" -eq 1 ]]; then elif [[ "$LVM" -eq 1 ]]; then
efibootmgr --disk "$DISK" --part 1 --create --label "ArchTitus" --loader "/vmlinuz-linux" --unicode "root=/dev/$LVM_VG/${LVM_NAMES[0]} rw initrd=\\$IMG initrd=\initramfs-linux.img"
efibootmgr --disk "$DISK" --part 1 --create --label "ArchTitus-Fallback" --loader "/vmlinuz-linux" --unicode "root=/dev/$LVM_VG/${LVM_NAMES[0]} rw initrd=\\$IMG initrd=\initramfs-linux-fallback.img" efibootmgr --disk "$DISK" --part 1 --create --label "ArchTitus-Fallback" --loader "/vmlinuz-linux" --unicode "root=/dev/$LVM_VG/${LVM_NAMES[0]} rw initrd=\\$IMG initrd=\initramfs-linux-fallback.img"
efibootmgr --disk "$DISK" --part 1 --create --label "ArchTitus" --loader "/vmlinuz-linux" --unicode "root=/dev/$LVM_VG/${LVM_NAMES[0]} rw initrd=\\$IMG initrd=\initramfs-linux.img"
else else
efibootmgr --disk "$DISK" --part 1 --create --label "ArchTitus" --loader "/vmlinuz-linux" --unicode "root=PARTUUID=$PART_UUID rw initrd=\\$IMG initrd=\initramfs-linux.img"
efibootmgr --disk "$DISK" --part 1 --create --label "ArchTitus-Fallback" --loader "/vmlinuz-linux" --unicode "root=PARTUUID=$PART_UUID rw initrd=\\$IMG initrd=\initramfs-linux-fallback.img" efibootmgr --disk "$DISK" --part 1 --create --label "ArchTitus-Fallback" --loader "/vmlinuz-linux" --unicode "root=PARTUUID=$PART_UUID rw initrd=\\$IMG initrd=\initramfs-linux-fallback.img"
efibootmgr --disk "$DISK" --part 1 --create --label "ArchTitus" --loader "/vmlinuz-linux" --unicode "root=PARTUUID=$PART_UUID rw initrd=\\$IMG initrd=\initramfs-linux.img"
fi fi
else else
echo "ERROR! efistub is not supported for BIOS systems" echo "ERROR! efistub is not supported for BIOS systems"

View File

@ -19,7 +19,7 @@ install_aur() {
"$AURHELPER" -S --noconfirm --needed "$@" "$AURHELPER" -S --noconfirm --needed "$@"
} }
cd ~ || exit 0 cd "$HOME" || exit 0
case "$AURHELPER" in case "$AURHELPER" in
"yay") "yay")
install_pkg "go" install_pkg "go"
@ -46,7 +46,7 @@ esac
cd "$AURHELPER" || exit 0 cd "$AURHELPER" || exit 0
makepkg -si --noconfirm makepkg -si --noconfirm
cd ~ || exit 0 cd "$HOME" || exit 0
if [[ "$LAYOUT" -eq 1 ]]; then if [[ "$LAYOUT" -eq 1 ]]; then
@ -54,7 +54,7 @@ if [[ "$LAYOUT" -eq 1 ]]; then
echo "INSTALLING: $LINE" echo "INSTALLING: $LINE"
install_aur "$LINE" install_aur "$LINE"
done <~/ArchTitus/pkg-files/aur-pkgs.txt done <~/ArchTitus/pkg-files/aur-pkgs.txt
touch "$HOME/.cache/zshhistory" touch "$HOME/.cache/zshhistory"
git clone "https://github.com/ChrisTitusTech/zsh" git clone "https://github.com/ChrisTitusTech/zsh"
git clone --depth=1 "https://github.com/romkatv/powerlevel10k.git" "$HOME"/powerlevel10k git clone --depth=1 "https://github.com/romkatv/powerlevel10k.git" "$HOME"/powerlevel10k
@ -80,6 +80,6 @@ case "$DESKTOP" in
;; ;;
esac esac
export PATH=$PATH:~/.local/bin export PATH=$PATH:$HOME/.local/bin
title "System ready for 3-post-setup.sh" title "System ready for 3-post-setup.sh"

View File

@ -29,6 +29,12 @@ logo() {
do_reboot () { do_reboot () {
cp "$LOG" "$MOUNTPOINT"/var/log/archtitus.log cp "$LOG" "$MOUNTPOINT"/var/log/archtitus.log
if [[ "$LVM" -eq 1 || "$LUKS" -eq 1 ]]; then
i=0
while [[ "$i" -le "${#LVM_NAMES[@]}" ]]; do
umount -l /dev/"$LVM_VG"/"${LVM_NAMES[$i]}"
done
fi
umount -R "$MOUNTPOINT"/boot umount -R "$MOUNTPOINT"/boot
umount -R "$MOUNTPOINT" umount -R "$MOUNTPOINT"
reboot reboot
@ -43,16 +49,18 @@ end() {
continue continue
fi fi
if [[ "$KEY" == $'\e' ]]; then if [[ "$KEY" == $'\e' ]]; then
REBOOT=0
break break
elif [[ "$KEY" == "r" || "$KEY" == "R" ]]; then elif [[ "$KEY" == "r" || "$KEY" == "R" ]]; then
REBOOT=1 REBOOT=1
break break
fi fi
REBOOT=1
done done
if [[ "$REBOOT" -eq 1 ]]; then if [[ "$REBOOT" -eq 1 ]]; then
do_reboot do_reboot
else else
echo "Aborted" echo "Reboot is aborted "
fi fi
} }