New Release : 2019.01.10.23.04.13
This commit is contained in:
commit
ac2bcaec57
1 changed files with 97 additions and 24 deletions
121
archfi
121
archfi
|
@ -12,7 +12,11 @@
|
||||||
# referance : https://wiki.archlinux.org/index.php/Installation_guide
|
# referance : https://wiki.archlinux.org/index.php/Installation_guide
|
||||||
|
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
apptitle="Arch Linux Fast Install (archfi) - Version: 2019.01.01.20.34.17 (GPLv3)"
|
apptitle="Arch Linux Fast Install (archfi) - Version: 2019.01.01.20.34.17 (GPLv3)"
|
||||||
|
=======
|
||||||
|
apptitle="Arch Linux Fast Install (archfi) - Version: 2019.01.10.23.04.13 (GPLv3)"
|
||||||
|
>>>>>>> src
|
||||||
baseurl=https://raw.githubusercontent.com/MatMoul/archfi/master
|
baseurl=https://raw.githubusercontent.com/MatMoul/archfi/master
|
||||||
skipfont="0"
|
skipfont="0"
|
||||||
|
|
||||||
|
@ -243,9 +247,15 @@ diskpartautodos(){
|
||||||
sleep 1
|
sleep 1
|
||||||
echo ""
|
echo ""
|
||||||
pressanykey
|
pressanykey
|
||||||
bootdev=$device"1"
|
if [ "${device::8}" == "/dev/nvm" ]; then
|
||||||
swapdev=$device"2"
|
bootdev=$device"p1"
|
||||||
rootdev=$device"3"
|
swapdev=$device"p2"
|
||||||
|
rootdev=$device"p3"
|
||||||
|
else
|
||||||
|
bootdev=$device"1"
|
||||||
|
swapdev=$device"2"
|
||||||
|
rootdev=$device"3"
|
||||||
|
fi
|
||||||
efimode="0"
|
efimode="0"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -277,9 +287,15 @@ diskpartautogpt(){
|
||||||
sgdisk $device -n=4:0:0
|
sgdisk $device -n=4:0:0
|
||||||
echo ""
|
echo ""
|
||||||
pressanykey
|
pressanykey
|
||||||
bootdev=$device"2"
|
if [ "${device::8}" == "/dev/nvm" ]; then
|
||||||
swapdev=$device"3"
|
bootdev=$device"p2"
|
||||||
rootdev=$device"4"
|
swapdev=$device"p3"
|
||||||
|
rootdev=$device"p4"
|
||||||
|
else
|
||||||
|
bootdev=$device"2"
|
||||||
|
swapdev=$device"3"
|
||||||
|
rootdev=$device"4"
|
||||||
|
fi
|
||||||
efimode="0"
|
efimode="0"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -309,9 +325,15 @@ diskpartautoefi(){
|
||||||
sgdisk $device -n=4:0:0
|
sgdisk $device -n=4:0:0
|
||||||
echo ""
|
echo ""
|
||||||
pressanykey
|
pressanykey
|
||||||
bootdev=$device"1"
|
if [ "${device::8}" == "/dev/nvm" ]; then
|
||||||
swapdev=$device"3"
|
bootdev=$device"p1"
|
||||||
rootdev=$device"4"
|
swapdev=$device"p3"
|
||||||
|
rootdev=$device"p4"
|
||||||
|
else
|
||||||
|
bootdev=$device"1"
|
||||||
|
swapdev=$device"3"
|
||||||
|
rootdev=$device"4"
|
||||||
|
fi
|
||||||
efimode="1"
|
efimode="1"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -341,9 +363,15 @@ diskpartautoefiusb(){
|
||||||
echo -e "r\nh\n3\nN\n\nY\nN\nw\nY\n" | gdisk $device
|
echo -e "r\nh\n3\nN\n\nY\nN\nw\nY\n" | gdisk $device
|
||||||
echo ""
|
echo ""
|
||||||
pressanykey
|
pressanykey
|
||||||
bootdev=$device"1"
|
if [ "${device::8}" == "/dev/nvm" ]; then
|
||||||
swapdev=
|
bootdev=$device"p1"
|
||||||
rootdev=$device"4"
|
swapdev=
|
||||||
|
rootdev=$device"p4"
|
||||||
|
else
|
||||||
|
bootdev=$device"1"
|
||||||
|
swapdev=
|
||||||
|
rootdev=$device"4"
|
||||||
|
fi
|
||||||
efimode="2"
|
efimode="2"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -440,6 +468,13 @@ selectparts(){
|
||||||
msg=$msg"root : "$rootdev"\n"
|
msg=$msg"root : "$rootdev"\n"
|
||||||
msg=$msg"home : "$homedev"\n\n"
|
msg=$msg"home : "$homedev"\n\n"
|
||||||
if (whiptail --backtitle "$apptitle" --title "$txtselectpartsmenu" --yesno "$msg" 0 0) then
|
if (whiptail --backtitle "$apptitle" --title "$txtselectpartsmenu" --yesno "$msg" 0 0) then
|
||||||
|
isnvme=0
|
||||||
|
if [ "${bootdev::8}" == "/dev/nvm" ]; then
|
||||||
|
isnvme=1
|
||||||
|
fi
|
||||||
|
if [ "${rootdev::8}" == "/dev/nvm" ]; then
|
||||||
|
isnvme=1
|
||||||
|
fi
|
||||||
mountmenu
|
mountmenu
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -778,7 +813,10 @@ archmenu(){
|
||||||
options+=("${txtgenerate//%1/crypttab}" "")
|
options+=("${txtgenerate//%1/crypttab}" "")
|
||||||
fi
|
fi
|
||||||
if [ "$luksroot" = "1" ]; then
|
if [ "$luksroot" = "1" ]; then
|
||||||
options+=("${txtgenerate//%1/mkinitcpio.conf}" "(encrypt hooks)")
|
options+=("${txtgenerate//%1/mkinitcpio.conf-luks}" "(encrypt hooks)")
|
||||||
|
fi
|
||||||
|
if [ "$isnvme" = "1" ]; then
|
||||||
|
options+=("${txtgenerate//%1/mkinitcpio.conf-nvme}" "(nvme module)")
|
||||||
fi
|
fi
|
||||||
options+=("${txtedit//%1/fstab}" "($txtoptional)")
|
options+=("${txtedit//%1/fstab}" "($txtoptional)")
|
||||||
options+=("${txtedit//%1/crypttab}" "($txtoptional)")
|
options+=("${txtedit//%1/crypttab}" "($txtoptional)")
|
||||||
|
@ -822,22 +860,38 @@ archmenu(){
|
||||||
nextitem="${txtgenerate//%1/crypttab}"
|
nextitem="${txtgenerate//%1/crypttab}"
|
||||||
else
|
else
|
||||||
if [ "$luksroot" = "1" ]; then
|
if [ "$luksroot" = "1" ]; then
|
||||||
nextitem="${txtgenerate//%1/mkinitcpio.conf}"
|
nextitem="${txtgenerate//%1/mkinitcpio.conf-luks}"
|
||||||
else
|
else
|
||||||
nextitem="$txtbootloader"
|
if [ "$isnvme" = "1" ]; then
|
||||||
|
nextitem="${txtgenerate//%1/mkinitcpio.conf-nvme}"
|
||||||
|
else
|
||||||
|
nextitem="$txtbootloader"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"${txtgenerate//%1/crypttab}")
|
"${txtgenerate//%1/crypttab}")
|
||||||
archgencrypttab
|
archgencrypttab
|
||||||
if [ "$luksroot" = "1" ]; then
|
if [ "$luksroot" = "1" ]; then
|
||||||
nextitem="${txtgenerate//%1/mkinitcpio.conf}"
|
nextitem="${txtgenerate//%1/mkinitcpio.conf-luks}"
|
||||||
|
else
|
||||||
|
if [ "$isnvme" = "1" ]; then
|
||||||
|
nextitem="${txtgenerate//%1/mkinitcpio.conf-nvme}"
|
||||||
|
else
|
||||||
|
nextitem="$txtbootloader"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
"${txtgenerate//%1/mkinitcpio.conf-luks}")
|
||||||
|
archgenmkinitcpioluks
|
||||||
|
if [ "$isnvme" = "1" ]; then
|
||||||
|
nextitem="${txtgenerate//%1/mkinitcpio.conf-nvme}"
|
||||||
else
|
else
|
||||||
nextitem="$txtbootloader"
|
nextitem="$txtbootloader"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"${txtgenerate//%1/mkinitcpio.conf}")
|
"${txtgenerate//%1/mkinitcpio.conf-nvme}")
|
||||||
archgenmkinitcpio
|
archgenmkinitcpionvme
|
||||||
nextitem="$txtbootloader"
|
nextitem="$txtbootloader"
|
||||||
;;
|
;;
|
||||||
"${txtedit//%1/fstab}")
|
"${txtedit//%1/fstab}")
|
||||||
|
@ -1077,13 +1131,20 @@ archgencrypttab(){
|
||||||
pressanykey
|
pressanykey
|
||||||
}
|
}
|
||||||
|
|
||||||
archgenmkinitcpio(){
|
archgenmkinitcpioluks(){
|
||||||
clear
|
clear
|
||||||
echo "sed -i \"s/block filesystems/block encrypt filesystems/g\" /mnt/etc/mkinitcpio.conf"
|
echo "sed -i \"s/block filesystems/block encrypt filesystems/g\" /mnt/etc/mkinitcpio.conf"
|
||||||
sed -i "s/block filesystems/block encrypt filesystems/g" /mnt/etc/mkinitcpio.conf
|
sed -i "s/block filesystems/block encrypt filesystems/g" /mnt/etc/mkinitcpio.conf
|
||||||
archchroot genmkinitcpio
|
archchroot genmkinitcpio
|
||||||
pressanykey
|
pressanykey
|
||||||
}
|
}
|
||||||
|
archgenmkinitcpionvme(){
|
||||||
|
clear
|
||||||
|
echo "sed -i \"s/MODULES=()/MODULES=(nvme)/g\" /mnt/etc/mkinitcpio.conf"
|
||||||
|
sed -i "s/MODULES=()/MODULES=(nvme)/g" /mnt/etc/mkinitcpio.conf
|
||||||
|
archchroot genmkinitcpio
|
||||||
|
pressanykey
|
||||||
|
}
|
||||||
|
|
||||||
archeditmkinitcpio(){
|
archeditmkinitcpio(){
|
||||||
$EDITOR /mnt/etc/mkinitcpio.conf
|
$EDITOR /mnt/etc/mkinitcpio.conf
|
||||||
|
@ -1324,9 +1385,16 @@ archsyslinuxinstall(){
|
||||||
additionalpkg=$additionalpkg"efibootmgr "
|
additionalpkg=$additionalpkg"efibootmgr "
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$(parted ${realrootdev::8} print|grep gpt)" != "" ]; then
|
if [ "$isnvme" = "1" ]; then
|
||||||
echo "$txtsyslinuxaddgptfdisk"
|
if [ "$(parted ${realrootdev::(-2)} print|grep gpt)" != "" ]; then
|
||||||
additionalpkg=$additionalpkg"gptfdisk "
|
echo "$txtsyslinuxaddgptfdisk"
|
||||||
|
additionalpkg=$additionalpkg"gptfdisk "
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ "$(parted ${realrootdev::8} print|grep gpt)" != "" ]; then
|
||||||
|
echo "$txtsyslinuxaddgptfdisk"
|
||||||
|
additionalpkg=$additionalpkg"gptfdisk "
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$bootdev" != "" ]; then
|
if [ "$bootdev" != "" ]; then
|
||||||
|
@ -1371,9 +1439,14 @@ archsyslinuxinstallbootloaderchroot(){
|
||||||
archsyslinuxinstallbootloaderefichroot(){
|
archsyslinuxinstallbootloaderefichroot(){
|
||||||
if [ ! "$1" = "none" ]; then
|
if [ ! "$1" = "none" ]; then
|
||||||
echo "cp -r /usr/lib/syslinux/efi64/* /boot/syslinux"
|
echo "cp -r /usr/lib/syslinux/efi64/* /boot/syslinux"
|
||||||
echo "efibootmgr --create --disk ${1::8} --part ${1:(-1)} --loader /syslinux/syslinux.efi --label "Syslinux" --verbose"
|
|
||||||
cp -r /usr/lib/syslinux/efi64/* /boot/syslinux
|
cp -r /usr/lib/syslinux/efi64/* /boot/syslinux
|
||||||
efibootmgr --create --disk ${1::8} --part ${1:(-1)} --loader /syslinux/syslinux.efi --label "Syslinux" --verbose
|
if [ "${1::8}" == "/dev/nvm" ]; then
|
||||||
|
echo "efibootmgr --create --disk ${1::(-2)} --part ${1:(-1)} --loader /syslinux/syslinux.efi --label "Syslinux" --verbose"
|
||||||
|
efibootmgr --create --disk ${1::(-2)} --part ${1:(-1)} --loader /syslinux/syslinux.efi --label "Syslinux" --verbose
|
||||||
|
else
|
||||||
|
echo "efibootmgr --create --disk ${1::8} --part ${1:(-1)} --loader /syslinux/syslinux.efi --label "Syslinux" --verbose"
|
||||||
|
efibootmgr --create --disk ${1::8} --part ${1:(-1)} --loader /syslinux/syslinux.efi --label "Syslinux" --verbose
|
||||||
|
fi
|
||||||
isvbox=$(lspci | grep "VirtualBox G")
|
isvbox=$(lspci | grep "VirtualBox G")
|
||||||
if [ "$isvbox" ]; then
|
if [ "$isvbox" ]; then
|
||||||
echo "VirtualBox detected, creating startup.nsh..."
|
echo "VirtualBox detected, creating startup.nsh..."
|
||||||
|
|
Loading…
Reference in a new issue