Add syslinux for bios boot
This commit is contained in:
parent
f4ed753fbb
commit
bdb33303bc
3 changed files with 179 additions and 90 deletions
85
archfi
85
archfi
|
@ -1054,6 +1054,9 @@ archgenmkinitcpiochroot(){
|
|||
archbootloadermenu(){
|
||||
options=()
|
||||
options+=("grub" "")
|
||||
if [ "$efimode" != "1" ]&&[ "$efimode" != "2" ]; then
|
||||
options+=("syslinux" "")
|
||||
fi
|
||||
sel=$(whiptail --backtitle "$apptitle" --title "$txtbootloadermenu" --menu "" --cancel-button "$txtback" 0 0 0 \
|
||||
"${options[@]}" \
|
||||
3>&1 1>&2 2>&3)
|
||||
|
@ -1062,6 +1065,9 @@ archbootloadermenu(){
|
|||
"grub")
|
||||
archbootloadergrubmenu
|
||||
;;
|
||||
"syslinux")
|
||||
archbootloadersyslinuxbmenu
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
@ -1218,6 +1224,82 @@ archgrubinstallbootloaderefiusbchroot(){
|
|||
}
|
||||
|
||||
|
||||
archbootloadersyslinuxbmenu(){
|
||||
if [ "$1" = "" ]; then
|
||||
nextblitem="."
|
||||
else
|
||||
nextblitem=$1
|
||||
fi
|
||||
options=()
|
||||
options+=("${txtinstall//%1/syslinux}" "pacstrap syslinux (gptfdisk,mtools)")
|
||||
options+=("${txtedit//%1/syslinux}" "($txtoptional)")
|
||||
options+=("${txtinstall//%1/bootloader}" "syslinux-install_update")
|
||||
sel=$(whiptail --backtitle "$apptitle" --title "$txtbootloadersyslinuxmenu" --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/syslinux}")
|
||||
archsyslinuxinstall
|
||||
nextblitem="${txtinstall//%1/bootloader}"
|
||||
;;
|
||||
"${txtedit//%1/syslinux}")
|
||||
$EDITOR /mnt/boot/syslinux/syslinux.cfg
|
||||
nextblitem="${txtinstall//%1/bootloader}"
|
||||
;;
|
||||
"${txtinstall//%1/bootloader}")
|
||||
archsyslinuxinstallbootloader
|
||||
nextblitem="${txtinstall//%1/bootloader}"
|
||||
;;
|
||||
esac
|
||||
archbootloadersyslinuxbmenu "$nextblitem"
|
||||
fi
|
||||
}
|
||||
|
||||
archsyslinuxinstall(){
|
||||
clear
|
||||
|
||||
if [ "$(parted ${rootdev::8} print|grep gpt)" != "" ]; then
|
||||
echo "Add gptfdisk to support your gpt disk"
|
||||
additionalpkg=$additionalpkg"gptfdisk "
|
||||
fi
|
||||
|
||||
if [ "$bootdev" != "" ]; then
|
||||
if [ "$(parted $bootdev print|grep fat)" != "" ]; then
|
||||
echo "Add mtools to support your fat boot partition"
|
||||
additionalpkg=$additionalpkg"mtools "
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "pacstrap /mnt syslinux $additionalpkg"
|
||||
pacstrap /mnt syslinux $additionalpkg
|
||||
pressanykey
|
||||
|
||||
clear
|
||||
echo "Updating /boot/syslinux/syslinux.cfg"
|
||||
if [ "$luksroot" = "1" ]; then
|
||||
echo "sed -i \"/APPEND\ root=/c\ APPEND root=/dev/mapper/root cryptdevice=$rootdev:root rw\" /mnt/boot/syslinux/syslinux.cfg"
|
||||
sed -i "/APPEND\ root=/c\ APPEND root=/dev/mapper/root cryptdevice=$rootdev:root\ rw" /mnt/boot/syslinux/syslinux.cfg
|
||||
else
|
||||
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
|
||||
fi
|
||||
pressanykey
|
||||
}
|
||||
|
||||
archsyslinuxinstallbootloader(){
|
||||
clear
|
||||
archchroot syslinuxbootloaderinstall $device
|
||||
pressanykey
|
||||
}
|
||||
archsyslinuxinstallbootloaderchroot(){
|
||||
if [ ! "$1" = "none" ]; then
|
||||
echo "syslinux-install_update -i -a -m"
|
||||
syslinux-install_update -i -a -m
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
|
||||
archenabledhcpcd(){
|
||||
|
@ -1386,6 +1468,8 @@ loadstrings(){
|
|||
txtrungrubmakeconfig="Run grub-mkconfig ?"
|
||||
txtgrubluksdetected="Encrypted root partion !\n\nAdd cryptdevice= to GRUB_CMDLINE_LINUX in /etc/default/grub ?"
|
||||
|
||||
txtbootloadersyslinuxmenu="Syslinux Install Menu"
|
||||
|
||||
txtoptional="Optional"
|
||||
txtrecommandeasyinst="Recommanded for easy install"
|
||||
txtset="Set %1"
|
||||
|
@ -1439,6 +1523,7 @@ if [ "$chroot" = "1" ]; then
|
|||
'grubbootloaderinstall') archgrubinstallbootloaderchroot $args;;
|
||||
'grubbootloaderefiinstall') archgrubinstallbootloaderefichroot $args;;
|
||||
'grubbootloaderefiusbinstall') archgrubinstallbootloaderefiusbchroot $args;;
|
||||
'syslinuxbootloaderinstall') archsyslinuxinstallbootloaderchroot $args;;
|
||||
'archdiinstallandlaunch') archdiinstallandlaunchchroot;;
|
||||
'archdiinstall') archdiinstallchroot;;
|
||||
'archdilaunch') archdilaunchchroot;;
|
||||
|
|
|
@ -57,7 +57,6 @@
|
|||
txtinstallmenu="Install Menu"
|
||||
|
||||
txtarchinstallmenu="Arch Install Menu"
|
||||
txtrungrubmakeconfig="Run grub-mkconfig ?"
|
||||
|
||||
txteditmirrorlist="Edit mirrorlist"
|
||||
txtinstallarchlinux="Install Arch Linux"
|
||||
|
@ -77,8 +76,11 @@
|
|||
txtefibootmgr="efibootmgr is required for EFI computers."
|
||||
|
||||
txtbootloadergrubmenu="Grub Install Menu"
|
||||
txtrungrubmakeconfig="Run grub-mkconfig ?"
|
||||
txtgrubluksdetected="Encrypted root partion !\n\nAdd cryptdevice= to GRUB_CMDLINE_LINUX in /etc/default/grub ?"
|
||||
|
||||
txtbootloadersyslinuxmenu="Syslinux Install Menu"
|
||||
|
||||
txtoptional="Optional"
|
||||
txtrecommandeasyinst="Recommanded for easy install"
|
||||
txtset="Set %1"
|
||||
|
|
|
@ -57,7 +57,6 @@ txtluksdevicecreated="La partition luks à été crée !"
|
|||
txtinstallmenu="Menu Installation"
|
||||
|
||||
txtarchinstallmenu="Menu Installation Arch Linux"
|
||||
txtrungrubmakeconfig="Exécuter grub-mkconfig ?"
|
||||
|
||||
txteditmirrorlist="Editer mirrorlist"
|
||||
txtinstallarchlinux="Installer Arch Linux"
|
||||
|
@ -77,8 +76,11 @@ txtbootloadermenu="Choisissez votre bootloader"
|
|||
txtefibootmgr="efibootmgr est requis pour un système EFI."
|
||||
|
||||
txtbootloadergrubmenu="Menu Installation Grub"
|
||||
txtrungrubmakeconfig="Exécuter grub-mkconfig ?"
|
||||
txtgrubluksdetected="Partition root cryptée !\n\nAjouter cryptdevice= to GRUB_CMDLINE_LINUX dans /etc/default/grub ?"
|
||||
|
||||
txtbootloadersyslinuxmenu="Menu Installation Syslinux"
|
||||
|
||||
txtoptional="Optionnel"
|
||||
txtrecommandeasyinst="Recommandé pour installation rapide"
|
||||
txtset="Définir %1"
|
||||
|
|
Loading…
Reference in a new issue