Add syslinux for bios boot
This commit is contained in:
parent
f4ed753fbb
commit
bdb33303bc
3 changed files with 179 additions and 90 deletions
105
archfi
105
archfi
|
@ -100,7 +100,7 @@ chooselanguage(){
|
|||
eval $(curl -L $baseurl/lng/$sel | sed '/^#/ d')
|
||||
fi
|
||||
if [ "$skipfont" = "0" ]; then
|
||||
eval $(setfont $font)
|
||||
eval $(setfont $font)
|
||||
fi
|
||||
font=
|
||||
if [ "$(cat /etc/locale.gen | grep ""#$locale"")" != "" ]; then
|
||||
|
@ -845,8 +845,8 @@ archmenu(){
|
|||
nextitem="${txtedit//%1/mirrorlist}"
|
||||
;;
|
||||
"$txtbootloader")
|
||||
archbootloadermenu
|
||||
nextitem="${txtenable//%1/dhcpcd}"
|
||||
archbootloadermenu
|
||||
nextitem="${txtenable//%1/dhcpcd}"
|
||||
;;
|
||||
"${txtenable//%1/dhcpcd}")
|
||||
archenabledhcpcd
|
||||
|
@ -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"
|
||||
|
@ -1411,15 +1495,15 @@ loadstrings(){
|
|||
while (( "$#" )); do
|
||||
case $1 in
|
||||
--help)
|
||||
echo "archfi"
|
||||
echo "------"
|
||||
echo "-sf | --skip-font Skip setfont from language files"
|
||||
echo "-t | --test ghusername ghbranch Test language files"
|
||||
exit 0
|
||||
echo "archfi"
|
||||
echo "------"
|
||||
echo "-sf | --skip-font Skip setfont from language files"
|
||||
echo "-t | --test ghusername ghbranch Test language files"
|
||||
exit 0
|
||||
;;
|
||||
-sf | --skip-font) skipfont=1;;
|
||||
-sf | --skip-font) skipfont=1;;
|
||||
-t | --test) baseurl="https://raw.githubusercontent"
|
||||
baseurl="$baseurl.com/""$2/archfi/$3";;
|
||||
baseurl="$baseurl.com/""$2/archfi/$3";;
|
||||
--chroot) chroot=1
|
||||
command=$2
|
||||
args=$3;;
|
||||
|
@ -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;;
|
||||
|
|
134
lng/English
134
lng/English
|
@ -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"
|
||||
|
|
|
@ -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