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')
|
eval $(curl -L $baseurl/lng/$sel | sed '/^#/ d')
|
||||||
fi
|
fi
|
||||||
if [ "$skipfont" = "0" ]; then
|
if [ "$skipfont" = "0" ]; then
|
||||||
eval $(setfont $font)
|
eval $(setfont $font)
|
||||||
fi
|
fi
|
||||||
font=
|
font=
|
||||||
if [ "$(cat /etc/locale.gen | grep ""#$locale"")" != "" ]; then
|
if [ "$(cat /etc/locale.gen | grep ""#$locale"")" != "" ]; then
|
||||||
|
@ -845,8 +845,8 @@ archmenu(){
|
||||||
nextitem="${txtedit//%1/mirrorlist}"
|
nextitem="${txtedit//%1/mirrorlist}"
|
||||||
;;
|
;;
|
||||||
"$txtbootloader")
|
"$txtbootloader")
|
||||||
archbootloadermenu
|
archbootloadermenu
|
||||||
nextitem="${txtenable//%1/dhcpcd}"
|
nextitem="${txtenable//%1/dhcpcd}"
|
||||||
;;
|
;;
|
||||||
"${txtenable//%1/dhcpcd}")
|
"${txtenable//%1/dhcpcd}")
|
||||||
archenabledhcpcd
|
archenabledhcpcd
|
||||||
|
@ -1054,6 +1054,9 @@ archgenmkinitcpiochroot(){
|
||||||
archbootloadermenu(){
|
archbootloadermenu(){
|
||||||
options=()
|
options=()
|
||||||
options+=("grub" "")
|
options+=("grub" "")
|
||||||
|
if [ "$efimode" != "1" ]&&[ "$efimode" != "2" ]; then
|
||||||
|
options+=("syslinux" "")
|
||||||
|
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 \
|
||||||
"${options[@]}" \
|
"${options[@]}" \
|
||||||
3>&1 1>&2 2>&3)
|
3>&1 1>&2 2>&3)
|
||||||
|
@ -1062,6 +1065,9 @@ archbootloadermenu(){
|
||||||
"grub")
|
"grub")
|
||||||
archbootloadergrubmenu
|
archbootloadergrubmenu
|
||||||
;;
|
;;
|
||||||
|
"syslinux")
|
||||||
|
archbootloadersyslinuxbmenu
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
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(){
|
archenabledhcpcd(){
|
||||||
|
@ -1386,6 +1468,8 @@ loadstrings(){
|
||||||
txtrungrubmakeconfig="Run grub-mkconfig ?"
|
txtrungrubmakeconfig="Run grub-mkconfig ?"
|
||||||
txtgrubluksdetected="Encrypted root partion !\n\nAdd cryptdevice= to GRUB_CMDLINE_LINUX in /etc/default/grub ?"
|
txtgrubluksdetected="Encrypted root partion !\n\nAdd cryptdevice= to GRUB_CMDLINE_LINUX in /etc/default/grub ?"
|
||||||
|
|
||||||
|
txtbootloadersyslinuxmenu="Syslinux Install Menu"
|
||||||
|
|
||||||
txtoptional="Optional"
|
txtoptional="Optional"
|
||||||
txtrecommandeasyinst="Recommanded for easy install"
|
txtrecommandeasyinst="Recommanded for easy install"
|
||||||
txtset="Set %1"
|
txtset="Set %1"
|
||||||
|
@ -1411,15 +1495,15 @@ loadstrings(){
|
||||||
while (( "$#" )); do
|
while (( "$#" )); do
|
||||||
case $1 in
|
case $1 in
|
||||||
--help)
|
--help)
|
||||||
echo "archfi"
|
echo "archfi"
|
||||||
echo "------"
|
echo "------"
|
||||||
echo "-sf | --skip-font Skip setfont from language files"
|
echo "-sf | --skip-font Skip setfont from language files"
|
||||||
echo "-t | --test ghusername ghbranch Test language files"
|
echo "-t | --test ghusername ghbranch Test language files"
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
-sf | --skip-font) skipfont=1;;
|
-sf | --skip-font) skipfont=1;;
|
||||||
-t | --test) baseurl="https://raw.githubusercontent"
|
-t | --test) baseurl="https://raw.githubusercontent"
|
||||||
baseurl="$baseurl.com/""$2/archfi/$3";;
|
baseurl="$baseurl.com/""$2/archfi/$3";;
|
||||||
--chroot) chroot=1
|
--chroot) chroot=1
|
||||||
command=$2
|
command=$2
|
||||||
args=$3;;
|
args=$3;;
|
||||||
|
@ -1439,6 +1523,7 @@ if [ "$chroot" = "1" ]; then
|
||||||
'grubbootloaderinstall') archgrubinstallbootloaderchroot $args;;
|
'grubbootloaderinstall') archgrubinstallbootloaderchroot $args;;
|
||||||
'grubbootloaderefiinstall') archgrubinstallbootloaderefichroot $args;;
|
'grubbootloaderefiinstall') archgrubinstallbootloaderefichroot $args;;
|
||||||
'grubbootloaderefiusbinstall') archgrubinstallbootloaderefiusbchroot $args;;
|
'grubbootloaderefiusbinstall') archgrubinstallbootloaderefiusbchroot $args;;
|
||||||
|
'syslinuxbootloaderinstall') archsyslinuxinstallbootloaderchroot $args;;
|
||||||
'archdiinstallandlaunch') archdiinstallandlaunchchroot;;
|
'archdiinstallandlaunch') archdiinstallandlaunchchroot;;
|
||||||
'archdiinstall') archdiinstallchroot;;
|
'archdiinstall') archdiinstallchroot;;
|
||||||
'archdilaunch') archdilaunchchroot;;
|
'archdilaunch') archdilaunchchroot;;
|
||||||
|
|
160
lng/English
160
lng/English
|
@ -6,91 +6,93 @@
|
||||||
# notes : misc text...
|
# notes : misc text...
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
locale=en_US.UTF-8
|
|
||||||
#font=
|
|
||||||
|
|
||||||
txtexit="Exit"
|
|
||||||
txtback="Back"
|
|
||||||
txtignore="Ignore"
|
|
||||||
|
|
||||||
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"
|
|
||||||
|
|
||||||
txtautoparts="Auto Partitions"
|
locale=en_US.UTF-8
|
||||||
txteditparts="Edit Partitions"
|
#font=
|
||||||
|
|
||||||
txtautopartsconfirm="Selected device : %1\n\nAll data will be erased ! \n\nContinue ?"
|
txtexit="Exit"
|
||||||
|
txtback="Back"
|
||||||
|
txtignore="Ignore"
|
||||||
|
|
||||||
txtautopartclear="Clear all partition data"
|
txtselectserver="Select source server :"
|
||||||
txtautopartcreate="Create %1 partition"
|
|
||||||
txthybridpartcreate="Set hybrid MBR"
|
|
||||||
txtautopartsettype="Set %1 partition type"
|
|
||||||
|
|
||||||
txtselectdevice="Select %1 device :"
|
txtmainmenu="Main Menu"
|
||||||
txtselecteddevices="Selected devices :"
|
txtlanguage="Language"
|
||||||
|
txtsetkeymap="Set Keyboard Layout"
|
||||||
|
txteditor="Editor"
|
||||||
|
txtdiskpartmenu="Disk Partitions"
|
||||||
|
txtselectpartsmenu="Select Partitions and Install"
|
||||||
|
txthelp="Help"
|
||||||
|
txtchangelog="Changelog"
|
||||||
|
txtreboot="Reboot"
|
||||||
|
|
||||||
txtformatmountmenu="Format and Mount"
|
txtautoparts="Auto Partitions"
|
||||||
txtformatdevices="Format Devices"
|
txteditparts="Edit Partitions"
|
||||||
txtformatdevice="Format Device"
|
|
||||||
txtmount="Mount"
|
|
||||||
txtunmount="Unmount"
|
|
||||||
txtmountdesc="Install or Config"
|
|
||||||
|
|
||||||
txtformatdeviceconfirm="Warning, all data on selected devices will be erased ! \nFormat devices ?"
|
txtautopartsconfirm="Selected device : %1\n\nAll data will be erased ! \n\nContinue ?"
|
||||||
|
|
||||||
txtselectpartformat="Select partition format for %1 :"
|
txtautopartclear="Clear all partition data"
|
||||||
txtformatingpart="Formatting partition %1 as"
|
txtautopartcreate="Create %1 partition"
|
||||||
txtcreateluksdevice="Create luks device :"
|
txthybridpartcreate="Set hybrid MBR"
|
||||||
txtopenluksdevice="Open luks device :"
|
txtautopartsettype="Set %1 partition type"
|
||||||
txtluksdevicecreated="luks device created !"
|
|
||||||
|
|
||||||
txtinstallmenu="Install Menu"
|
txtselectdevice="Select %1 device :"
|
||||||
|
txtselecteddevices="Selected devices :"
|
||||||
txtarchinstallmenu="Arch Install Menu"
|
|
||||||
txtrungrubmakeconfig="Run grub-mkconfig ?"
|
|
||||||
|
|
||||||
txteditmirrorlist="Edit mirrorlist"
|
|
||||||
txtinstallarchlinux="Install Arch Linux"
|
|
||||||
txtconfigarchlinux="Config Arch Linux"
|
|
||||||
|
|
||||||
txtsethostname="Set Computer Name"
|
txtformatmountmenu="Format and Mount"
|
||||||
txtsetfont="Set Font"
|
txtformatdevices="Format Devices"
|
||||||
txtsetlocale="Set Locale"
|
txtformatdevice="Format Device"
|
||||||
txtsettime="Set Time"
|
txtmount="Mount"
|
||||||
txtsetrootpassword="Set root password"
|
txtunmount="Unmount"
|
||||||
|
txtmountdesc="Install or Config"
|
||||||
txtuseutcclock="Use UTC hardware clock ?"
|
|
||||||
|
txtformatdeviceconfirm="Warning, all data on selected devices will be erased ! \nFormat devices ?"
|
||||||
txtbootloader="Bootloader"
|
|
||||||
txtbootloadermenu="Choose your bootloader"
|
txtselectpartformat="Select partition format for %1 :"
|
||||||
|
txtformatingpart="Formatting partition %1 as"
|
||||||
txtefibootmgr="efibootmgr is required for EFI computers."
|
txtcreateluksdevice="Create luks device :"
|
||||||
|
txtopenluksdevice="Open luks device :"
|
||||||
txtbootloadergrubmenu="Grub Install Menu"
|
txtluksdevicecreated="luks device created !"
|
||||||
txtgrubluksdetected="Encrypted root partion !\n\nAdd cryptdevice= to GRUB_CMDLINE_LINUX in /etc/default/grub ?"
|
|
||||||
|
txtinstallmenu="Install Menu"
|
||||||
txtoptional="Optional"
|
|
||||||
txtrecommandeasyinst="Recommanded for easy install"
|
txtarchinstallmenu="Arch Install Menu"
|
||||||
txtset="Set %1"
|
|
||||||
txtgenerate="Generate %1"
|
txteditmirrorlist="Edit mirrorlist"
|
||||||
txtedit="Edit %1"
|
txtinstallarchlinux="Install Arch Linux"
|
||||||
txtinstall="Install %1"
|
txtconfigarchlinux="Config Arch Linux"
|
||||||
txtenable="Enable %1"
|
|
||||||
|
txtsethostname="Set Computer Name"
|
||||||
txtpressanykey="Press any key to continue."
|
txtsetfont="Set Font"
|
||||||
|
txtsetlocale="Set Locale"
|
||||||
txtarchdidesc="Full desktop install script"
|
txtsettime="Set Time"
|
||||||
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 ?"
|
txtsetrootpassword="Set root password"
|
||||||
txtarchdiinstallandlaunch="Install and run archdi"
|
|
||||||
txtarchdiinstall="Install archdi"
|
txtuseutcclock="Use UTC hardware clock ?"
|
||||||
txtarchdilaunch="Launch archdi"
|
|
||||||
|
txtbootloader="Bootloader"
|
||||||
|
txtbootloadermenu="Choose your bootloader"
|
||||||
|
|
||||||
|
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"
|
||||||
|
txtgenerate="Generate %1"
|
||||||
|
txtedit="Edit %1"
|
||||||
|
txtinstall="Install %1"
|
||||||
|
txtenable="Enable %1"
|
||||||
|
|
||||||
|
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"
|
txtinstallmenu="Menu Installation"
|
||||||
|
|
||||||
txtarchinstallmenu="Menu Installation Arch Linux"
|
txtarchinstallmenu="Menu Installation Arch Linux"
|
||||||
txtrungrubmakeconfig="Exécuter grub-mkconfig ?"
|
|
||||||
|
|
||||||
txteditmirrorlist="Editer mirrorlist"
|
txteditmirrorlist="Editer mirrorlist"
|
||||||
txtinstallarchlinux="Installer Arch Linux"
|
txtinstallarchlinux="Installer Arch Linux"
|
||||||
|
@ -77,8 +76,11 @@ txtbootloadermenu="Choisissez votre bootloader"
|
||||||
txtefibootmgr="efibootmgr est requis pour un système EFI."
|
txtefibootmgr="efibootmgr est requis pour un système EFI."
|
||||||
|
|
||||||
txtbootloadergrubmenu="Menu Installation Grub"
|
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 ?"
|
txtgrubluksdetected="Partition root cryptée !\n\nAjouter cryptdevice= to GRUB_CMDLINE_LINUX dans /etc/default/grub ?"
|
||||||
|
|
||||||
|
txtbootloadersyslinuxmenu="Menu Installation Syslinux"
|
||||||
|
|
||||||
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