Skip to contentSkip to conversation

Using Qemu to install Linux in a Windows XP disk image

Qemu-devel Brett Bonfield 3 participants 4 messages Nov 12, 2004

lore
Share & tools
lore
#0 lore raw

I'm still trying to use QemuInstall on Windows XP Pro to install SimplyMEPIS Linux. You were right -- the initial dd call I was using was not correct. I've fixed the call, but still haven't made it work. Here are my tests so far. I'm sorry this is such a long message, but I've been doing a lot of testing :^)

Quoted 1 line

From the Mepis.org forums ( http://www.mepis.org/node/view/4066 ):

<begin msg from Mepis forums>

"I've had no problems running SimplyMEPIS from within Qemu as-is... if you're looking to install it first run:

dd of=hd.img bs=1024 seek=3000000 count=0

to create a hard disk image (change seek to whatever size you want the image to be, in this case around 3GB). Then run:

qemu -hda hd.img -cdrom SimplyMEPIS-2004.04.iso -boot d -user-net

You can then install as normal using the MEPIS Installation Center and from then on boot with:

qemu -hda hd.img -user-net

You're on your own in finding a tool in windows that does the equivelant of dd in Linux though."

<end msg from Mepis forums>

I found the Windows equivalent of dd (
http://uranus.it.swin.edu.au/~jn/linux/rawwrite/dd.htm ) and the developer, John Newbigin, emailed that I should not use

dd of=hd.img bs=1024 seek=3000000 count=0

but should instead

<begin msg from John Newbigin>

"Pick a file which you can read and is larger than 1024 bytes and try this command:

dd if=filethatalreadyexists of=newfile.img bs=1k seek=3071999 count=1

here seek is the offset into the newfile to start the writing. The number I am using = 1024 * 3000 - 1 which will give you 3000Meg again."

<end msg from John Newbigin>

I tried this with SimplyMEPIS-2004.04.iso (the last Mepis release), John Newbigin's dd for Win32, and QemuInstall-0.6.0 and QemuInstall-20041111. Here are the errors I got:

QemuInstall-0.6.0 (installed to C:\Program Files\Qemu):

dd if=SimplyMEPIS-2004.04.iso of=MEPIS.img bs=1k seek=3071999 count=1

< this created the image >

qemu -hda hd.img -cdrom SimplyMEPIS-2004.04.iso -boot d -user-net

< this didn't seem to do anything >

qemu -hda hd.img -user-net

< this didn't seem to do anything, either >

So I deleted the .img and uninstalled QemuInstall-0.6.0.

--

QemuInstall-20041111 (installed to C:\Program Files\Qemu):

dd if=SimplyMEPIS-2004.04.iso of=MEPIS.img bs=1k seek=3071999 count=1

< this created the image >

qemu -hda hd.img -cdrom SimplyMEPIS-2004.04.iso -boot d -user-net

< screen flashed and I got the following error:
qemu: could not load PC bios '/c/Program Files/Qemu/bios/bios.bin' >

qemu -hda hd.img -user-net
< again the screen flashed and again I got the following error:
qemu: could not load PC bios '/c/Program Files/Qemu/bios/bios.bin' >

I decided to try using QemuMenu.bat, which I ran from the command line, It said

<begin QemuMenu.bat error>

Boot QEMU using image:
[1] MEPIS

I selected 1. This generated a QEMU window that contained the following message (slightly abridged):

Plex86/Bochs VGSBios current-cvs 07 Nov 2004

cirrus-compatible VGA is detected

Bochs BIOS, 1 cpu, $Revision: 1.110 $ $Date: 2004/05/31 13:11:27 $

ata0 master: QEMU HARDDISK ATA-2 Hard-Disk (3000 MBytes) ata0 slave: Unknown device
ata1 master: QEMU CD-ROM ATAPI-4 CD-Rom/DVD-Rom ata1 slave: Unknown device

Boot from Hard Disk 0 failed
FATA: Not a bootable disk

<end QemuMenu.bat error>

Please let me know what I'm doing wrong. Again, thank you for reading through such a long message.

Brett

#1 lore raw

Quoting Brett Bonfield <[email protected]>:
(...)

Quoted 1 line

So I deleted the .img and uninstalled QemuInstall-0.6.0.

Connect to codeproject, subscribe and look for Make-a-file.exe. Any size, and with randol content, it's instantly done.

Zitu
--

#3 lore raw
In reply to Brett Bonfield

Hi,

On Fri, 12 Nov 2004 15:51:56 -0500, Brett Bonfield <[email protected]> wrote:
<snip>

Quoted 5 lines

QemuInstall-0.6.0 (installed to C:\Program Files\Qemu):
dd if=SimplyMEPIS-2004.04.iso of=MEPIS.img bs=1k seek=3071999 count=1 < this created the image >
qemu -hda hd.img -cdrom SimplyMEPIS-2004.04.iso -boot d -user-net < this didn't seem to do anything >

Try:
qemu -L . -hda hd.img -cdrom SimplyMEPIS-2004.04.iso -boot d -user-net

Quoted 5 lines

Boot from Hard Disk 0 failed
FATA: Not a bootable disk
<end QemuMenu.bat error>
Please let me know what I'm doing wrong. Again, thank you for reading through such a long message.

It seems that the batch file is trying to boot the hard drive image instead of the ISO image. Obviously, since the HD image hasn't been initialized with a proper OS, it will fail.

Appearently the batch file worked because it passes the "-L ." flag to QEMU, but sticked to bootin the HD by default.

I hope that's it, and now everything should work OK. Let me know :)

Cheers,
A.

Signature · 2 lines
"A year spent in artificial intelligence is enough to make one believe in God"
Alan J. Perlis