LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-09-2005, 06:41 AM   #1
goldfish
Member
 
Registered: Aug 2003
Location: UK
Distribution: Gentoo / Debian
Posts: 58

Rep: Reputation: 15
qemu problem with Win2k


I'm running Gentoo (2.6 kernel), and i've emerge'd qemu with kqemu support. I've managed to create a HDD image using the following command
Code:
dd if=/dev/zero of=hdd.img bs=1024 count=200000
Or something similar. I've got a 2GB hdd.img file, which I booted and installed Windows 2000 SP4 using this:
Code:
qemu -boot d -cdrom /dev/cdrom -hda hdd.img

The Win2k install went perfectly, and it even rebooted into Windows when it was finished. However, now when I try and run:
Code:
qemu hdd.img
I get an error that says "A disk read error occurred". I've checked perms on the hdd.img file, they're fine. I can boot from a CD using the same command as before.

I have found this:
http://lists.gnu.org/archive/html/qe.../msg00017.html
And it says something about a patch NT-BOOT-MAIN. However, I have no idea what to do with this patch. Compile it? Run it? Copy it somewhere?

Can anyone shed some light on this?
 
Old 12-09-2005, 07:54 AM   #2
madluther
Member
 
Registered: Aug 2004
Distribution: LFS
Posts: 350

Rep: Reputation: 31
qemu has its own image creation tool, for a 2G image use the command line
Code:
qemu-img create -f raw hdd.img 2G
The difference between dd image and the qemu created image is the qemu image is a drive image, it has a boot sector, partition table etc.

HTH

Mad.

Last edited by madluther; 12-09-2005 at 07:57 AM.
 
Old 12-10-2005, 05:42 AM   #3
goldfish
Member
 
Registered: Aug 2003
Location: UK
Distribution: Gentoo / Debian
Posts: 58

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by madluther
qemu has its own image creation tool, for a 2G image use the command line
Code:
qemu-img create -f raw hdd.img 2G
The difference between dd image and the qemu created image is the qemu image is a drive image, it has a boot sector, partition table etc.

HTH

Mad.
Thanks, that's perfect!

I've got another qemu related question: How do you change the "resolution"... if you do it in the guest operating system (in my case WXP), the display drivers can't seem to take it properly. I'm getting weird graphical problems. When I fullscreen it (which I have yet to work out how to do), I want it to be at the same res as my X desktop.
 
Old 12-10-2005, 09:02 AM   #4
madluther
Member
 
Registered: Aug 2004
Distribution: LFS
Posts: 350

Rep: Reputation: 31
I have had the same problem with resolution changes, rebooting the guest win2k system fixes it.

BTW, CTRL+ALT+f will toggle fullscreen.

HTH

Mad

Last edited by madluther; 12-10-2005 at 09:06 AM.
 
Old 12-10-2005, 01:32 PM   #5
goldfish
Member
 
Registered: Aug 2003
Location: UK
Distribution: Gentoo / Debian
Posts: 58

Original Poster
Rep: Reputation: 15
Cheers.

Unfortunately, this has come back at me. I made the image properly, and it all looked good, but when I come to booting from hard drive like this:
Code:
qemu hdd.img
I get the
A disk read error occurred
Error thrown.

This is with WinXP now, rather than 2k.
 
Old 12-10-2005, 02:43 PM   #6
madluther
Member
 
Registered: Aug 2004
Distribution: LFS
Posts: 350

Rep: Reputation: 31
Just a guess, but a 2G image might be too small, the smallest image I've ever used (with win2k) is 4G, typically I specify 10G as the actual image size. The actual size of this image is only a bit larger than the files it contains so it doesn't actually use 10G.

HTH

Mad.
 
Old 12-10-2005, 05:34 PM   #7
goldfish
Member
 
Registered: Aug 2003
Location: UK
Distribution: Gentoo / Debian
Posts: 58

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by madluther
Just a guess, but a 2G image might be too small, the smallest image I've ever used (with win2k) is 4G, typically I specify 10G as the actual image size. The actual size of this image is only a bit larger than the files it contains so it doesn't actually use 10G.

HTH

Mad.
The thing is it does boot perfectly fine after the install - it just doesn't boot properly straight from the image. Besides, when I made my second image I made it 3GB, which should be enough.

Is there any way to "check" the drive image? Maybe even fix it?
 
Old 12-10-2005, 07:29 PM   #8
madluther
Member
 
Registered: Aug 2004
Distribution: LFS
Posts: 350

Rep: Reputation: 31
Are you using the -hda switch when booting ?
ie ..

qemu -hda hdd.img
 
  


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
QEmu mtecknology Linux - Software 5 09-14-2007 05:30 AM
qemu gaah Linux - Newbie 6 10-19-2005 05:22 AM
Qemu BarfBag Linux - Software 3 06-03-2005 01:06 PM
qemu RySk8er30 Linux - Software 1 06-01-2005 07:23 PM
qemu: qemu stopped right after command exec bitpicker Linux - Software 1 03-04-2005 11:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:30 AM.

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