Thursday, September 4, 2008

Tech Talk - Slax Linux on USB Stick, Qemu and CD/DVD ISO Files

I've been wanting to run an Operating System emulator ever since I bought the May 2008 edition of Linux Magazine accompanied by a Live DVD running Ubuntu 7.10 with the Innotek VirtualBox emulator with five other distro image files (.iso) on the DVD and automatically loaded into the Innotek emulator. But, being IT thick, I've failed to work out how to configure Innotek VirtualBox.

I have a 40 GB hard disk equally divided into a Windows XP partition (used 0.1 %) and an Ubuntu 7.10 partition (installed from aforesaid DVD and previously used 99.9%).

Then my boss asked me to prepare some legacy and redundant machines to donate to various local institutions. It would have been irresponsible of us to donate legacy machines with the no-longer-supported MS Windows NT 4.0 and no current anti-virus software + I was obliged to "zap" the hard-disks so no data remained. So I needed to install something supported on a small machine, both hard-disk and RAM, that would run applications, some specialised, and in our local language. I played around with various "lite" Linux distributions - some thing like Fedora or SuSe would be far too demanding for these machines - and finally, I came across Xubuntu 7.04 - perfect! Local language, wordprocessor (AbiWord) and spreadsheet programs that can open and save to MS formats etc etc. Rather than using Gnome or KDE as memory hungry GUIs it uses the Xfce GUI.

This got me interested interested in even smaller Linux distros with a GUI and applications - and I came across Slax on which I am writing this and will save to MS Word format before copying into the blog. Based on another Linux distro, Knoppix which itself derived from major Linux distro Debian, Slax will run from a USB stick - as small as 256 MB. You can carry the whole bloody thing around with you on a USB stick - applications and all. Change your machine's BIOS settings to boot from the USB stick and you're away.

Default applications - a word-processor, a spreadsheet, web-browser, email, video and music players, pdf viewer, Paint program, photo viewer, an instant messenger etc etc. Non-default applications (given I now have Slax installed on aand boot from a 4 GB USB stick) - Skype, Google Earth etc etc ...

... and an Operating System Emulator!


As I am running Qemu from my USB stick, I could find little advice on the Qemu site, support groups etc on how to do this. Everyone running Qemu seems to be running it and the emulated OS from their hard-drive.

Final solutions:

1. You first to have create a .img file somewhere to run the OS .img file. I creaated the .img file on my hard-drive for spaace reasons ... take into consideration the size of the OS you want to emulate.

To do this (logged on as "root") I opened a Terminal window and issued the command: qemu-img create /mnt/hda4/hd.img 5G which created a hard-disk image file of 5 GB on my hard-disk Ubuntu partition. Choose the size of your .img file - I'm sure the larger the better.

2. I then downloaded a GUI Qemu Launcher that allows me to select the OS.iso file.

3. The Qemu Launcher launches the OS from the LiveDVD OS with the command qemu -kernel-kqemu -cdrom + location/OSfilename.iso. kqemu speeds up qemu.

More things to do ... I'd like to run my Windows XP partition emulated under my Linux ... but all the Qemu advice I've seen is that you need to this from a Windows installation disk (.iso).

Disappointments: LiveDVD isos seem to come with the OS, the GUI but no applications!

No comments: