Fix extlinux disk UUID configuration

This commit is contained in:
Disassembler 2019-06-13 09:46:24 +02:00
parent 7186daeb1c
commit 446b855d03
No known key found for this signature in database
GPG Key ID: 524BD33A0EE29499

6
vm.sh
View File

@ -63,8 +63,8 @@ mount -t ext4 /dev/sda1 /mnt/boot
setup-disk -m sys /mnt
# Update boot-time volume information
BOOT_UUID=$(blkid -o value /dev/sda1 | head -1)
CRYPT_UUID=$(blkid -o value /dev/sda2 | head -1)
export BOOT_UUID=$(blkid -o value /dev/sda1 | head -1)
export CRYPT_UUID=$(blkid -o value /dev/sda2 | head -1)
cat <<EOF >/mnt/etc/fstab
/dev/vg0/root / ext4 rw,noatime,data=ordered 0 1
UUID=${BOOT_UUID} /boot ext4 rw,noatime,data=ordered 0 2
@ -87,7 +87,7 @@ chroot /mnt setup-timezone -z Europe/Prague
# Install basic system
apk --no-cache add apache2-utils gettext
wget https://repo.spotter.cz/vm.tar -O - | tar xf - -C /mnt
envsubst </boot/extlinux.conf.old >/boot/extlinux.conf
envsubst </mnt/boot/extlinux.conf.old >/mnt/boot/extlinux.conf
chroot /mnt apk --no-cache add bridge ca-certificates curl e2fsprogs-extra gettext iptables kbd-misc libressl lxc postfix nginx openssh-server openssh-sftp-server util-linux wireguard-virt@vm wireguard-tools-wg@vm acme-sh@vm vmmgr@vm
chroot /mnt newaliases
mkdir -p /mnt/var/log/lxc