From: "Jim C. Brown" <jma5@umd.edu>
To: Richard Neill <rn214@hermes.cam.ac.uk>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Booting a partition image (not a disk image)?
Date: Sun, 13 Nov 2005 12:27:14 -0500 [thread overview]
Message-ID: <20051113172714.GA18889@jbrown.mylinuxbox.org> (raw)
In-Reply-To: <43776A71.9000307@hermes.cam.ac.uk>
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.
prev parent reply other threads:[~2005-11-13 17:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051113172714.GA18889@jbrown.mylinuxbox.org \
--to=jma5@umd.edu \
--cc=qemu-devel@nongnu.org \
--cc=rn214@hermes.cam.ac.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).