Merge branch 'fedora-fine-tuning' into 'master'

Fedora image script fine-tuning

See merge request ungleich-public/ungleich-tools!3
This commit is contained in:
fnux 2019-12-30 07:26:36 +01:00
commit 6b7f12d4eb

View file

@ -68,7 +68,7 @@ trap cleanup EXIT
# Create partition table, format partitions.
sfdisk --no-reread "$NBD_DEVICE" <<EOF
1M,100M,L,*
1M,500M,L,*
,,L
EOF
@ -83,8 +83,6 @@ mount "${NBD_DEVICE}p2" /mnt
mkdir /mnt/boot
mount "${NBD_DEVICE}p1" /mnt/boot
# XXX: dnf has a lot a weird (libX11?) dependencies, use microdnf instead?
dnf -y \
--releasever=$RELEASE \
--installroot=/mnt \
@ -130,7 +128,6 @@ run_root dnf -y install e2fsprogs
# Initalize base services.
run_root systemd-machine-id-setup
run_root systemctl enable systemd-networkd.service
run_root ln -sf /usr/share/zoneinfo/UTC /etc/localtime
run_root systemctl enable systemd-timesyncd.service
@ -144,7 +141,8 @@ run_root dnf -y install kernel grub2
cat > /mnt/etc/dracut.conf.d/virtio-blk.conf <<EOF
add_drivers="virtio-blk"
EOF
run_root dracut --force
kernel_version=$(ls /mnt/boot | grep "vmlinuz.*.$ARCH" | cut -d- -f2-)
run_root dracut --force --kver $kernel_version
# Configure grub2.
run_root grub2-install --target=i386-pc "${NBD_DEVICE}"