GUIDs zu UUIDs geändert, sodass mounting funktioniert.

This commit is contained in:
eichehome 2023-09-26 17:22:27 +02:00
parent 3194164a16
commit ca2f546040

View file

@ -1,5 +1,6 @@
#!/usr/bin/bash #!/usr/bin/bash
DEVICE="ArchOS.raw" #DEVICE="ArchOS.raw"
DEVICE="/dev/vda"
declare -A GUID="" declare -A GUID=""
GUID=([ESP]="c12a7328-f81f-11d2-ba4b-00a0c93ec93b" [ROOT]="4f68bce3-e8cd-4db1-96e7-fbcaf984b709") GUID=([ESP]="c12a7328-f81f-11d2-ba4b-00a0c93ec93b" [ROOT]="4f68bce3-e8cd-4db1-96e7-fbcaf984b709")
@ -16,7 +17,7 @@ SizeMaxBytes=512M
Format=vfat Format=vfat
EOF EOF
cat > 20-root.conf << EOF cat > 30-root.conf << EOF
[Partition] [Partition]
Type=root Type=root
Label=ArchOS Build Root Label=ArchOS Build Root
@ -24,7 +25,7 @@ Format=ext4
GrowFileSystem=yes GrowFileSystem=yes
EOF EOF
cat > 30-swap.conf << EOF cat > 20-swap.conf << EOF
[Partition] [Partition]
Type=swap Type=swap
Label=ArchOS Build Swap Label=ArchOS Build Swap
@ -36,14 +37,20 @@ EOF
cd .. cd ..
# Temporär # Temporär
touch "${DEVICE}" #touch "${DEVICE}"
systemd-repart --definitions=repart --dry-run=no --size=auto --empty=allow "${DEVICE}" #systemd-repart --definitions=repart --dry-run=no --size=auto --empty=allow "${DEVICE}"
systemd-repart --definitions=repart --dry-run=no --empty=allow "${DEVICE}"
#systemd-repart --definitions=repart --dry-run=no --size=10G --empty=create "${DEVICE}" #systemd-repart --definitions=repart --dry-run=no --size=10G --empty=create "${DEVICE}"
mount /dev/disk/by-partuuid/"${GUID[ROOT]}" /mnt UUID_ROOT=$(lsblk -lo PARTTYPE,PARTUUID "${DEVICE}" | grep -i "${GUID[ROOT]}" | awk '{ print $2 }')
UUID_ESP=$(lsblk -lo PARTTYPE,PARTUUID "${DEVICE}" | grep -i "${GUID[ESP]}" | awk '{ print $2 }')
declare -A UUID=""
UUID=( [ROOT]="${UUID_ROOT}" [ESP]="${UUID_ESP}" )
mount /dev/disk/by-partuuid/"${UUID[ROOT]}" /mnt
mkdir -p /mnt/boot mkdir -p /mnt/boot
mount /dev/disk/by-partuuid/"${GUID[ESP]}" /mnt/boot mount /dev/disk/by-partuuid/"${UUID[ESP]}" /mnt/boot
# Pacman im Live-System konfigurieren # Pacman im Live-System konfigurieren
sed -i 's/#\(Color\)/\1/' /etc/pacman.conf sed -i 's/#\(Color\)/\1/' /etc/pacman.conf
@ -57,12 +64,12 @@ KEYMAP="de-latin1"
HOSTNAME_NEW="arch-build" HOSTNAME_NEW="arch-build"
KERNEL="linux" KERNEL="linux"
BASE=(base) BASE=( base )
INITRD=(mkinitcpio) INITRD=( mkinitcpio )
MICROCODE="amd-ucode" MICROCODE="amd-ucode"
WIFI_BACKEND=(wpa_supplicant) WIFI_BACKEND=( wpa_supplicant )
NETWORK=(iptables-nft firewalld inetutils avahi networkmanager networkmanager-openconnect networkmanager-openvpn networkmanager-pptp networkmanager-vpnc "${WIFI_BACKEND[@]}" modemmanager) NETWORK=( iptables-nft firewalld inetutils avahi networkmanager networkmanager-openconnect networkmanager-openvpn networkmanager-pptp networkmanager-vpnc "${WIFI_BACKEND[@]}" modemmanager )
OTHER=(vim mkosi git lynx openssh htop bash-completion man-db man-pages reflector "${BASE[@]}" "${INITRD[@]}" plymouth linux-firmware xdg-utils) OTHER=( vim mkosi git lynx openssh htop bash-completion man-db man-pages reflector "${BASE[@]}" "${INITRD[@]}" plymouth linux-firmware xdg-utils )
pacstrap /mnt "${KERNEL}" "${MICROCODE}" "${NETWORK[@]}" "${OTHER[@]}" pacstrap /mnt "${KERNEL}" "${MICROCODE}" "${NETWORK[@]}" "${OTHER[@]}"
arch-chroot /mnt hwclock --systohc arch-chroot /mnt hwclock --systohc