Compare commits
No commits in common. "b66de48e8d4d2636463b2718ba7d5b32d64877f2" and "e8bd40f650f039e12edee442efbf9a265f85842d" have entirely different histories.
b66de48e8d
...
e8bd40f650
1 changed files with 8 additions and 36 deletions
44
install.uefi
44
install.uefi
|
@ -52,8 +52,7 @@ DEV=(base-devel "${KERNEL}-headers")
|
||||||
# Netzwerk
|
# Netzwerk
|
||||||
NET=(iptables-nft firewalld inetutils avahi networkmanager networkmanager-openconnect networkmanager-openvpn networkmanager-pptp networkmanager-vpnc modemmanager) #iwd bind(dig,host,nslookup)
|
NET=(iptables-nft firewalld inetutils avahi networkmanager networkmanager-openconnect networkmanager-openvpn networkmanager-pptp networkmanager-vpnc modemmanager) #iwd bind(dig,host,nslookup)
|
||||||
# Sontiges
|
# Sontiges
|
||||||
BASE=(base)
|
OTHER=(base linux-firmware plymouth mkinitcpio xdg-utils) #dracut
|
||||||
OTHER=("${BASE[@]}" linux-firmware plymouth mkinitcpio xdg-utils) #dracut
|
|
||||||
# Grafik
|
# Grafik
|
||||||
GRAPHIC_DRIVER=()
|
GRAPHIC_DRIVER=()
|
||||||
if [[ "${GRAPHICS_CARD}" == "amd" ]]; then
|
if [[ "${GRAPHICS_CARD}" == "amd" ]]; then
|
||||||
|
@ -98,46 +97,29 @@ sgdisk -n 0:0:0 -t 0:4f68bce3-e8cd-4db1-96e7-fbcaf984b709 -c 0:"System Root" "${
|
||||||
UUID_ESP=""
|
UUID_ESP=""
|
||||||
UUID_ROOT=""
|
UUID_ROOT=""
|
||||||
UUID_USR=""
|
UUID_USR=""
|
||||||
UUID_USRHASH=""
|
|
||||||
|
|
||||||
# Anzahl der Partitionen ermitteln
|
# Anzahl der Partitionen ermitteln
|
||||||
DRIVE_NAME=${DRIVE//\/dev\/}
|
DRIVE_NAME=${DRIVE//\/dev\/}
|
||||||
declare -i NUMBER_OF_PARTITIONS;
|
declare -i NUMBER_OF_PARTITIONS;
|
||||||
NUMBER_OF_PARTITIONS=$(lsblk | grep -c "${DRIVE_NAME}[0-9]")
|
NUMBER_OF_PARTITIONS=$(lsblk | grep -c "${DRIVE_NAME}")
|
||||||
declare -i UNKNOWN_PARTITIONS
|
|
||||||
|
|
||||||
NOCASEMATCH_UNSET=$(shopt -u | grep -c nocasematch)
|
NOCASEMATCH_UNSET=$(shopt -u | grep -c nocasematch)
|
||||||
if [[ $NOCASEMATCH_UNSET ]]; then
|
if [[ $NOCASEMATCH_UNSET ]]; then
|
||||||
shopt -s nocasematch
|
shopt -s nocasematch
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for (( i=${NUMBER_OF_PARTITIONS}; ${i} > 0 ; i=${i}-1 )) ; do
|
for (( i=${NUMBER_OF_PARTITIONS}; ${i} > 0 ; ${i}-- )) ; do
|
||||||
OUTPUT=$(sgdisk -i "${i}" "${DRIVE}")
|
OUTPUT=$(sgdisk -i "${i}" "${DRIVE}")
|
||||||
PARTITION_EXISTS=$(echo "${OUTPUT}" | grep -c "GUID")
|
PARTITION_EXISTS=$(echo "${OUTPUT}" | grep -c "GUID")
|
||||||
if [[ "${PARTITION_EXISTS}" != "0" ]]; then
|
if [[ "${PARTITION_EXISTS}" != "0" ]]; then
|
||||||
GUID_CODE=$(echo "${OUTPUT}" | grep "GUID code:" | cut -d ' ' -f 4)
|
GUID_CODE=$(echo "${OUTPUT}" | grep "GUID code:" | cut -d ' ' -f 4)
|
||||||
UUID=$(echo "${OUTPUT}" | grep "unique GUID:" | cut -d ' ' -f 4)
|
UUID=$(echo "${OUTPUT}" | grep "unique GUID:" | cut -d ' ' -f 4)
|
||||||
case $GUID_CODE in
|
case $GUID_CODE in
|
||||||
"8484680c-9521-48c6-9c11-b0720656f69e" )
|
"8484680c-9521-48c6-9c11-b0720656f69e" ) echo "USR-Partition, UUID: ${UUID} " ;;
|
||||||
echo "USR-Partition, UUID: ${UUID}"
|
'USR_HASH' ) echo "USRHASH-Partition" ;;
|
||||||
UUID_USR=${UUID}
|
"c12a7328-f81f-11d2-ba4b-00a0c93ec93b" ) echo "ESP-Partition, UUID: ${UUID}" ;;
|
||||||
;;
|
"4f68bce3-e8cd-4db1-96e7-fbcaf984b709" ) echo "Root-Partition, UUID: ${UUID}" ;;
|
||||||
"c12a7328-f81f-11d2-ba4b-00a0c93ec93b" )
|
* ) echo "Unbekannte Partition";;
|
||||||
echo "ESP-Partition, UUID: ${UUID}"
|
|
||||||
UUID_ESP=${UUID}
|
|
||||||
;;
|
|
||||||
"4f68bce3-e8cd-4db1-96e7-fbcaf984b709" )
|
|
||||||
echo "Root-Partition, UUID: ${UUID}"
|
|
||||||
UUID_ROOT=${UUID}
|
|
||||||
;;
|
|
||||||
"77ff5f63-e7b6-4633-acf4-1565b864c0e6" )
|
|
||||||
echo "Usrhash-Partition, UUID: ${UUID}"
|
|
||||||
UUID_USRHASH=${UUID}
|
|
||||||
;;
|
|
||||||
* )
|
|
||||||
echo "Unbekannte Partition"
|
|
||||||
UNKNOWN_PARTITIONS="${UNKNOWN_PARTITIONS}+1"
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
echo "no partition found"
|
echo "no partition found"
|
||||||
|
@ -149,16 +131,6 @@ if [[ $NOCASEMATCH_UNSET ]]; then
|
||||||
shopt -u nocasematch
|
shopt -u nocasematch
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${UNKNOWN_PARTITIONS}" > "0" ]]; then
|
|
||||||
if [[ "${UNKNOWN_PARTITIONS}" > "1" ]]; then
|
|
||||||
read -r -p "Mehrere Partitionen unbekannt. Trotzdem fortfahren? (j/N): " confirm
|
|
||||||
[[ "${confirm}" == [jJ] ]] || echo "Abbrechen" && exit 0
|
|
||||||
else
|
|
||||||
read -r -p "Eine Partition unbekannt. Trotzdem fortfahren? (j/N): " confirm
|
|
||||||
[[ "${confirm}" == [jJ] ]] || echo "Abbrechen" && exit 0
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkfs.vfat -n EFI -F 32 /dev/vda1
|
mkfs.vfat -n EFI -F 32 /dev/vda1
|
||||||
mkfs.ext4 -L usr /dev/vda2
|
mkfs.ext4 -L usr /dev/vda2
|
||||||
mkfs.ext4 -L root /dev/vda4
|
mkfs.ext4 -L root /dev/vda4
|
||||||
|
|
Loading…
Reference in a new issue