PDA

View Full Version : Knoppix -- virtual and real in the same CD/DVD



chris-uk
11-07-2004, 09:51 PM
It's possible to remaster a Knoppix CD, so that if you boot it it will run in the tradiitional way; but if you put it in a running Windows system, it wil autoplay a 'qemu' PC emulator from the CD, and boot under the emulator.
This results in a (rather slow but fully functional) Linux in a Windows window.

The first (as far as I can tell) version of this is at http://unit.aist.go.jp/it/knoppix/qemu/index-en.html. This version does not 'autoplay', but it is trivial to add the right command to the '.bat' file which normally causes the 'index.html' to be displayed.

Knoppix is rather slow running this way, but just about tolerable; largely (it seems) becuase KDE is a heavyweight window manager. If you do the same to a Morphix (http://www.morphix.org/debian/autorun/) you can have a tolerable game of 'Castle Combat'.
Networking is fine but the virtual Knoppix does not have sight of the real machine's disks.

People haven't figured out how to get vmlinuz and initrd out of the 'cloop' image, so only relatively old (pre-3.6) Knoppixes have been got to work so far. 'qemu' has support for taking vmlinuz/initrd directly for the purpose od booting an emulated Linux; if this can be cracked for Knoppix then we can improve the virtual boot time considerably. At the cost of some space on the CD/DVD for an extra copy of the vmlinuz/initrd, of course.

Also I haven't seen a virtual Linux with a 2.6 kernel; I think this is related to some 'strict timing checks' done by 2.6 which fail in emulation. I'd like to be able to run 2.6 'viritual', becuase I'd like that method of debugging kernel level code. Also because I'd like to think of leaving 2.4 behind in favour of 2.6 for all purposes.

Then there's this thing http://www.metropipe.net/ProductsPVPM.shtml, which shows a production use for a 'virtual' Linux. This also shows how to use a file on the PC (disk or USB stick) as a hard disk for the virtual Knoppix.

I've got a self-virtualising Knoppix 3.5 DVD now, too. The hardest part was stopping if from defaulting to Japanese language !

A few things to fix, a few reasons to fix them, and a few pointers as to how. Let the forum know if it's useful, or if you make progress cracking the remaining items.

bfree
11-08-2004, 06:21 AM
People haven't figured out how to get vmlinuz and initrd out of the 'cloop' image, so only relatively old (pre-3.6) Knoppixes have been got to work so far. 'qemu' has support for taking vmlinuz/initrd directly for the purpose od booting an emulated Linux; if this can be cracked for Knoppix then we can improve the virtual boot time considerably. At the cost of some space on the CD/DVD for an extra copy of the vmlinuz/initrd, of course.

Forgive me if I'm missing something, but isn't (on a knoppix cd, not the cloop) boot/isolinux/linux24 (vmlinuz) and boot/isolinux/minirt24.gz (initrd) what you are looking for?

chris-uk
11-08-2004, 08:38 PM
Some discussion starting here http://lists.gnu.org/archive/html/qemu-devel/2004-09/msg00323.htmland replies to it. Not sure whether things ended up resolved successfully; one time I read it, it felt as if Knoppix thought it was booting from a system after installation to disk, and didn't set up the entries in '/dev' in the way that would be useful.
If someone can give a list of the file structure and the 'qemu' command line ... ideally post a 'tar' of the files which if added to the CD will autoplay a working 'qemu' boot, with all the 'qemu'-related files in directory /qemu-0.6.0 or something like that, that would be useful.
Presumably going along this path I won't be able to choose between 2.4 and 2.6 kernels (unless I rebuild the CD)