Merge pull request #207 from GauntletWizard/master

Add partition labels to partitioned disks
This commit is contained in:
MatMoul 2022-10-15 00:53:51 +02:00 committed by GitHub
commit 4dbf136a06
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

14
archfi
View file

@ -283,15 +283,15 @@ diskpartautogpt(){
echo "${txtautopartclear}" echo "${txtautopartclear}"
parted ${device} mklabel gpt parted ${device} mklabel gpt
echo "${txtautopartcreate//%1/BIOS boot}" echo "${txtautopartcreate//%1/BIOS boot}"
sgdisk ${device} -n=1:0:+31M -t=1:ef02 sgdisk ${device} -n=1:0:+31M -t=1:ef02 -c=0:mbrboot
echo "${txtautopartcreate//%1/boot}" echo "${txtautopartcreate//%1/boot}"
sgdisk ${device} -n=2:0:+512M sgdisk ${device} -n=2:0:+512M -c=0:boot
echo "${txtautopartcreate//%1/swap}" echo "${txtautopartcreate//%1/swap}"
swapsize=$(cat /proc/meminfo | grep MemTotal | awk '{ print $2 }') swapsize=$(cat /proc/meminfo | grep MemTotal | awk '{ print $2 }')
swapsize=$((${swapsize}/1000))"M" swapsize=$((${swapsize}/1000))"M"
sgdisk ${device} -n=3:0:+${swapsize} -t=3:8200 sgdisk ${device} -n=3:0:+${swapsize} -t=3:8200 -c=0:swap
echo "${txtautopartcreate//%1/root}" echo "${txtautopartcreate//%1/root}"
sgdisk ${device} -n=4:0:0 sgdisk ${device} -n=4:0:0 -c=0:root
echo "" echo ""
pressanykey pressanykey
if [ "${device::8}" == "/dev/nvm" ]; then if [ "${device::8}" == "/dev/nvm" ]; then
@ -316,13 +316,13 @@ diskpartautoefi(){
echo "${txtautopartclear}" echo "${txtautopartclear}"
parted ${device} mklabel gpt parted ${device} mklabel gpt
echo "${txtautopartcreate//%1/EFI boot}" echo "${txtautopartcreate//%1/EFI boot}"
sgdisk ${device} -n=1:0:+1024M -t=1:ef00 sgdisk ${device} -n=1:0:+1024M -t=1:ef00 -c=0:boot
echo "${txtautopartcreate//%1/swap}" echo "${txtautopartcreate//%1/swap}"
swapsize=$(cat /proc/meminfo | grep MemTotal | awk '{ print $2 }') swapsize=$(cat /proc/meminfo | grep MemTotal | awk '{ print $2 }')
swapsize=$((${swapsize}/1000))"M" swapsize=$((${swapsize}/1000))"M"
sgdisk ${device} -n=2:0:+${swapsize} -t=2:8200 sgdisk ${device} -n=2:0:+${swapsize} -t=2:8200 -c=0:swap
echo "${txtautopartcreate//%1/root}" echo "${txtautopartcreate//%1/root}"
sgdisk ${device} -n=3:0:0 sgdisk ${device} -n=3:0:0 -c=0:root
echo "" echo ""
pressanykey pressanykey
if [ "${device::8}" == "/dev/nvm" ]; then if [ "${device::8}" == "/dev/nvm" ]; then