Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

2 Answers

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
add comment
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.