Add nvme module to mkinitcpio.conf if needed
This commit is contained in:
parent
3cb3bfc2fe
commit
8f6c28fe3b
1 changed files with 40 additions and 7 deletions
45
archfi
45
archfi
|
@ -464,6 +464,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
|
||||||
}
|
}
|
||||||
|
@ -802,7 +809,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)")
|
||||||
|
@ -846,22 +856,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
|
||||||
|
if [ "$isnvme" = "1" ]; then
|
||||||
|
nextitem="${txtgenerate//%1/mkinitcpio.conf-nvme}"
|
||||||
else
|
else
|
||||||
nextitem="$txtbootloader"
|
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}")
|
||||||
|
@ -1101,13 +1127,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
|
||||||
|
|
Loading…
Reference in a new issue