Add syslinux for bios boot

This commit is contained in:
MatMoul 2018-12-31 00:07:07 +01:00
parent f4ed753fbb
commit bdb33303bc
3 changed files with 179 additions and 90 deletions

85
archfi
View file

@ -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;;

View file

@ -7,90 +7,92 @@
locale=en_US.UTF-8
#font=
locale=en_US.UTF-8
#font=
txtexit="Exit"
txtback="Back"
txtignore="Ignore"
txtexit="Exit"
txtback="Back"
txtignore="Ignore"
txtselectserver="Select source server :"
txtselectserver="Select source server :"
txtmainmenu="Main Menu"
txtlanguage="Language"
txtsetkeymap="Set Keyboard Layout"
txteditor="Editor"
txtdiskpartmenu="Disk Partitions"
txtselectpartsmenu="Select Partitions and Install"
txthelp="Help"
txtchangelog="Changelog"
txtreboot="Reboot"
txtmainmenu="Main Menu"
txtlanguage="Language"
txtsetkeymap="Set Keyboard Layout"
txteditor="Editor"
txtdiskpartmenu="Disk Partitions"
txtselectpartsmenu="Select Partitions and Install"
txthelp="Help"
txtchangelog="Changelog"
txtreboot="Reboot"
txtautoparts="Auto Partitions"
txteditparts="Edit Partitions"
txtautoparts="Auto Partitions"
txteditparts="Edit Partitions"
txtautopartsconfirm="Selected device : %1\n\nAll data will be erased ! \n\nContinue ?"
txtautopartsconfirm="Selected device : %1\n\nAll data will be erased ! \n\nContinue ?"
txtautopartclear="Clear all partition data"
txtautopartcreate="Create %1 partition"
txthybridpartcreate="Set hybrid MBR"
txtautopartsettype="Set %1 partition type"
txtautopartclear="Clear all partition data"
txtautopartcreate="Create %1 partition"
txthybridpartcreate="Set hybrid MBR"
txtautopartsettype="Set %1 partition type"
txtselectdevice="Select %1 device :"
txtselecteddevices="Selected devices :"
txtselectdevice="Select %1 device :"
txtselecteddevices="Selected devices :"
txtformatmountmenu="Format and Mount"
txtformatdevices="Format Devices"
txtformatdevice="Format Device"
txtmount="Mount"
txtunmount="Unmount"
txtmountdesc="Install or Config"
txtformatmountmenu="Format and Mount"
txtformatdevices="Format Devices"
txtformatdevice="Format Device"
txtmount="Mount"
txtunmount="Unmount"
txtmountdesc="Install or Config"
txtformatdeviceconfirm="Warning, all data on selected devices will be erased ! \nFormat devices ?"
txtformatdeviceconfirm="Warning, all data on selected devices will be erased ! \nFormat devices ?"
txtselectpartformat="Select partition format for %1 :"
txtformatingpart="Formatting partition %1 as"
txtcreateluksdevice="Create luks device :"
txtopenluksdevice="Open luks device :"
txtluksdevicecreated="luks device created !"
txtselectpartformat="Select partition format for %1 :"
txtformatingpart="Formatting partition %1 as"
txtcreateluksdevice="Create luks device :"
txtopenluksdevice="Open luks device :"
txtluksdevicecreated="luks device created !"
txtinstallmenu="Install Menu"
txtinstallmenu="Install Menu"
txtarchinstallmenu="Arch Install Menu"
txtrungrubmakeconfig="Run grub-mkconfig ?"
txtarchinstallmenu="Arch Install Menu"
txteditmirrorlist="Edit mirrorlist"
txtinstallarchlinux="Install Arch Linux"
txtconfigarchlinux="Config Arch Linux"
txteditmirrorlist="Edit mirrorlist"
txtinstallarchlinux="Install Arch Linux"
txtconfigarchlinux="Config Arch Linux"
txtsethostname="Set Computer Name"
txtsetfont="Set Font"
txtsetlocale="Set Locale"
txtsettime="Set Time"
txtsetrootpassword="Set root password"
txtsethostname="Set Computer Name"
txtsetfont="Set Font"
txtsetlocale="Set Locale"
txtsettime="Set Time"
txtsetrootpassword="Set root password"
txtuseutcclock="Use UTC hardware clock ?"
txtuseutcclock="Use UTC hardware clock ?"
txtbootloader="Bootloader"
txtbootloadermenu="Choose your bootloader"
txtbootloader="Bootloader"
txtbootloadermenu="Choose your bootloader"
txtefibootmgr="efibootmgr is required for EFI computers."
txtefibootmgr="efibootmgr is required for EFI computers."
txtbootloadergrubmenu="Grub Install Menu"
txtgrubluksdetected="Encrypted root partion !\n\nAdd cryptdevice= to GRUB_CMDLINE_LINUX in /etc/default/grub ?"
txtbootloadergrubmenu="Grub Install Menu"
txtrungrubmakeconfig="Run grub-mkconfig ?"
txtgrubluksdetected="Encrypted root partion !\n\nAdd cryptdevice= to GRUB_CMDLINE_LINUX in /etc/default/grub ?"
txtoptional="Optional"
txtrecommandeasyinst="Recommanded for easy install"
txtset="Set %1"
txtgenerate="Generate %1"
txtedit="Edit %1"
txtinstall="Install %1"
txtenable="Enable %1"
txtbootloadersyslinuxmenu="Syslinux Install Menu"
txtpressanykey="Press any key to continue."
txtoptional="Optional"
txtrecommandeasyinst="Recommanded for easy install"
txtset="Set %1"
txtgenerate="Generate %1"
txtedit="Edit %1"
txtinstall="Install %1"
txtenable="Enable %1"
txtarchdidesc="Full desktop install script"
txtinstallarchdi="Arch Linux Desktop Install (archdi) is a second script who can help you to install a full workstation.\n\nYou can just launch the script or install it. Choose in the next menu.\n\nArch Linux Desktop Install as two dependencies : wget and libnewt.\n\npacstrap wget libnewt ?"
txtarchdiinstallandlaunch="Install and run archdi"
txtarchdiinstall="Install archdi"
txtarchdilaunch="Launch archdi"
txtpressanykey="Press any key to continue."
txtarchdidesc="Full desktop install script"
txtinstallarchdi="Arch Linux Desktop Install (archdi) is a second script who can help you to install a full workstation.\n\nYou can just launch the script or install it. Choose in the next menu.\n\nArch Linux Desktop Install as two dependencies : wget and libnewt.\n\npacstrap wget libnewt ?"
txtarchdiinstallandlaunch="Install and run archdi"
txtarchdiinstall="Install archdi"
txtarchdilaunch="Launch archdi"

View file

@ -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"