syslinux: add efi support
This commit is contained in:
parent
bd188f04e5
commit
b47ed53fb2
1 changed files with 22 additions and 2 deletions
24
archfi
24
archfi
|
@ -1056,7 +1056,7 @@ archgenmkinitcpiochroot(){
|
||||||
archbootloadermenu(){
|
archbootloadermenu(){
|
||||||
options=()
|
options=()
|
||||||
options+=("grub" "")
|
options+=("grub" "")
|
||||||
if [ "$efimode" != "1" ]&&[ "$efimode" != "2" ]; then
|
if [ "$efimode" != "2" ]; then
|
||||||
options+=("syslinux" "")
|
options+=("syslinux" "")
|
||||||
fi
|
fi
|
||||||
sel=$(whiptail --backtitle "$apptitle" --title "$txtbootloadermenu" --menu "" --cancel-button "$txtback" 0 0 0 \
|
sel=$(whiptail --backtitle "$apptitle" --title "$txtbootloadermenu" --menu "" --cancel-button "$txtback" 0 0 0 \
|
||||||
|
@ -1261,6 +1261,11 @@ archbootloadersyslinuxbmenu(){
|
||||||
archsyslinuxinstall(){
|
archsyslinuxinstall(){
|
||||||
clear
|
clear
|
||||||
|
|
||||||
|
if [ "$efimode" == "1" ]||[ "$efimode" == "2" ]; then
|
||||||
|
echo "Add efibootmgr to support your efi installation"
|
||||||
|
additionalpkg=$additionalpkg"efibootmgr "
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$(parted ${realrootdev::8} print|grep gpt)" != "" ]; then
|
if [ "$(parted ${realrootdev::8} print|grep gpt)" != "" ]; then
|
||||||
echo "Add gptfdisk to support your gpt disk"
|
echo "Add gptfdisk to support your gpt disk"
|
||||||
additionalpkg=$additionalpkg"gptfdisk "
|
additionalpkg=$additionalpkg"gptfdisk "
|
||||||
|
@ -1286,12 +1291,17 @@ archsyslinuxinstall(){
|
||||||
echo "sed -i \"/APPEND\ root=/c\ APPEND root=$rootdev rw\" /mnt/boot/syslinux/syslinux.cfg"
|
echo "sed -i \"/APPEND\ root=/c\ APPEND root=$rootdev rw\" /mnt/boot/syslinux/syslinux.cfg"
|
||||||
sed -i "/APPEND\ root=/c\ APPEND root=$rootdev\ rw" /mnt/boot/syslinux/syslinux.cfg
|
sed -i "/APPEND\ root=/c\ APPEND root=$rootdev\ rw" /mnt/boot/syslinux/syslinux.cfg
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pressanykey
|
pressanykey
|
||||||
}
|
}
|
||||||
|
|
||||||
archsyslinuxinstallbootloader(){
|
archsyslinuxinstallbootloader(){
|
||||||
clear
|
clear
|
||||||
archchroot syslinuxbootloaderinstall $device
|
if [ "$efimode" == "1" ]||[ "$efimode" == "2" ]; then
|
||||||
|
archchroot syslinuxbootloaderefiinstall $bootdev
|
||||||
|
else
|
||||||
|
archchroot syslinuxbootloaderinstall $bootdev
|
||||||
|
fi
|
||||||
pressanykey
|
pressanykey
|
||||||
}
|
}
|
||||||
archsyslinuxinstallbootloaderchroot(){
|
archsyslinuxinstallbootloaderchroot(){
|
||||||
|
@ -1301,6 +1311,15 @@ archsyslinuxinstallbootloaderchroot(){
|
||||||
fi
|
fi
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
archsyslinuxinstallbootloaderefichroot(){
|
||||||
|
if [ ! "$1" = "none" ]; then
|
||||||
|
echo "cp -r /usr/lib/syslinux/efi64/* /boot/syslinux"
|
||||||
|
echo "efibootmgr --create --disk ${1::8} --part ${1:(-1)} --loader /syslinux/syslinux.efi --label "Syslinux" --verbose"
|
||||||
|
cp -r /usr/lib/syslinux/efi64/* /boot/syslinux
|
||||||
|
efibootmgr --create --disk ${1::8} --part ${1:(-1)} --loader /syslinux/syslinux.efi --label "Syslinux" --verbose
|
||||||
|
fi
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1526,6 +1545,7 @@ if [ "$chroot" = "1" ]; then
|
||||||
'grubbootloaderefiinstall') archgrubinstallbootloaderefichroot $args;;
|
'grubbootloaderefiinstall') archgrubinstallbootloaderefichroot $args;;
|
||||||
'grubbootloaderefiusbinstall') archgrubinstallbootloaderefiusbchroot $args;;
|
'grubbootloaderefiusbinstall') archgrubinstallbootloaderefiusbchroot $args;;
|
||||||
'syslinuxbootloaderinstall') archsyslinuxinstallbootloaderchroot $args;;
|
'syslinuxbootloaderinstall') archsyslinuxinstallbootloaderchroot $args;;
|
||||||
|
'syslinuxbootloaderefiinstall') archsyslinuxinstallbootloaderefichroot $args;;
|
||||||
'archdiinstallandlaunch') archdiinstallandlaunchchroot;;
|
'archdiinstallandlaunch') archdiinstallandlaunchchroot;;
|
||||||
'archdiinstall') archdiinstallchroot;;
|
'archdiinstall') archdiinstallchroot;;
|
||||||
'archdilaunch') archdilaunchchroot;;
|
'archdilaunch') archdilaunchchroot;;
|
||||||
|
|
Loading…
Reference in a new issue