* [Qemu-devel] Booting a partition image (not a disk image)?
@ 2005-11-13 16:31 Richard Neill
2005-11-13 17:27 ` Jim C. Brown
0 siblings, 1 reply; 2+ messages in thread
From: Richard Neill @ 2005-11-13 16:31 UTC (permalink / raw)
To: qemu-devel
Dear All,
I hope this isn't a stupid question, but I can't find the answer to it
anywhere. I have copied across the windows ME partition from an old
machine, using
dd if=/dev/hda2 | ssh me@newbox "cat > hda2.img"
This has worked, and I can mount the filesystem fine.
Is there any way I can boot this image using QEMU? i.e. there is no boot
sector, and I've not copied the rest of the drive to save space.
The obvious solution doesn't work:
qemu -boot c -snapshot -hda hda2.img
Thanks very much,
Richard
--
rn214@hermes.cam.ac.uk ** http://www.richardneill.org
Richard Neill, Trinity College, Cambridge, CB21TQ, U.K.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] Booting a partition image (not a disk image)?
2005-11-13 16:31 [Qemu-devel] Booting a partition image (not a disk image)? Richard Neill
@ 2005-11-13 17:27 ` Jim C. Brown
0 siblings, 0 replies; 2+ messages in thread
From: Jim C. Brown @ 2005-11-13 17:27 UTC (permalink / raw)
To: Richard Neill; +Cc: qemu-devel
On Sun, Nov 13, 2005 at 04:31:45PM +0000, Richard Neill wrote:
> Dear All,
>
> I hope this isn't a stupid question, but I can't find the answer to it
> anywhere. I have copied across the windows ME partition from an old
> machine, using
> dd if=/dev/hda2 | ssh me@newbox "cat > hda2.img"
> This has worked, and I can mount the filesystem fine.
>
> Is there any way I can boot this image using QEMU? i.e. there is no boot
> sector, and I've not copied the rest of the drive to save space.
>
> The obvious solution doesn't work:
> qemu -boot c -snapshot -hda hda2.img
>
> Thanks very much,
>
> Richard
>
You need a boot sector in order to be able to boot the image.
Anyways, qemu requires a full hard disk image (MBR, partition table, etc) to
be able to boot a disk image. If you must boot with hda2.img instead of a full
hard disk image, there may be a way to work around that. (To be safe, I'd
recommend making a copy of hda2.img first as a backup.)
You can dump out the MBR & partition table (first few sectors of the hard disk)
into a file, and then append hda2.img to that file. Then load the image up in
fdisk to "fix" the partition table (removing all the other partitions and
giving the single partition the right start and end numbers). After that, things
should work fine.
This is complicated, and may take a while to get right if you are new to
playing with hard disk images.
--
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-11-13 17:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-13 16:31 [Qemu-devel] Booting a partition image (not a disk image)? Richard Neill
2005-11-13 17:27 ` Jim C. Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).