All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Vivier <Laurent@vivier.eu>
To: Kevin Wolf <kwolf@redhat.com>
Cc: buildroot@busybox.net, qemu-devel@nongnu.org,
	Bai Shuwei <baishuwei@gmail.com>
Subject: Re: [Qemu-devel] diskimage HOWTO
Date: Tue, 25 Aug 2009 09:28:47 +0200	[thread overview]
Message-ID: <1251185327.5886.4.camel@Quad> (raw)
In-Reply-To: <4A9245EA.9030108@redhat.com>

Le lundi 24 août 2009 à 09:48 +0200, Kevin Wolf a écrit :
> Bai Shuwei schrieb:
> > Hi, All:
> >   I want to build a test enviroment with QEMU and buildroot. But I don't
> > know how to build the diskimage which same as linux-0.2.img offered by
> > BUILD-ROOT. I build the diskimage following the 
> >    buildroot-2009.05/docs/README.diskimage
> > <http://192.168.1.102/crosscopile/buildroot-2009.05/docs/README.diskimage>,
> > but failure.
> >  
> >    The bellow is my process.
> >  
> >    # dd if=/dev/zero of=img bs=4096 count=16384
> >    # echo -e "n\np\n1\n\nw\n" | fdisk -C 16065 -H 255 -S 63 ./img
> >    # losetup -o 512 /dev/loop0 img
> 
> This looks like the wrong offset. The first partition usually starts at
> sector 63. But probably you'll want to use kpartx which takes an image
> and creates device nodes for each partition.

You can also use loop module with max_part parameter (on a recent
kernel, 2.6.26, I think):

# rmmod loop
# modprobe loop max_part=16
# losetup -f /dev/loop0
# mount /dev/loop0p1 /mnt

If the disk image format is qcow2 you can use nbd module with max_part
parameter and qemu-nbd.

Regards,
Laurent
-- 
--------------------- laurent@vivier.eu ----------------------
"Tout ce qui est impossible reste à accomplir"    Jules Verne
"Things are only impossible until they're not" Jean-Luc Picard

  parent reply	other threads:[~2009-08-25  7:29 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-24  5:39 [Buildroot] diskimage HOWTO Bai Shuwei
2009-08-24  5:39 ` [Qemu-devel] " Bai Shuwei
2009-08-24  7:48 ` Kevin Wolf
2009-08-24  8:30   ` [Buildroot] " Bai Shuwei
2009-08-24  8:30     ` Bai Shuwei
2009-08-24 17:04   ` Mulyadi Santosa
2009-08-25  3:55     ` [Buildroot] " Bai Shuwei
2009-08-25  3:55       ` Bai Shuwei
2009-08-25  5:03       ` Mulyadi Santosa
2009-08-25  7:06     ` Kevin Wolf
2009-08-25  7:32       ` Mulyadi Santosa
2009-08-25  7:37         ` Kevin Wolf
2009-08-25  7:41           ` Mulyadi Santosa
2009-08-25  8:48             ` Bai Shuwei
2009-08-25  7:28   ` Laurent Vivier [this message]
2009-08-24 18:13 ` [Buildroot] " Steve Calfee
2009-08-24 18:13   ` [Qemu-devel] " Steve Calfee
2009-09-11  9:32 ` [Qemu-devel] " Richard W.M. Jones
2009-09-11 11:27   ` [Buildroot] " Peter Korsgaard
2009-09-11 11:38     ` Richard W.M. Jones

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=1251185327.5886.4.camel@Quad \
    --to=laurent@vivier.eu \
    --cc=baishuwei@gmail.com \
    --cc=buildroot@busybox.net \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.