Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Ubuntu 9.10 is out!!!

When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu.

The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely.

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old June 2nd, 2006   #1
andrejkw
5 Cups of Ubuntu
 
andrejkw's Avatar
 
Join Date: Oct 2005
Location: United States
Beans: 27
Ubuntu 6.06
Send a message via AIM to andrejkw Send a message via MSN to andrejkw Send a message via Yahoo to andrejkw Send a message via Skype™ to andrejkw
Lightbulb Installing QEMU, KQEMU and Patches

This is more of a Automatic Installation script, than a HOW-TO.
As of now, it will only work with Breezy and Dapper.

This script will compile and install:
QEMU 0.8.2 or QEMU from CVS Snapshot (Choice Given during Install)
KQEMU 1.3.0pre9

Included QEMU Patches (Optional - asked during installation):
DHCP Patch
Mouse Wall Bug Patch is no longer needed (=> 0.8.2)

The credits go to:
- Nando Florestan (I used some parts of his Script)
- Saad N. (For inspiration and testing)
- Dmytro (Breezy Testing, Spell Checking, and NT, 95, 95 Russian Testing)

For those wanting to install Windows XP under QEMU/KQEMU check out this more detailed tutorial: WindowsXPUnderQemuHowTo

INSTALLATION INSTRUCTIONS:
Code:
wget http://soultrap.net/andrejkw/install_qemu.sh
chmod +x ./install_qemu.sh
sudo ./install_qemu.sh
Afterwards just follow the on-screen instructions.

USAGE INSTRUCTIONS:
NOTICE FOR 64bit USERS: You have to use qemu-system-x86_64 instead of qemu. Otherwise the "-kernel-kqemu" option will not work.

1.) The first thing you probably want to do is to create a disk image into which you will install the Guest operating system. You can do this by typing the following into the terminal.
M = MB
G = GB
Code:
qemu-img create (FILE NAME).img (SIZE OF IMAGE)

Example:
qemu-img create guest.img 1G
2.) After the image has been created (assuming the step above gave you no errors) we can prepare to launch QEMU. But before we go ahead and do that, we have to make a few decisions. The basic command we will be using now is:
Code:
qemu -localtime -hda (FILE NAME).img

Example:
qemu -localtime -hda guest.img
3.) Now, with the basic command ready, we will now move on to the paramaters. Now, in order to get our Guest OS installed we have to install it from a CD or a CD image. Add the '-cdrom' parameter to tell QEMU that you want to have a CD-ROM present.
Code:
qemu -localtime -hda (FILE NAME).img -cdrom (PATH TO DEVICE OR CD IMAGE)

Example:
qemu -localtime -hda guest.img -cdrom /home/andrejkw/XPCD.iso
OR
qemu -localtime -hda guest.img -cdrom /dev/cdrom
3.) Ok, so now we told QEMU what to use as our CD-ROM drive. The next step is to tell it to boot from our CD-ROM before booting from our Hard-Drive image. To do this we will add a '-boot d' (D: stands for the CD-ROM drive in this case, because it comes right after C: )
Code:
qemu -localtime -hda (FILE NAME).img -cdrom (PATH TO DEVICE OR CD IMAGE) -boot d

Example:
qemu -localtime -hda guest.img -cdrom /dev/cdrom -boot d
4.) Next thing we have to do, is tell QEMU that we have KEMU installed. It is supposed to detect if KQEMU is installed, but I had a bad experience with this. And it doesn't hurt to be sure that QEMU is using KQEMU. You can do this by adding the '-kernel-kqemu' option.
Code:
qemu -localtime -hda (FILE NAME).img -cdrom (PATH TO DEVICE OR CD IMAGE) -boot d -kernel-kqemu

Example:
qemu -localtime -hda guest.omg -cdrom /dev/cdrom -boot d -kernel-kqemu
5.) If you were to press enter now, QEMU would start booting. But before you do that, you should consider adding some of these options:

If you want to give your Guest OS more RAM (QEMU uses 128MB by default) add the '-m SIZE' option.
M = MB
G = GB
Code:
qemu -localtime -hda (FILE NAME).img -cdrom (PATH TO DEVICE OR CD IMAGE) -boot d -kernel-kqemu -m RAM SIZE

Example:
qemu -localtime -hda guest.img -cdrom /dev/cdrom -boot d -kernel-kqemu -m 512M
If you are going to be installing Windows 2000/XP as your Guest OS, consider adding '-win2k-hack' as your option. It fixes some major issues, like the "Not enough disk space." while installing.
Code:
qemu -localtime -hda (FILE NAME).img -cdrom (PATH TO DEVICE OR CD IMAGE) -boot d -kernel-kqemu -m RAM SIZE -win2k-hack

Example:
qemu -localtime -hda guest.img -cdrom /dev/cdrom -boot d -kernel-kqemu -m 512M -win2k-hack
-----------------------------------------------------------------------

Check out Qemu Launcher (a nice QEMU Gui for GNOME) at http://download.gna.org/qemulaunch/debian/
Note: In the "Other" tab add "-kernel-kqemu" (no quotes) to the "Additional Arguments" field.

If you are experiencing the Transparent Window bug (By running XGL...) check out Saad's thread (http://ubuntuforums.org/showthread.php?t=187941) for instructions on how to fix it.

Andrew,

Last edited by andrejkw; September 30th, 2006 at 12:52 PM.. Reason: Improved Post Organization and Title...
andrejkw is offline   Reply With Quote
Old June 4th, 2006   #2
SaadN
First Cup of Ubuntu
 
Join Date: May 2006
Location: Houston, TX
Beans: 7
Ubuntu 6.06
Send a message via AIM to SaadN Send a message via MSN to SaadN Send a message via Yahoo to SaadN
Smile Re: Installing QEMU, KQEMU, and DHCP Patch

This script worked great for me. 100% with no errors are all! Thanks a lot!

Screenshots
http://img288.imageshack.us/img288/9...eenshot8wa.png

http://img147.imageshack.us/img147/9...hotqemu6fc.png

Last edited by SaadN; June 4th, 2006 at 09:19 PM..
SaadN is offline   Reply With Quote
Old June 4th, 2006   #3
Toxicity999
Quad Shot of Ubuntu
 
Toxicity999's Avatar
 
Join Date: Mar 2006
Location: Maine
Beans: 360
Ubuntu Jaunty Jackalope (testing)
Send a message via AIM to Toxicity999 Send a message via MSN to Toxicity999
Re: Installing QEMU, KQEMU, and DHCP Patch

Checking it out now will post results.
Toxicity999 is offline   Reply With Quote
Old June 5th, 2006   #4
Johnsie
Dipped in Ubuntu
 
Join Date: Oct 2005
Beans: 592
Re: Installing QEMU, KQEMU, and DHCP Patch

It didn't work for me. I had the following output:


Your Ubuntu release is: Dapper Drake 6.06
Is this correct? yes
Would you like to download QEMU from the CVS (Unstable)? no
Installing Dependencies...
Reading package lists... Done
Building dependency tree... Done
libsdl1.2debian is already the newest version.
The following extra packages will be installed:
binutils cpp cpp-3.4 cpp-4.0 dpkg-dev g++ g++-4.0 gcc gcc-3.4-base gcc-4.0
installwatch libaa1-dev libartsc0-dev libasound2-dev libaudio-dev
libaudiofile-dev libc6-dev libesd0-dev libgl1-mesa-dev libglib2.0-dev
libglu1-mesa-dev libice-dev libncurses5-dev libslang2-dev libsm-dev
libstdc++6-4.0-dev libstdc++6-dev libx11-dev libxau-dev libxdmcp-dev
libxext-dev libxi-dev libxt-dev linux-kernel-headers make mesa-common-dev
x11proto-core-dev x11proto-input-dev x11proto-kb-dev x11proto-xext-dev
Suggested packages:
binutils-doc cpp-doc gcc-4.0-locales debian-keyring gcc-3.4-doc lib64stdc++6
gcc-4.0-doc manpages-dev autoconf automake1.9 libtool flex bison gcc-doc
libc6-dev-amd64 lib64gcc1 libasound2-doc glibc-doc libglib2.0-doc
libstdc++6-4.0-doc stl-manual libstdc++6-doc
Recommended packages:
libmudflap0-dev
The following packages will be REMOVED
libsdl1.2debian-alsa
The following NEW packages will be installed
binutils build-essential checkinstall cpp cpp-3.4 cpp-4.0 dpkg-dev g++
g++-3.4 g++-4.0 gcc gcc-3.4 gcc-3.4-base gcc-4.0 installwatch libaa1-dev
libartsc0-dev libasound2-dev libaudio-dev libaudiofile-dev libc6-dev
libesd0-dev libgl1-mesa-dev libglib2.0-dev libglu1-mesa-dev libice-dev
libncurses5-dev libsdl1.2-dev libsdl1.2debian-all libslang2-dev libsm-dev
libstdc++6-4.0-dev libstdc++6-dev libx11-dev libxau-dev libxdmcp-dev
libxext-dev libxi-dev libxt-dev linux-kernel-headers make mesa-common-dev
x11proto-core-dev x11proto-input-dev x11proto-kb-dev x11proto-xext-dev
zlib1g-dev
0 upgraded, 47 newly installed, 1 to remove and 0 not upgraded.
Need to get 25.0MB of archives.
After unpacking 97.1MB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
x11proto-core-dev libice-dev libsm-dev x11proto-kb-dev x11proto-input-dev
libxau-dev libxdmcp-dev libx11-dev libxi-dev x11proto-xext-dev libxext-dev
libxt-dev binutils linux-kernel-headers libc6-dev cpp-4.0 cpp gcc-4.0 gcc
libstdc++6-4.0-dev g++-4.0 g++ make dpkg-dev build-essential installwatch
checkinstall gcc-3.4-base cpp-3.4 gcc-3.4 libstdc++6-dev g++-3.4
libslang2-dev libncurses5-dev libaa1-dev libglib2.0-dev libartsc0-dev
libasound2-dev libaudiofile-dev libesd0-dev mesa-common-dev libgl1-mesa-dev
libglu1-mesa-dev libaudio-dev libsdl1.2-dev libsdl1.2debian-all zlib1g-dev
E: There are problems and -y was used without --force-yes
ERROR: Unable to Install Dependencies.
Johnsie is offline   Reply With Quote
Old June 5th, 2006   #5
OldGaf
Way Too Much Ubuntu
 
OldGaf's Avatar
 
Join Date: Aug 2005
Beans: 228
Kubuntu 9.04 Jaunty Jackalope
Re: Installing QEMU, KQEMU and Patches

Quote:
Originally Posted by andrejkw
Hey Guys,

This is more of a Automatic Installation script, than a Howto.
It will only work with Breezy and Dapper.

This script will compile and install:
- QEMU 0.8.1 or QEMU from CVS (Choice Given during Install)
- KQEMU 1.3.0pre7

Included QEMU Patches (Optional - Choice Given during Install):
- DHCP Patch
- Mouse Wall Bug

Installation Instructions:
Code:
wget http://exvision.net/install_qemu.sh
chmod +x ./install_qemu.sh
sudo ./install_qemu.sh
Afterwards just follow the on-screen instructions.

The credits go to:
- Nando Florestan (I used some parts of his Script)
- Saad N. (For inspiration and testing)

If you have any suggestions how I can improve this script, feel free to post them in here

Check out Qemu Launcher (a nice QEMU Gui for GNOME) at http://download.gna.org/qemulaunch/debian/
Note: In the "Other" tab add "-kernel-kqemu" (no quotes) to the "Additional Arguments" field.

If you are experiencing the Transparent Window bug (By running XGL...) check out Saad's thread (http://ubuntuforums.org/showthread.php?t=187941) for instructions on how to fix it.

Andrew,
I got an error:

Extracting QEMU...
tar: qemu-snapshot-2006-06-04_23.tar.bz2: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error exit delayed from previous errors
ERROR: Unable to extract QEMU.
__________________
-OG-

My Rig
OldGaf is offline   Reply With Quote
Old June 5th, 2006   #6
OldGaf
Way Too Much Ubuntu
 
OldGaf's Avatar
 
Join Date: Aug 2005
Beans: 228
Kubuntu 9.04 Jaunty Jackalope
Re: Installing QEMU, KQEMU and Patches

Quote:
Originally Posted by andrejkw
Hey Guys,

This is more of a Automatic Installation script, than a Howto.
It will only work with Breezy and Dapper.

This script will compile and install:
- QEMU 0.8.1 or QEMU from CVS (Choice Given during Install)
- KQEMU 1.3.0pre7

Included QEMU Patches (Optional - Choice Given during Install):
- DHCP Patch
- Mouse Wall Bug

Installation Instructions:
Code:
wget http://exvision.net/install_qemu.sh
chmod +x ./install_qemu.sh
sudo ./install_qemu.sh
Afterwards just follow the on-screen instructions.

The credits go to:
- Nando Florestan (I used some parts of his Script)
- Saad N. (For inspiration and testing)

If you have any suggestions how I can improve this script, feel free to post them in here

Check out Qemu Launcher (a nice QEMU Gui for GNOME) at http://download.gna.org/qemulaunch/debian/
Note: In the "Other" tab add "-kernel-kqemu" (no quotes) to the "Additional Arguments" field.

If you are experiencing the Transparent Window bug (By running XGL...) check out Saad's thread (http://ubuntuforums.org/showthread.php?t=187941) for instructions on how to fix it.

Andrew,
Reran the script and got this at the end:

Installing KQEMU...
ERROR: Module kqemu does not exist in /proc/modules
Loading KQEMU Module...
kqemu
__________________
-OG-

My Rig
OldGaf is offline   Reply With Quote
Old June 5th, 2006   #7
andrejkw
5 Cups of Ubuntu
 
andrejkw's Avatar
 
Join Date: Oct 2005
Location: United States
Beans: 27
Ubuntu 6.06
Send a message via AIM to andrejkw Send a message via MSN to andrejkw Send a message via Yahoo to andrejkw Send a message via Skype™ to andrejkw
Re: Installing QEMU, KQEMU, and DHCP Patch

You can safely ignore that error. It should work.
__________________
Technology is dominated by two types of people: those who understand what they do not manage, and those who manage what they do not understand.

Installing QEMU, KQEMU, DHCP Fix, and Mouse Fix (Dapper & Breezy Only)
andrejkw is offline   Reply With Quote
Old June 5th, 2006   #8
andrejkw
5 Cups of Ubuntu
 
andrejkw's Avatar
 
Join Date: Oct 2005
Location: United States
Beans: 27
Ubuntu 6.06
Send a message via AIM to andrejkw Send a message via MSN to andrejkw Send a message via Yahoo to andrejkw Send a message via Skype™ to andrejkw
Re: Installing QEMU, KQEMU, and DHCP Patch

Alrighty, all 3 bugs fixed.
__________________
Technology is dominated by two types of people: those who understand what they do not manage, and those who manage what they do not understand.

Installing QEMU, KQEMU, DHCP Fix, and Mouse Fix (Dapper & Breezy Only)
andrejkw is offline   Reply With Quote
Old June 5th, 2006   #9
OldGaf
Way Too Much Ubuntu
 
OldGaf's Avatar
 
Join Date: Aug 2005
Beans: 228
Kubuntu 9.04 Jaunty Jackalope
Re: Installing QEMU, KQEMU, and DHCP Patch

Quote:
Originally Posted by andrejkw
Alrighty, all 3 bugs fixed.
When I run the following:

qemu -localtime -hda winxp.img -cdrom /dev/hda -m 512 -boot d

I get this:

Could not configure '/dev/rtc' to have a 1024 Hz timer. This is not a fatal error, but for better emulation accuracy either use a 2.6 host Linux kernel or type 'echo 1024 > /proc/sys/dev/rtc/max-user-freq' as root.

Is there a config file I need to edit?
__________________
-OG-

My Rig
OldGaf is offline   Reply With Quote
Old June 5th, 2006   #10
OldGaf
Way Too Much Ubuntu
 
OldGaf's Avatar
 
Join Date: Aug 2005
Beans: 228
Kubuntu 9.04 Jaunty Jackalope
Re: Installing QEMU, KQEMU, and DHCP Patch

Quote:
Originally Posted by andrejkw
Alrighty, all 3 bugs fixed.

Cool... other then configuring a few thing (screen size etc), this is a VERY cool script...... thanks a bunch
__________________
-OG-

My Rig
OldGaf is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:20 AM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry