LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware 14RC2 install on qemu (https://www.linuxquestions.org/questions/slackware-14/slackware-14rc2-install-on-qemu-4175423798/)

NetNightmare 08-24-2012 09:40 AM

Slackware 14RC2 install on qemu
 
Hi all,

I was just wondering if there are plans to add to the installer support for virtio hdd ( /dev/vda ) since 13.37 did not , I tried to install the 14 but unfortunately seems thing have improved a little but not by much.

1) the installer has virtio support but lilo fails to install
2) I edited the lilo.conf adding
Code:

disk = /dev/vda boot=0x80 max-partitions=7
and added the relevant linux installation , the lilo fires up some warning like "Waring: /proc/partitions references Experimental major device : 252" but it does install

3) the stock kernel though fails to see my disk and dies orrible death with :
Code:

VFS:Cannot open root device "fc02" or unknown-block(252,2)
I know it can be done afterward recompiling kernel and such since I have a slackware 13.37 up and running on virtio , tough the question arise ... how come the installer has virtio support when the stock kernel does not ? am I screwing something obvious ?

Alien Bob 08-24-2012 01:38 PM

You probably did something wrong. The installer has virtio support, but you still have to create an initrd because all virtio support of the kernel has been implemented as modules.

In the installer, you could run "chroot /mnt" after completing the installation process. Then in the chroot, run
Code:

/usr/share/mkinitrd/mkinitrd_command_generator.sh
which will show you the correct command to run in order to create that initrd.gz file with virtio modules included.
Don't forget to update /etc/lilo.conf and re-run lilo.

Eric

ppencho 08-30-2012 03:47 PM

Just great, using your posts I successfully fixed my boot issues ("disk = ..." in lilo.conf and added virtio modules to initrd.gz).

I have another issue(???). I cannot boot HUGESMP.S kernel from the install ISOs (mini and current) and the huge-smp / gen-smp kernels from the installed Slackware 14 RC3. Each time the boot process stops in the very beginning:
Code:

Loading Slackware-hsmp .......................
BIOS data check successful
Decompressing Linux... Parsing ELF... done.
Booting the kernel.

And it stays here forever...

I tested with:
http://taper.alienbase.nl/mirrors/sl...nstall-dvd.iso
http://ponce.cc/slackware/iso/slackw...nstall-dvd.iso
http://ponce.cc/slackware/iso/slackw...ni-install.iso

(Why ponce's and alien's ISOs have different md5 sum and size?)

Note: I tested with 13.37 ISOs, no problems at all, smp/nosmp kernels work fine:
ftp://slackware.mirrors.tds.net/pub/...install-d1.iso
http://slackware.com/~alien/slackboo...ni-install.iso

My QEMU script:
Code:

#!/bin/sh

if [ $# = 2 ]; then
    BOOT_DEV=${BOOT_DEV:-"$1"}
    ISO_FILE=${ISO_FILE:-"$2"}
else
    BOOT_DEV="c"
    ISO_FILE=slackware-current-install-dvd.iso
fi

qemu-kvm -name "martinowar" -M pc -m 1024 \
-cpu host -smp cores=2,threads=1,sockets=1 -boot $BOOT_DEV \
-drive file=base.img,if=virtio,index=0,media=disk,format=raw \
-drive file=$ISO_FILE,index=1,media=cdrom \
-net vde,sock=/tmp/vde0 -net nic,macaddr=52:54:00:12:34:56 \
-vga cirrus -balloon virtio

Also tried with -smp cores=1 and 4.

I use Alien's SlackBuild built on my host 14 RC3 32-bit.

Alien Bob 08-30-2012 05:08 PM

What are the parameters you pass to that script?
In order to boot off the ISO, BOOT_DEV="c" would be wrong. Also, the Slackware installer will not understand the virtio block device- unless you manually load the virtio drivers you need (the modules are available in the installer).

Eric

ppencho 08-30-2012 11:39 PM

The parameters are:
d installer_iso_filename

I don't load any virtio driver at boot. But I had to mention explicitly that HUGE.s boots with no problem, that is how I managed to install the guest Slackware 14 RC3. Also, on the installed guest OS I can boot only the non SMP kernels. The SMP ones stop at the same line (Booting the kernel.)

So, I installed using HUGE.s. Firstly, after reboot (started the QEMU script with no params) I finished with a kernel panic because of the missing virtio modules. I fixed it with:
1. Boot again HUGE.s
2. mount /dev/vda1 /mnt
3. chroot /mnt
4. Added virtio and ext4 modules to initrd.gz
5. Modified lilo.conf
6. exit (to leave chroot /mnt)
7. lilo -b /dev/vda -C /mnt/etc/lilo.conf

And I successfully boot with non SMP kernels (generic and huge). I have network (after loading of other 8139 driver), start KDE.
But huge-smp and generic-smp stop at the mentioned line.

Alien Bob 08-31-2012 01:15 AM

And what if you replace "-smp cores=2,threads=1,sockets=1" with "-smp 2" ?

Eric

ponce 08-31-2012 05:31 AM

Quote:

Originally Posted by ppencho (Post 4768581)
(Why ponce's and alien's ISOs have different md5 sum and size?)

Because I probably pass different options to the mirror-slackware-current.sh script when I create the isos: that's not a mirror of Eric's isos.

ppencho 08-31-2012 11:42 AM

Quote:

Originally Posted by Alien Bob (Post 4768863)
And what if you replace "-smp cores=2,threads=1,sockets=1" with "-smp 2" ?

Eric

No difference, SMP kernels still don't work (ISO and guest OS).

Here is the cpuinfo from the guest OS:
Code:

processor      : 0
vendor_id      : GenuineIntel
cpu family      : 6
model          : 23
model name      : Intel(R) Core(TM)2 Quad CPU    Q9550  @ 2.83GHz
stepping        : 10
microcode      : 0x1
cpu MHz        : 2833.158
cache size      : 4096 KB
fdiv_bug        : no
hlt_bug        : no
f00f_bug        : no
coma_bug        : no
fpu            : yes
fpu_exception  : yes
cpuid level    : 13
wp              : yes
flags          : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht nx constant_tsc pni ssse3 cx16 sse4_1 xsave hypervisor lahf_lm
bogomips        : 5666.31
clflush size    : 64
cache_alignment : 64
address sizes  : 36 bits physical, 0 bits virtual
power management:

With -smp 2 only 'ht' flag is not available.

Next week I'm going to install 64-bit 14 RC3 (or 14 stable if ready:hattip:) I will try with QEMU-KVM64 and 32/64-bit guest Slackware.

NetNightmare 09-06-2012 12:51 PM

Quote:

Originally Posted by Alien Bob (Post 4763339)
In the installer, you could run "chroot /mnt" after completing the installation process. Then in the chroot, run
Code:

/usr/share/mkinitrd/mkinitrd_command_generator.sh
which will show you the correct command to run in order to create that initrd.gz file with virtio modules included.
Don't forget to update /etc/lilo.conf and re-run lilo.

Eric

First of all thank you for the reply Eric, and sorry for the lack of answer but I ve been away with family and all ;-)

I never messed with initrd since I normally rebuild my kernel to match only the needed stuff ( and I build driver and filesystem static ) , though I want to try it , only one question since I like to slack ;-) this is what I Did :

I rebooted with the Slackware64 Install CD

Code:

mount /dev/vda2 /mnt
mount /dev/vda1 /mnt/boot

chroot /mnt

now I did run the command
Code:

/usr/share/mkinitrd/mkinitrd_command_generator.sh
and got this :

Code:

find: '/sys/block' : No Such file or directory
cat: /proc/bus/input/device: No such file or directory
cat: /proc/mdstat: No such file or directory

mkinitrd -c -k 3.2.27 -f -r (IN /dev/vda2 -u -o /boot/initrd.gs

The first part I think is due to the fact I did not boot with this filesystem so the proc wasn't populated

Though the command seems to have a syntax error in "(IN" so I deleted the "(" and ran it :

Code:

cat: /proc/partitions: No such file or directory
cat: /proc/partitions: No such file or directory
21019
/boot/initrd.gz created
Be sure to run lilo again if you use it

if I try to run lilo nonetheless :

Code:

fatal: do_disk: stat /dev/vda: No such file or directory
and although the system boot with the initrd.gz it goes really bad he he, now I m sure this is all out of ignorance though is it possible to avoid re-run all the installer ;-P

ponce 09-06-2012 04:17 PM

before doing the chroot you gotta make some stuff from the boot system available also to the chroot environment.
execute these commands (before the chroot)
Code:

mount -t proc proc /mnt/proc
mount -o bind /dev /mnt/dev
mount -o bind /sys /mnt/sys

when you get out of the chroot, don't forget to
Code:

umount /mnt/sys
umount /mnt/dev
umount /mnt/proc


NetNightmare 09-07-2012 07:09 AM

Quote:

Originally Posted by ponce (Post 4774470)
before doing the chroot you gotta make some stuff from the boot system available also to the chroot environment.
execute these commands (before the chroot)
Code:

mount -t proc proc /mnt/proc
mount -o bind /dev /mnt/dev
mount -o bind /sys /mnt/sys

when you get out of the chroot, don't forget to
Code:

umount /mnt/sys
umount /mnt/dev
umount /mnt/proc


Well it did improve mi situation though I still had some more error during boot , so since a new rc got out I simply did it at installation time as Eric suggested and am I and running..

Anyway thank you all for the help

ppencho 09-07-2012 01:42 PM

Quote:

Originally Posted by ppencho (Post 4768581)
I have another issue(???). I cannot boot HUGESMP.S kernel from the install ISOs (mini and current) and the huge-smp / gen-smp kernels from the installed Slackware 14 RC3.

Just to close this open question:
I changed -cpu parameter in the QEMU script using:
Code:

-cpu host,-nx
This removes 'nx CPU flag'. Now I can boot all available kernels (ISO and guest OS).


All times are GMT -5. The time now is 08:38 PM.