Add rEFInd bootloader
This commit is contained in:
parent
9b285557a7
commit
c4dac15291
3 changed files with 65 additions and 10 deletions
71
archfi
71
archfi
|
@ -1068,6 +1068,7 @@ archbootloadermenu(){
|
||||||
options+=("grub" "")
|
options+=("grub" "")
|
||||||
if [ "$efimode" == "1" ]; then
|
if [ "$efimode" == "1" ]; then
|
||||||
options+=("systemd-boot" "")
|
options+=("systemd-boot" "")
|
||||||
|
options+=("refind" "")
|
||||||
fi
|
fi
|
||||||
if [ "$efimode" != "2" ]; then
|
if [ "$efimode" != "2" ]; then
|
||||||
options+=("syslinux" "")
|
options+=("syslinux" "")
|
||||||
|
@ -1077,15 +1078,10 @@ archbootloadermenu(){
|
||||||
3>&1 1>&2 2>&3)
|
3>&1 1>&2 2>&3)
|
||||||
if [ "$?" = "0" ]; then
|
if [ "$?" = "0" ]; then
|
||||||
case $sel in
|
case $sel in
|
||||||
"grub")
|
"grub") archbootloadergrubmenu;;
|
||||||
archbootloadergrubmenu
|
"systemd-boot")archbootloadersystemdbmenu;;
|
||||||
;;
|
"refind") archbootloaderrefindmenu;;
|
||||||
"systemd-boot")
|
"syslinux")archbootloadersyslinuxbmenu;;
|
||||||
archbootloadersystemdbmenu
|
|
||||||
;;
|
|
||||||
"syslinux")
|
|
||||||
archbootloadersyslinuxbmenu
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -1425,6 +1421,58 @@ archsystemdinstallchroot(){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
archbootloaderrefindmenu(){
|
||||||
|
if [ "$1" = "" ]; then
|
||||||
|
nextblitem="."
|
||||||
|
else
|
||||||
|
nextblitem=$1
|
||||||
|
fi
|
||||||
|
options=()
|
||||||
|
options+=("${txtinstall//%1/refind}" "pacstrap refind-efi")
|
||||||
|
options+=("${txtedit//%1/refind_linux.conf}" "($txtoptional)")
|
||||||
|
sel=$(whiptail --backtitle "$apptitle" --title "$txtbootloaderrefindmenu" --menu "" --cancel-button "$txtback" --default-item "$nextblitem" 0 0 0 \
|
||||||
|
"${options[@]}" \
|
||||||
|
3>&1 1>&2 2>&3)
|
||||||
|
if [ "$?" = "0" ]; then
|
||||||
|
case $sel in
|
||||||
|
"${txtinstall//%1/refind}")
|
||||||
|
archrefindinstall
|
||||||
|
nextblitem="${txtedit//%1/refind_linux.conf}"
|
||||||
|
;;
|
||||||
|
"${txtedit//%1/refind_linux.conf}")
|
||||||
|
$EDITOR /mnt/boot/refind_linux.conf
|
||||||
|
nextblitem="${txtedit//%1/refind_linux.conf}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
archbootloaderrefindmenu "$nextblitem"
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
archrefindinstall(){
|
||||||
|
clear
|
||||||
|
|
||||||
|
echo "pacstrap /mnt refind-efi"
|
||||||
|
echo "archchroot refindbootloaderinstall $realrootdev"
|
||||||
|
echo "echo \"\\\"Arch Linux \\\" \\\"root=UUID=$rootuuid rw add_efi_memmap\\\"\" > /mnt/boot/refind_linux.conf"
|
||||||
|
echo "echo \"\\\"Arch Linux Fallback\\\" \\\"root=UUID=$rootuuid rw add_efi_memmap initrd=/initramfs-linux-fallback.img\\\"\" >> /mnt/boot/refind_linux.conf"
|
||||||
|
echo "echo \"\\\"Arch Linux Terminal\\\" \\\"root=UUID=$rootuuid rw add_efi_memmap systemd.unit=multi-user.target\\\"\" >> /mnt/boot/refind_linux.conf"
|
||||||
|
|
||||||
|
pacstrap /mnt refind-efi
|
||||||
|
archchroot refindbootloaderinstall $realrootdev
|
||||||
|
rootuuid=$(blkid -s UUID -o value $realrootdev)
|
||||||
|
echo "\"Arch Linux \" \"root=UUID=$rootuuid rw add_efi_memmap\"" > /mnt/boot/refind_linux.conf
|
||||||
|
echo "\"Arch Linux Fallback\" \"root=UUID=$rootuuid rw add_efi_memmap initrd=/initramfs-linux-fallback.img\"" >> /mnt/boot/refind_linux.conf
|
||||||
|
echo "\"Arch Linux Terminal\" \"root=UUID=$rootuuid rw add_efi_memmap systemd.unit=multi-user.target\"" >> /mnt/boot/refind_linux.conf
|
||||||
|
pressanykey
|
||||||
|
}
|
||||||
|
archrefindinstallchroot(){
|
||||||
|
#--usedefault /dev/sdXY --alldrivers
|
||||||
|
echo "refind-install"
|
||||||
|
refind-install
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
archenabledhcpcd(){
|
archenabledhcpcd(){
|
||||||
if (whiptail --backtitle "$apptitle" --title "${txtenable//%1/dhcpcd}" --yesno "${txtenable//%1/dhcpcd} ?" 0 0) then
|
if (whiptail --backtitle "$apptitle" --title "${txtenable//%1/dhcpcd}" --yesno "${txtenable//%1/dhcpcd} ?" 0 0) then
|
||||||
clear
|
clear
|
||||||
|
@ -1593,6 +1641,8 @@ loadstrings(){
|
||||||
|
|
||||||
txtbootloadersyslinuxmenu="Syslinux Install Menu"
|
txtbootloadersyslinuxmenu="Syslinux Install Menu"
|
||||||
|
|
||||||
|
txtbootloaderrefindmenu="rEFInd Install Menu"
|
||||||
|
|
||||||
txtoptional="Optional"
|
txtoptional="Optional"
|
||||||
txtrecommandeasyinst="Recommanded for easy install"
|
txtrecommandeasyinst="Recommanded for easy install"
|
||||||
txtset="Set %1"
|
txtset="Set %1"
|
||||||
|
@ -1659,6 +1709,7 @@ if [ "$chroot" = "1" ]; then
|
||||||
'syslinuxbootloaderinstall') archsyslinuxinstallbootloaderchroot $args;;
|
'syslinuxbootloaderinstall') archsyslinuxinstallbootloaderchroot $args;;
|
||||||
'syslinuxbootloaderefiinstall') archsyslinuxinstallbootloaderefichroot $args;;
|
'syslinuxbootloaderefiinstall') archsyslinuxinstallbootloaderefichroot $args;;
|
||||||
'systemdbootloaderinstall') archsystemdinstallchroot $args;;
|
'systemdbootloaderinstall') archsystemdinstallchroot $args;;
|
||||||
|
'refindbootloaderinstall') archrefindinstallchroot $args;;
|
||||||
'archdiinstallandlaunch') archdiinstallandlaunchchroot;;
|
'archdiinstallandlaunch') archdiinstallandlaunchchroot;;
|
||||||
'archdiinstall') archdiinstallchroot;;
|
'archdiinstall') archdiinstallchroot;;
|
||||||
'archdilaunch') archdilaunchchroot;;
|
'archdilaunch') archdilaunchchroot;;
|
||||||
|
@ -1672,7 +1723,7 @@ else
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
eficomputer=1
|
eficomputer=1
|
||||||
if [ "$efimode" != "" ]; then
|
if [ "$efimode" == "" ]; then
|
||||||
efimode=1
|
efimode=1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -81,6 +81,8 @@ txtgrubluksdetected="Encrypted root partion !\n\nAdd cryptdevice= to GRUB_CMDLIN
|
||||||
|
|
||||||
txtbootloadersyslinuxmenu="Syslinux Install Menu"
|
txtbootloadersyslinuxmenu="Syslinux Install Menu"
|
||||||
|
|
||||||
|
txtbootloaderrefindmenu="rEFInd Install Menu"
|
||||||
|
|
||||||
txtoptional="Optional"
|
txtoptional="Optional"
|
||||||
txtrecommandeasyinst="Recommanded for easy install"
|
txtrecommandeasyinst="Recommanded for easy install"
|
||||||
txtset="Set %1"
|
txtset="Set %1"
|
||||||
|
|
|
@ -81,6 +81,8 @@ txtgrubluksdetected="Partition root cryptée !\n\nAjouter cryptdevice= to GRUB_C
|
||||||
|
|
||||||
txtbootloadersyslinuxmenu="Menu Installation Syslinux"
|
txtbootloadersyslinuxmenu="Menu Installation Syslinux"
|
||||||
|
|
||||||
|
txtbootloaderrefindmenu="Menu Installation rEFInd"
|
||||||
|
|
||||||
txtoptional="Optionnel"
|
txtoptional="Optionnel"
|
||||||
txtrecommandeasyinst="Recommandé pour installation rapide"
|
txtrecommandeasyinst="Recommandé pour installation rapide"
|
||||||
txtset="Définir %1"
|
txtset="Définir %1"
|
||||||
|
|
Loading…
Reference in a new issue