[ONE images] fedora/rocky, disable grub's os-prober, set hostname
This commit is contained in:
parent
390313eac8
commit
f6566612b9
2 changed files with 4 additions and 2 deletions
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue