All of lore.kernel.org
 help / color / mirror / Atom feed
* [Virtio-fs] Convenience vmlinuz link auto-update patch for direct-kernel booting
@ 2020-11-14 19:49 Harry G. Coin
  0 siblings, 0 replies; only message in thread
From: Harry G. Coin @ 2020-11-14 19:49 UTC (permalink / raw)
  To: virtio-fs

It's bothersome to require VM hosts using direct kernel virtio-fs
booting to have to puzzle out what the latest kernel / initramfs rev is
in the guest.

If in the guest you create /etc/kernel/postinst.d/update_boot_links

with this:

#!/bin/bash
#Used by vm host to boot latest kernel without having to update kernel
spec in the host.
KERNEL_VERSION="$1"
#KERNEL_IMAGE="$2"

cd /boot
ln -sf vmlinuz-$KERNEL_VERSION /boot/vmlinuz
ln -sf initramfs-$KERNEL_VERSION.img /boot/initrd.img

then

chmod 0755 /etc/kernel/postinst.d/update_boot_links

Then in on the host under 'boot options' put as the kernel path

/path/to/guest/vmlinuz  

and

/path/to/guest/initrd.img

in the initrd path and

root=virtiofs:myfs  rd.shell

in the kernel args (and have updated dracut as indicated in the message
titled

HOWTO: direct kernel 'root=virtiofs:myfs' boot on 'vanilla'
Fedora/RHEL/Centos releases.

)

Your vm will boot the most recently installed kernel without your having
to update the xml spec in the host.

Hope this helps!

Harry Coin








^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-11-14 19:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-14 19:49 [Virtio-fs] Convenience vmlinuz link auto-update patch for direct-kernel booting Harry G. Coin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.