DapperQemuInstall
Size: 4507
Comment:
|
← Revision 8 as of 2008-08-06 16:21:50 ⇥
Size: 4507
Comment: converted to 1.6 markup
|
No differences found! |
Installing Dapper in Breezy with Qemu
Rationale
I only own a single laptop and don't have a machine (or extra hard drive partition) that I want to use to install the latest testing version of ubuntu (dapper). I also don't won't to upgrade because I need a stable machine for school and cannot deal with much unplanned downtime. The solution I came up with was to run dapper in an emulated environment. This should be familiar to those of you who have used Virtual PC or VMware. I chose Qemu, an open source emulation program. This allows me to test a build of dapper without disturbing my system. It runs in a window or fullscreen on top of a breezy. There is a minor performance penalty but the kqemu acceleration minimizes this by providing a virtualization layer.
Preparation
Install Qemu
You need to install Qemu on a Breezy computer. You can use the slightly outdated breezy package: qemu (see InstallingSoftware).
This should be fine unless you want hardware accelerated virtualization (kqemu). To do this we need to compile from source. If you have installed the breezy packages you need to remove them.
Get the source
Download from the qemu website
wget http://qemu.org/qemu-0.8.0.tar.gz wget http://qemu.org/kqemu-0.7.2.tar.gz
Extract the source with
You might want to do this in a directory like /tmp
tar zxvf qemu-0.8.0.tar.gz
kqemu needs be extracted in the same folder as qemu
tar zxvf kqemu-0.7.2.tar.gz qemu-0.8.0
Edit configure
Edit the lines that say cc="gcc" and host_cc="gcc" so that is reads
cc="gcc-3.4" host_cc="gcc-3.4"
Make sure you have gcc 3.4 on your computer if not, sudo apt-get install gcc-3.4 Edit the lines that says kernel_path="" so that it reads
kernel_path="/usr/src/linux-headers-2.6.12-10-686/"
Kernel Headers
Download the kernel headers (or source) that corresponds to the kernel you run, it will probably be either 2.6.12-10-686 or 2.6.12-10-386
sudo apt-get install linux-headers-2.6.12-10-686
Compile
To compile
./configure make
To install
I like to keep my system clean by using only programs packaged in debs, for easy removal and other reasons. I use checkinstall to generated a .deb that will automatically be installed.
sudo apt-get install checkinstall
Generate a deb with
checkinstall
When prompted describe Qemu, edit the name so that is reads qemu.
Load Module
Load the kqemu module with
sudo modprobe kqemu
Download a dapper iso cdrom image
You should probably use a torrent, but do the following to download from a mirror.
wget http://cdimage.ubuntu.com/releases/dapper/flight-3/dapper-install-i386.iso
You might want to check to md5sum to verify integrity.
Run Qemu
Create a disk image
This is the file that will act as the virtual hard drive for the installation
qemu-img create dapper.img 4G
You can specify whatever size you want, qemu should dynamically resize the image as it grows, on your hardisk, but the dapper install will see whatever size disk you create.
Run the Install
qemu -boot d -cdrom dapper-install-i386.iso -m 256 -hda dapper.img
where -m is the megs of memory you wish to allow the install to use
Follow the instructions of the curses based installer, it should take a bit longer in some bits of the install and shorter in others than a normal hd install.
Boot into Dapper
run:
qemu -boot c -m 256 -hda dapper.img
Conclusions
This process can be used to test most GNU/linux (or other OS) distro's that provide iso install images. It is great to sandbox unstable development versions before migrating your systems. There is little advantage to doing this if all you need is the ability use a live cd and check out dapper. If, however you want the room to customize dapper is a safe way that allows you to save modifications and run without a reboot, then this a great tool.
See Also
Be sure to check out the man pages as well as the qemu docs at http://fabrice.bellard.free.fr/qemu/qemu-doc.html There you can learn how to make sound work, connect devices, use the internet, and share files with your breezy system.
DapperQemuInstall (last edited 2008-08-06 16:21:50 by localhost)