[ONE images] fedora/rocky, disable grub's os-prober, set hostname

This commit is contained in:
fnux 2024-04-16 09:56:12 +02:00
parent 390313eac8
commit f6566612b9
No known key found for this signature in database
GPG Key ID: 4502C902C00A1E12
2 changed files with 4 additions and 2 deletions

View File

@ -144,6 +144,7 @@ kernel_version=$(ls /mnt/boot | grep "vmlinuz.*.$ARCH" | cut -d- -f2-)
run_root dracut --force --kver $kernel_version
# Configure grub2.
echo "GRUB_DISABLE_OS_PROBER=true" >> /mnt/etc/default/grub
run_root grub2-install --target=i386-pc "${NBD_DEVICE}"
run_root grub2-mkconfig -o /boot/grub2/grub.cfg
@ -163,7 +164,7 @@ EOF
run_root rm -f /etc/machine-id
run_root touch /etc/machine-id
rm -f /var/lib/systemd/random-seed
run_root hostnamectl set-hostname fedora
echo "fedora" > /mnt/etc/hostname
# Remove temporary files and reclaim freed disk space.
# Note: build logs could be removed as well.

View File

@ -148,6 +148,7 @@ kernel_version=$(ls /mnt/boot | grep "vmlinuz.*.$ARCH" | cut -d- -f2-)
run_root dracut --force --kver $kernel_version
# Configure grub2.
echo "GRUB_DISABLE_OS_PROBER=true" >> /mnt/etc/default/grub
run_root grub2-install --target=i386-pc "${NBD_DEVICE}"
run_root grub2-mkconfig -o /boot/grub2/grub.cfg
@ -167,7 +168,7 @@ EOF
run_root rm -f /etc/machine-id
run_root touch /etc/machine-id
rm -f /var/lib/systemd/random-seed
run_root hostnamectl set-hostname rocky
echo "rocky" > /mnt/etc/hostname
# Remove temporary files and reclaim freed disk space.
# Note: build logs could be removed as well.