![]() |
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.. :D 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) |
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.
|
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. |
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? |
Whenever I want to test a new initrd.img I use this command:
Code:
qemu -kernel ./kernels/hugesmp.s/bzImage -initrd ./isolinux/imitrd.img \Eric |
Ah there we go, I wasn't loading the initrd.img from /isolinux, adding that fixed it. Thanks!
|
| All times are GMT -5. The time now is 08:02 AM. |