commit
0b786c8c08
3 changed files with 61 additions and 61 deletions
120
archfi
120
archfi
|
@ -12,7 +12,7 @@
|
||||||
# referance : https://wiki.archlinux.org/index.php/Installation_guide
|
# referance : https://wiki.archlinux.org/index.php/Installation_guide
|
||||||
|
|
||||||
|
|
||||||
apptitle="Arch Linux Fast Install (archfi) - Version: 2019.10.06.21.58.07 (GPLv3)"
|
apptitle="Arch Linux Fast Install (archfi) - Version: 2019.11.02.00.13.01 (GPLv3)"
|
||||||
baseurl=https://raw.githubusercontent.com/MatMoul/archfi/master
|
baseurl=https://raw.githubusercontent.com/MatMoul/archfi/master
|
||||||
skipfont="0"
|
skipfont="0"
|
||||||
|
|
||||||
|
@ -163,6 +163,25 @@ rebootpc(){
|
||||||
|
|
||||||
|
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
|
selectdisk(){
|
||||||
|
items=$(lsblk -d -p -n -l -o NAME,SIZE -e 7,11)
|
||||||
|
options=()
|
||||||
|
IFS_ORIG=$IFS
|
||||||
|
IFS=$'\n'
|
||||||
|
for item in ${items}
|
||||||
|
do
|
||||||
|
options+=("${item}" "")
|
||||||
|
done
|
||||||
|
IFS=$IFS_ORIG
|
||||||
|
result=$(whiptail --backtitle "${APPTITLE}" --title "${1}" --menu "" 0 0 0 "${options[@]}" 3>&1 1>&2 2>&3)
|
||||||
|
if [ "$?" != "0" ]
|
||||||
|
then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
echo ${result%%\ *}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
diskpartmenu(){
|
diskpartmenu(){
|
||||||
if [ "${1}" = "" ]; then
|
if [ "${1}" = "" ]; then
|
||||||
nextitem="."
|
nextitem="."
|
||||||
|
@ -217,14 +236,7 @@ diskpartmenu(){
|
||||||
|
|
||||||
|
|
||||||
diskpartautodos(){
|
diskpartautodos(){
|
||||||
items=$(lsblk -d -p -n -l -o NAME -e 7,11)
|
device=$(selectdisk "${txtautoparts} (dos)")
|
||||||
options=()
|
|
||||||
for item in ${items}; do
|
|
||||||
options+=("${item}" "")
|
|
||||||
done
|
|
||||||
device=$(whiptail --backtitle "${apptitle}" --title "${txtautoparts} (dos)" --menu "" 0 0 0 \
|
|
||||||
"${options[@]}" \
|
|
||||||
3>&1 1>&2 2>&3)
|
|
||||||
if [ "$?" = "0" ]; then
|
if [ "$?" = "0" ]; then
|
||||||
if (whiptail --backtitle "${apptitle}" --title "${txtautoparts} (dos)" --yesno "${txtautopartsconfirm//%1/${device}}" --defaultno 0 0) then
|
if (whiptail --backtitle "${apptitle}" --title "${txtautoparts} (dos)" --yesno "${txtautopartsconfirm//%1/${device}}" --defaultno 0 0) then
|
||||||
clear
|
clear
|
||||||
|
@ -259,14 +271,7 @@ diskpartautodos(){
|
||||||
}
|
}
|
||||||
|
|
||||||
diskpartautogpt(){
|
diskpartautogpt(){
|
||||||
items=$(lsblk -d -p -n -l -o NAME -e 7,11)
|
device=$(selectdisk "${txtautoparts} (gpt)")
|
||||||
options=()
|
|
||||||
for item in ${items}; do
|
|
||||||
options+=("${item}" "")
|
|
||||||
done
|
|
||||||
device=$(whiptail --backtitle "${apptitle}" --title "${txtautoparts} (gpt)" --menu "" 0 0 0 \
|
|
||||||
"${options[@]}" \
|
|
||||||
3>&1 1>&2 2>&3)
|
|
||||||
if [ "$?" = "0" ]; then
|
if [ "$?" = "0" ]; then
|
||||||
if (whiptail --backtitle "${apptitle}" --title "${txtautoparts} (gpt)" --yesno "${txtautopartsconfirm//%1/${device}}" --defaultno 0 0) then
|
if (whiptail --backtitle "${apptitle}" --title "${txtautoparts} (gpt)" --yesno "${txtautopartsconfirm//%1/${device}}" --defaultno 0 0) then
|
||||||
clear
|
clear
|
||||||
|
@ -299,14 +304,7 @@ diskpartautogpt(){
|
||||||
}
|
}
|
||||||
|
|
||||||
diskpartautoefi(){
|
diskpartautoefi(){
|
||||||
items=$(lsblk -d -p -n -l -o NAME -e 7,11)
|
device=$(selectdisk "${txtautoparts} (gpt,efi)")
|
||||||
options=()
|
|
||||||
for item in ${items}; do
|
|
||||||
options+=("${item}" "")
|
|
||||||
done
|
|
||||||
device=$(whiptail --backtitle "${apptitle}" --title "${txtautoparts} (gpt,efi)" --menu "" 0 0 0 \
|
|
||||||
"${options[@]}" \
|
|
||||||
3>&1 1>&2 2>&3)
|
|
||||||
if [ "$?" = "0" ]; then
|
if [ "$?" = "0" ]; then
|
||||||
if (whiptail --backtitle "${apptitle}" --title "${txtautoparts} (gpt,efi)" --yesno "${txtautopartsconfirm//%1/${device}}" --defaultno 0 0) then
|
if (whiptail --backtitle "${apptitle}" --title "${txtautoparts} (gpt,efi)" --yesno "${txtautopartsconfirm//%1/${device}}" --defaultno 0 0) then
|
||||||
clear
|
clear
|
||||||
|
@ -337,14 +335,7 @@ diskpartautoefi(){
|
||||||
}
|
}
|
||||||
|
|
||||||
diskpartautoefiusb(){
|
diskpartautoefiusb(){
|
||||||
items=$(lsblk -d -p -n -l -o NAME -e 7,11)
|
device=$(selectdisk "${txtautoparts} (gpt,efi)")
|
||||||
options=()
|
|
||||||
for item in ${items}; do
|
|
||||||
options+=("${item}" "")
|
|
||||||
done
|
|
||||||
device=$(whiptail --backtitle "${apptitle}" --title "${txtautoparts} (gpt,efi)" --menu "" 0 0 0 \
|
|
||||||
"${options[@]}" \
|
|
||||||
3>&1 1>&2 2>&3)
|
|
||||||
if [ "$?" = "0" ]; then
|
if [ "$?" = "0" ]; then
|
||||||
if (whiptail --backtitle "${apptitle}" --title "${txtautoparts} (gpt,efi)" --yesno "${txtautopartsconfirm//%1/${device}}" --defaultno 0 0) then
|
if (whiptail --backtitle "${apptitle}" --title "${txtautoparts} (gpt,efi)" --yesno "${txtautopartsconfirm//%1/${device}}" --defaultno 0 0) then
|
||||||
clear
|
clear
|
||||||
|
@ -375,14 +366,7 @@ diskpartautoefiusb(){
|
||||||
}
|
}
|
||||||
|
|
||||||
diskpartcfdisk(){
|
diskpartcfdisk(){
|
||||||
items=$(lsblk -d -p -n -l -o NAME -e 7,11)
|
device=$( selectdisk "${txteditparts} (cfdisk)" )
|
||||||
options=()
|
|
||||||
for item in ${items}; do
|
|
||||||
options+=("${item}" "")
|
|
||||||
done
|
|
||||||
device=$(whiptail --backtitle "${apptitle}" --title "${txteditparts} (cfdisk)" --menu "" 0 0 0 \
|
|
||||||
"${options[@]}" \
|
|
||||||
3>&1 1>&2 2>&3)
|
|
||||||
if [ "$?" = "0" ]; then
|
if [ "$?" = "0" ]; then
|
||||||
clear
|
clear
|
||||||
cfdisk ${device}
|
cfdisk ${device}
|
||||||
|
@ -390,14 +374,7 @@ diskpartcfdisk(){
|
||||||
}
|
}
|
||||||
|
|
||||||
diskpartcgdisk(){
|
diskpartcgdisk(){
|
||||||
items=$(lsblk -d -p -n -l -o NAME -e 7,11)
|
device=$( selectdisk "${txteditparts} (cgdisk)" )
|
||||||
options=()
|
|
||||||
for item in ${items}; do
|
|
||||||
options+=("${item}" "")
|
|
||||||
done
|
|
||||||
device=$(whiptail --backtitle "${apptitle}" --title "${txteditparts} (cfdisk)" --menu "" 0 0 0 \
|
|
||||||
"${options[@]}" \
|
|
||||||
3>&1 1>&2 2>&3)
|
|
||||||
if [ "$?" = "0" ]; then
|
if [ "$?" = "0" ]; then
|
||||||
clear
|
clear
|
||||||
cgdisk ${device}
|
cgdisk ${device}
|
||||||
|
@ -749,7 +726,8 @@ installmenu(){
|
||||||
fi
|
fi
|
||||||
options=()
|
options=()
|
||||||
options+=("${txteditmirrorlist}" "(${txtoptional})")
|
options+=("${txteditmirrorlist}" "(${txtoptional})")
|
||||||
options+=("${txtinstallarchlinux}" "pacstrap base linux")
|
options+=("${txtinstallarchlinux}" "pacstrap base kernel")
|
||||||
|
options+=("${txtinstallfirmware}" "(${txtoptional}) pacstrap linux-firmware")
|
||||||
options+=("${txtconfigarchlinux}" "")
|
options+=("${txtconfigarchlinux}" "")
|
||||||
sel=$(whiptail --backtitle "${apptitle}" --title "${txtinstallmenu}" --menu "" --cancel-button "${txtunmount}" --default-item "${nextitem}" 0 0 0 \
|
sel=$(whiptail --backtitle "${apptitle}" --title "${txtinstallmenu}" --menu "" --cancel-button "${txtunmount}" --default-item "${nextitem}" 0 0 0 \
|
||||||
"${options[@]}" \
|
"${options[@]}" \
|
||||||
|
@ -761,7 +739,12 @@ installmenu(){
|
||||||
nextitem="${txtinstallarchlinux}"
|
nextitem="${txtinstallarchlinux}"
|
||||||
;;
|
;;
|
||||||
"${txtinstallarchlinux}")
|
"${txtinstallarchlinux}")
|
||||||
installbase
|
if(installbase) then
|
||||||
|
nextitem="${txtinstallfirmware}"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
"${txtinstallfirmware}")
|
||||||
|
installfirmware
|
||||||
nextitem="${txtconfigarchlinux}"
|
nextitem="${txtconfigarchlinux}"
|
||||||
;;
|
;;
|
||||||
"${txtconfigarchlinux}")
|
"${txtconfigarchlinux}")
|
||||||
|
@ -777,8 +760,29 @@ installmenu(){
|
||||||
|
|
||||||
installbase(){
|
installbase(){
|
||||||
clear
|
clear
|
||||||
echo "pacstrap /mnt base linux"
|
pkgs="base"
|
||||||
pacstrap /mnt base linux
|
options=()
|
||||||
|
options+=("linux" "")
|
||||||
|
options+=("linux-lts" "")
|
||||||
|
options+=("linux-zen" "")
|
||||||
|
options+=("linux-hardened" "")
|
||||||
|
sel=$(whiptail --backtitle "${apptitle}" --title "Kernel" --menu "" 0 0 0 \
|
||||||
|
"${options[@]}" \
|
||||||
|
3>&1 1>&2 2>&3)
|
||||||
|
if [ "$?" = "0" ]; then
|
||||||
|
pkgs+=" ${sel}"
|
||||||
|
else
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
echo "pacstrap /mnt ${pkgs}"
|
||||||
|
pacstrap /mnt ${pkgs}
|
||||||
|
pressanykey
|
||||||
|
}
|
||||||
|
|
||||||
|
installfirmware(){
|
||||||
|
clear
|
||||||
|
echo "pacstrap /mnt linux-firmware"
|
||||||
|
pacstrap /mnt linux-firmware
|
||||||
pressanykey
|
pressanykey
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1270,14 +1274,7 @@ archgrubinstallchroot(){
|
||||||
}
|
}
|
||||||
|
|
||||||
archgrubinstallbootloader(){
|
archgrubinstallbootloader(){
|
||||||
items=$(lsblk -d -p -n -l -o NAME -e 7,11)
|
device=$( selectdisk "${txtinstall//%1/bootloader}" )
|
||||||
options=()
|
|
||||||
for item in ${items}; do
|
|
||||||
options+=("${item}" "")
|
|
||||||
done
|
|
||||||
device=$(whiptail --backtitle "${apptitle}" --title "${txtinstall//%1/bootloader}" --menu "" 0 0 0 \
|
|
||||||
"${options[@]}" \
|
|
||||||
3>&1 1>&2 2>&3)
|
|
||||||
if [ "$?" = "0" ]; then
|
if [ "$?" = "0" ]; then
|
||||||
if [ "${eficomputer}" == "1" ]; then
|
if [ "${eficomputer}" == "1" ]; then
|
||||||
options=()
|
options=()
|
||||||
|
@ -1751,6 +1748,7 @@ loadstrings(){
|
||||||
|
|
||||||
txteditmirrorlist="Edit mirrorlist"
|
txteditmirrorlist="Edit mirrorlist"
|
||||||
txtinstallarchlinux="Install Arch Linux"
|
txtinstallarchlinux="Install Arch Linux"
|
||||||
|
txtinstallfirmware="Install Firmware"
|
||||||
txtconfigarchlinux="Config Arch Linux"
|
txtconfigarchlinux="Config Arch Linux"
|
||||||
|
|
||||||
txtsethostname="Set Computer Name"
|
txtsethostname="Set Computer Name"
|
||||||
|
|
|
@ -60,6 +60,7 @@ txtarchinstallmenu="Arch Install Menu"
|
||||||
|
|
||||||
txteditmirrorlist="Edit mirrorlist"
|
txteditmirrorlist="Edit mirrorlist"
|
||||||
txtinstallarchlinux="Install Arch Linux"
|
txtinstallarchlinux="Install Arch Linux"
|
||||||
|
txtinstallfirmware="Install Firmware"
|
||||||
txtconfigarchlinux="Config Arch Linux"
|
txtconfigarchlinux="Config Arch Linux"
|
||||||
|
|
||||||
txtsethostname="Set Computer Name"
|
txtsethostname="Set Computer Name"
|
||||||
|
|
|
@ -60,6 +60,7 @@ txtarchinstallmenu="Menu Installation Arch Linux"
|
||||||
|
|
||||||
txteditmirrorlist="Éditer mirrorlist"
|
txteditmirrorlist="Éditer mirrorlist"
|
||||||
txtinstallarchlinux="Installer Arch Linux"
|
txtinstallarchlinux="Installer Arch Linux"
|
||||||
|
txtinstallfirmware="Installer les firmwares"
|
||||||
txtconfigarchlinux="Configurer Arch Linux"
|
txtconfigarchlinux="Configurer Arch Linux"
|
||||||
|
|
||||||
txtsethostname="Définir le nom de l'ordinateur"
|
txtsethostname="Définir le nom de l'ordinateur"
|
||||||
|
|
Loading…
Reference in a new issue