LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 04-04-2009, 01:15 PM   #1
[GOD]Anck
Member
 
Registered: Dec 2003
Location: The Netherlands
Distribution: Slackware
Posts: 171

Rep: Reputation: 33
emulate slackware install over serial console using kvm/qemu


I want to emulate Slackware installation over a serial console using kvm/qemu.

I did a similar installation with Debian Lenny, and was able to make that work by copying the vmlinuz and initrd.gz from the installation iso to a directory on the host, then starting the installation using qemu -nographic -kernel vmlinuz -initrd initrd.gz -append console=ttyS0. I'm not sure if that's really the best way but it worked..

I tried to do the same for Slack so I copied /kernels/hugesmp.s/bzImage to a directory on the host and booted with qemu -nographic -kernel bzImage -append console=ttyS0. Console output redirection works fine, but the kernel panics:

Code:
VFS: Cannot open root device "<NULL>" or unknown-block(8,2)
Please append a correct "root=" boot option; here are the available partitions:
0300    5242880 hda driver: ide-disk
1600    3838730 hdc driver: ide-cdrom
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,2)
There is no root fs to mount yet, hda is an empty qemu image.. how do I make this work? Am I even using the right boot kernel?

Last edited by [GOD]Anck; 04-04-2009 at 01:24 PM.
 
Old 04-04-2009, 01:59 PM   #2
grunt547
Member
 
Registered: Nov 2006
Distribution: Slackware 12.2, Ubuntu 8.10
Posts: 30

Rep: Reputation: 15
It needs the root file system on the CD to finish booting. That won't be the eventual / on the installed system, but it will be while you run from CD. Give it a "root=/dev/hdc" option to point it at the CD and see if that works.
 
Old 04-04-2009, 02:51 PM   #3
[GOD]Anck
Member
 
Registered: Dec 2003
Location: The Netherlands
Distribution: Slackware
Posts: 171

Original Poster
Rep: Reputation: 33
Okay, adding root=/dev/hdc got me a bit further, filesystem gets mounted but the kernel can't find init:

Code:
VFS: Mounted root (iso9660 filesystem) readonly.
Freeing unused kernel memory: 424k freed
Warning: unable to open an initial console.
Kernel panic - not syncing: No init found.  Try passing init= option to kernel.
I've tried adding init=/sbin/init and also init=/bin/sh to get a shell but neither could be executed. Where does init live?
 
Old 04-04-2009, 04:02 PM   #4
grunt547
Member
 
Registered: Nov 2006
Distribution: Slackware 12.2, Ubuntu 8.10
Posts: 30

Rep: Reputation: 15
Well, when I boot my Slack disk, it's in /sbin/init, and also symlinked to the root dir as /init. Further, /sbin/init is the kernel's default, so it should be trying to do that anyway. I'm not sure why it can't find your init.

I hate to say it, but double-check that you have the first disk in (sorry). Also, does the kernel panic message look different at all when you add init=/bin/sh?
 
Old 04-04-2009, 04:17 PM   #5
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,257

Rep: Reputation: Disabled
Whenever I want to test a new initrd.img I use this command:

Code:
qemu -kernel ./kernels/hugesmp.s/bzImage -initrd ./isolinux/imitrd.img \
     -append initrd="initrd.img load_ramdisk=1 prompt_ramdisk=0 rw SLACK_KERNEL=hugesmp.s
I have not yet tried installing over a qemu serial console but I see no reason why that should not work.

Eric
 
Old 04-05-2009, 03:31 AM   #6
[GOD]Anck
Member
 
Registered: Dec 2003
Location: The Netherlands
Distribution: Slackware
Posts: 171

Original Poster
Rep: Reputation: 33
Ah there we go, I wasn't loading the initrd.img from /isolinux, adding that fixed it. Thanks!
 
  


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
Qemu (KVM) and Vista. ComputerGreek Linux - Software 53 07-06-2012 12:47 AM
KVM + qemu + virt-manager issues cyanide_will Linux - Software 4 04-15-2008 01:43 AM
LXer: Using kvm, or kqemu, to speed up qemu LXer Syndicated Linux News 0 08-25-2007 01:21 AM
Installing Slackware though serial console MarleyGPN Linux - Software 1 12-06-2005 06:56 PM


All times are GMT -5. The time now is 10:37 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