Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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?
share|improve this answer
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 May 30 '13 at 18:58
sorry, my mistake. Glad that you figured it out yourself. – xpt May 30 '13 at 22:38
up vote 0 down vote accepted

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"
share|improve this answer

You must log in to answer this question.

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