LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware 14.2 X86_64 with QEMU/KVM virtio failing to boot (https://www.linuxquestions.org/questions/slackware-14/slackware-14-2-x86_64-with-qemu-kvm-virtio-failing-to-boot-4175591800/)

the_zone 10-20-2016 01:22 AM

Slackware 14.2 X86_64 with QEMU/KVM virtio failing to boot
 
I have installed Slackware 14.2 x86_64 in a QEMU/KVM VM with the following options :

Code:

/usr/bin/qemu-system-x86_64  \
        -smp 4,cores=4,threads=2,sockets=1 \
        -enable-kvm \
        -m 8192 \
        -cdrom "/tmp/slackware64-14.2-install-dvd.iso" \
        -drive file=/images/PVMSlackware142_x86_64.qcow2,if=virtio,media=disk,cache=writeback,format=qcow2 \
        -boot once=d,menu=on \
        -net nic,vlan=0,model=i82551 \
        -net tap,vlan=0,ifname="$IFACE",script=no,downscript=no \
        -vga qxl \
        -name "Slackware64" $*

Booting failed due to the well known /dev/vda device issue in lilo.
So I followed the instructions of :

http://johnrey.es/index.php/2015/10/...to-be-defined/

Which most probably a nice excerpt of earlier discussions on this matter.


However lilo comes back to me with :
Fatal : open /boot/vmlinuz : No such file or directory

What steps am I missing here?

ponce 10-20-2016 02:04 AM

if can be useful, here is the /etc/lilo.conf is use on my virtual machines with virtio
Code:

compact
append=" vt.default_utf8=1"
disk = /dev/vda
  bios = 0x80
  max-partitions = 7
boot = /dev/vda

message = /boot/boot_message.txt

prompt
timeout = 50
change-rules
reset
vga = normal
image = /boot/vmlinuz
  initrd = /boot/initrd.gz
  root = /dev/vda1
  label = Linux
  read-only

before launching lilo to install it in the MBR of the virtual disk, I also create a /boot/initrd.gz file with this command
Code:

mkinitrd -c -k 4.4.19 -f ext4 -r /dev/vda1 -m virtio_blk:virtio_pci:virtio_balloon:virtio_net:virtio_mmio:virtio_input:virtio_console:virtio_scsi:virtio-rng:virtio-gpu:ext4 -u -o /boot/initrd.gz
try to apply this to your setup (shouldn't be that different).

in your case I would also check that you have the /boot/vmlinuz link in the filesystem of your virtual disk and that points to something actually there.
the error you got could be also that it simply doesn't find the virtual disk: in this case you can test the disk layout with the same command line but booting again from the cdrom and checking with "fdisk -l".

the_zone 10-20-2016 09:04 AM

Thanks Ponce.

Stupid me.

I had /boot on /dev/vda1

Mounting /dev/vda1 to /mnt/sysimage/boot

solved the issue !

atelszewski 10-22-2016 01:20 PM

Hi,

@ponce Do you really need all of those virtio modules in the initrd?
In my case it's just sufficient to have "virtio-pci:virtio-blk:virtio-scsi:ext4".

--
Best regards,
Andrzej Telszewski

ponce 10-23-2016 01:35 AM

Quote:

Originally Posted by atelszewski (Post 5621525)
@ponce Do you really need all of those virtio modules in the initrd?
In my case it's just sufficient to have "virtio-pci:virtio-blk:virtio-scsi:ext4".

when I thought about what to stuff in the initrd I decided to have all corner cases covered and just put them all.


All times are GMT -5. The time now is 05:15 AM.