LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 08-24-2012, 09:40 AM   #1
NetNightmare
Member
 
Registered: Sep 2005
Location: Rome
Distribution: Slackware
Posts: 32

Rep: Reputation: 15
Question 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 ?
 
Old 08-24-2012, 01:38 PM   #2
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,257

Rep: Reputation: Disabled
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
 
1 members found this post helpful.
Old 08-30-2012, 03:47 PM   #3
ppencho
LQ Newbie
 
Registered: Jan 2004
Location: Bulgaria
Distribution: Slackware64-current
Posts: 25

Rep: Reputation: 3
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.
 
Old 08-30-2012, 05:08 PM   #4
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,257

Rep: Reputation: Disabled
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
 
Old 08-30-2012, 11:39 PM   #5
ppencho
LQ Newbie
 
Registered: Jan 2004
Location: Bulgaria
Distribution: Slackware64-current
Posts: 25

Rep: Reputation: 3
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.
 
Old 08-31-2012, 01:15 AM   #6
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,257

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

Eric
 
Old 08-31-2012, 05:31 AM   #7
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 2,447

Rep: Reputation: 875Reputation: 875Reputation: 875Reputation: 875Reputation: 875Reputation: 875Reputation: 875
Quote:
Originally Posted by ppencho View Post
(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.
 
Old 08-31-2012, 11:42 AM   #8
ppencho
LQ Newbie
 
Registered: Jan 2004
Location: Bulgaria
Distribution: Slackware64-current
Posts: 25

Rep: Reputation: 3
Quote:
Originally Posted by Alien Bob View Post
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) I will try with QEMU-KVM64 and 32/64-bit guest Slackware.
 
Old 09-06-2012, 12:51 PM   #9
NetNightmare
Member
 
Registered: Sep 2005
Location: Rome
Distribution: Slackware
Posts: 32

Original Poster
Rep: Reputation: 15
Question

Quote:
Originally Posted by Alien Bob View Post
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
 
Old 09-06-2012, 04:17 PM   #10
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 2,447

Rep: Reputation: 875Reputation: 875Reputation: 875Reputation: 875Reputation: 875Reputation: 875Reputation: 875
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
 
Old 09-07-2012, 07:09 AM   #11
NetNightmare
Member
 
Registered: Sep 2005
Location: Rome
Distribution: Slackware
Posts: 32

Original Poster
Rep: Reputation: 15
Thumbs up

Quote:
Originally Posted by ponce View Post
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
 
Old 09-07-2012, 01:42 PM   #12
ppencho
LQ Newbie
 
Registered: Jan 2004
Location: Bulgaria
Distribution: Slackware64-current
Posts: 25

Rep: Reputation: 3
Quote:
Originally Posted by ppencho View Post
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).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CUPS print failure Office Jet 8500 Slackware 14RC2 32bit Konchdrone Slackware 2 08-23-2012 10:31 AM
How to install qemu for arm9 cortex-a9 and how to use qemu after installation? pillisrikanth Linux - Software 3 12-27-2011 03:56 PM
On qemu-kvm, qemu-ifup script not found on Slackware 13 AndrewGaven Linux - Virtualization and Cloud 14 01-29-2010 03:36 AM
emulate slackware install over serial console using kvm/qemu [GOD]Anck Slackware 5 04-05-2009 03:31 AM
No input ALSA 1.0.14rc2 SUSE10.2 pdeman2 Linux - Hardware 11 03-20-2007 05:37 PM


All times are GMT -5. The time now is 11:03 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration