0

I am trying to pass kernel parameters to a virtual OpenSuSE installation without typing them on a boot prompt, using the ability of KVM to load the kernel directly.

First, I mount the installation DVD like this (so the boot files are available on the host):

fuseiso openSUSE-12.3-NET-x86_64.iso ~/mnt/cdrom

then I spawn the virtual machine like this (there are more options, but I don't think they are relevant here):

kvm \
 -drive file=./openSUSE-12.3-NET-x86_64.iso,index=1,media=cdrom \
 -kernel ~/mnt/cdrom/boot/x86_64/vmlinuz-xen \
 -initrd ~/mnt/cdrom/boot/x86_64/initrd-xen

This results in the error message:

Direct floppy boot is not supported. Use a boot loader program instead.
Remove disk and press any key to reboot ...

which is the same message I would get if the initial ramdisk (initrd) was not valid. Using a similar setup with the CentOS 6.3 installer works fine. I am using QEmu-KVM version 1.0 (with Ubuntu Precise 12.04 as host).

Have anyone gotten this to work, and which initrd did you use in that case?

2 Answers 2

0

Two points.

  1. Is your VM able to boot without KVM specifying the kernel?
  2. I'm not sure, but if to use KVM to specify the kernel, have you tried using the path that is relative to the root of the VM, instead of using one that is outside the VM?
2
  • 1. Yes, if I boot in GUI mode (and with no kernel parameter) then it shows the usual installation screen. 2. What do you mean by "relative to the root of the VM"; KVM doesn't read the filesystem of the disks specified.
    – RolKau
    Commented May 30, 2013 at 18:58
  • sorry, my mistake. Glad that you figured it out yourself.
    – xpt
    Commented May 30, 2013 at 22:38
0

I managed (accidently) to figure this out myself; the kernel and the initial ram disk are in the loader/ subdirectory. Thus, the command to launch should be:

kvm \
 -drive file=./openSUSE-12.3-NET-x86_64.iso,index=1,media=cdrom \
 -nographic -vga none \
 -kernel ~/mnt/cdrom/boot/x86_64/loader/linux \
 -initrd ~/mnt/cdrom/boot/x86_64/loader/initrd \
 -append "serial console=ttyS0"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .