LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-03-2008, 01:16 PM   #1
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 67
A question about qemu


I use qemu rather frequently, using XP in Slackware...

But I also dual boot SW12/XP.

Can I run qemu using the windows drive? In other words, instead of using the xp.img file, can I use /dev/hda1?

Just curious, not sure if I actually will.

I know there are hardware issues, etc, but...
 
Old 01-03-2008, 02:15 PM   #2
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
I may be wrong but I don't think it's possible. I think qemu will only work with an image and its internals need to read/write to the image in certain ways that wouldn't work with a real file system.
 
Old 01-03-2008, 03:20 PM   #3
TSquaredF
Member
 
Registered: Dec 2005
Location: "The South Coast of Texas"
Distribution: Slackware64-current
Posts: 564

Rep: Reputation: Disabled
I know its possible, at least with Win2K; I'm doing it. Win2K is in /dev/hda1 & has its own bootloader in the hda MBR. I'm using a modified version of Eric Hamleers script to start it. Here it is:
Quote:
#!/bin/sh
#
# Start guest OSes in QEMU

NAME=${0: -5}
# If you want a CD available, use a '-cdrom' parameter:
PARAMS=$*

# Qemu can use SDL sound instead of the default OSS
export QEMU_AUDIO_DRV=sdl

# Whereas SDL can play through alsa:
export SDL_AUDIODRIVER=alsa

# Change this to the directory where the QEMU images are stored:
IMAGEDIR=/home/bill

# Now, change directory to your image directory
cd $IMAGEDIR

IMAGE="/dev/hda"

vdeqemu -kernel-kqemu -net vde,vlan=0 -net nic,vlan=0,macaddr 52:54:00:00:EE:02 -m 256 -localtime -serial /dev/ttyS0 -soundhw all -hda $IMAGE 1>$NAME.log 2>$NAME.err ${PARAMS} &

exit 0
I also have two hardware profiles set up for Win2K, one for qemu, one for booting standalone, but I'm not sure you can do that with WinXP.
Regards,
Bill

Last edited by TSquaredF; 01-03-2008 at 03:24 PM.
 
Old 01-03-2008, 03:54 PM   #4
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649

Original Poster
Blog Entries: 1

Rep: Reputation: 67
I'm thinking the different 'bios' might make XP freak....

But, what the heck...I'll try it. If I toasy my XP install, It deserves it...lol
 
Old 01-03-2008, 04:29 PM   #5
iiv
Member
 
Registered: Jun 2007
Location: Russia, Moscow Region
Distribution: Slackware
Posts: 167

Rep: Reputation: 30
Have you tries XEN? It can do that, if the your processor supports virtualisation. The benefit of XEN is that it will be much faster.
 
Old 01-03-2008, 05:12 PM   #6
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649

Original Poster
Blog Entries: 1

Rep: Reputation: 67
Quote:
Originally Posted by iiv View Post
Have you tries XEN? It can do that, if the your processor supports virtualisation. The benefit of XEN is that it will be much faster.
Not to be rude, but my original question was
Quote:
A question about qemu
, NOT "What can do this?"

Just trying to keep this on post, not turn it into a "This can do this..." thread.

I'm using qemu already to run XP inside of Slackware, and other Slackware "tweaks", and am in no way interested in "the newest, greatest, cutting edge...". qemu works, and I'm sticking to it.

The answer, for now, seems to be "Yes, kinda, maybe" I was just wondering if it was possible. I'll try that script later on tonight, see what happens.

Now, for the betting portion:

I think it will:

Toast my XP install because of radically different hardware setups.

I'm giving even odds on that...
 
Old 01-03-2008, 07:51 PM   #7
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 78
Quote:
Originally Posted by cwwilson721 View Post
Toast my XP install because of radically different hardware setups.
You will need to use hardware profiles to get this to work (and yes, you can use hardware profiles on Windows XP). I don’t know the specifics, though I know someone who does something similar. He has a bootable windows XP on a removable hard drive, which he uses to boot two separate machines (at separate times of course). It works reliably now, but it took about a week of tweaking before he could get both machines’ sound cards to work. AFAICT, using qemu would accomplish the exact same thing (except one machine would be virtual and the hard drive would never really be moved).

Btw, this can be accomplished with linux as the guest system as well (it is even a little easier since you won’t need to muck around with “hardware profiles”).
 
Old 01-03-2008, 11:25 PM   #8
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649

Original Poster
Blog Entries: 1

Rep: Reputation: 67
My thought was M$'s "licensing" thing is semi-dependent upon hardware...A change in bios, as a matter of fact, is one of the major things that can make windows say "this is no longer valid".

But, as I said....I don't care. It's more of a philosophical exercise than anything.

More of a "Cool" than "need". I can do without windows at all. It's more of a "can I...?" than "Have to...". So I'll try it, probably tomorrow night. I have to be at work in the AM, then after I get home, I'll give it a shot.

I'll post the results, and what is lacking.

As I stated in the original post, I was just wondering if it was possible...
 
Old 01-05-2008, 12:57 PM   #9
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Quote:
Can I run qemu using the windows drive? In other words, instead of using the xp.img file, can I use /dev/hda1?
If have done this successfully. Two hardware profiles are needed. One for the actual hardware in the box for when you dual boot, and one for when you run Windows in the virtual hardware environment. My testing was with NT4. Of course, with NT4 I had no issues with the nonsense licensing schemes implemented by XP.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Question on "QEMU and Tuntap" kewlemer Linux - Networking 0 11-08-2007 02:49 AM
qemu kbrown3074 Linux - Software 5 05-10-2006 12:22 PM
Windows in Qemu, Activation Question... worldgnat Linux - General 4 04-23-2006 07:43 PM
How to use Qemu altella Mandriva 1 04-12-2006 07:55 PM
qemu: qemu stopped right after command exec bitpicker Linux - Software 1 03-04-2005 11:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration