Handle loopback booting with dracut-live properly
dracut uses the `iso-scan/filename` kernel parameter for loopback booting with tools like Super Grub Disk, whereas live-boot uses the `findiso` parameter for this purpose. Conditionally set which one is used depending on the selected initramfs.
This commit is contained in:
parent
399393565c
commit
7349ab156f
|
@ -121,9 +121,22 @@ DEFAULT_INITRD="initrd.img-$(echo ${DEFAULT_KERNEL} | sed -e 's|vmlinuz-||')"
|
|||
|
||||
KERNEL_LIVE="/${INITFS}/${DEFAULT_KERNEL}"
|
||||
INITRD_LIVE="/${INITFS}/${DEFAULT_INITRD}"
|
||||
APPEND_LIVE="${LB_BOOTAPPEND_LIVE} findiso=\${iso_path}"
|
||||
FLAVOUR_LIVE="${DEFAULT_FLAVOUR}"
|
||||
|
||||
# live-boot and dracut use different kernel parameters for loopback
|
||||
# booting
|
||||
case "${LB_INITRAMFS}" in
|
||||
live-boot)
|
||||
APPEND_LIVE="${LB_BOOTAPPEND_LIVE} findiso=\${iso_path}"
|
||||
;;
|
||||
dracut-live)
|
||||
APPEND_LIVE="${LB_BOOTAPPEND_LIVE} iso-scan/filename=\${iso_path}"
|
||||
;;
|
||||
none)
|
||||
APPEND_LIVE="${LB_BOOTAPPEND_LIVE}"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Ensure fresh live entries
|
||||
LIVE_ENTRIES_TMP="${_TARGET}/live.cfg.tmp"
|
||||
rm -f "${LIVE_ENTRIES_TMP}"
|
||||
|
|
Loading…
Reference in New Issue