[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] diskimage HOWTO
From: |
Laurent Vivier |
Subject: |
Re: [Qemu-devel] diskimage HOWTO |
Date: |
Tue, 25 Aug 2009 09:28:47 +0200 |
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
--
--------------------- address@hidden ----------------------
"Tout ce qui est impossible reste à accomplir" Jules Verne
"Things are only impossible until they're not" Jean-Luc Picard
- Re: [Qemu-devel] diskimage HOWTO, (continued)
- Re: [Qemu-devel] diskimage HOWTO, Kevin Wolf, 2009/08/24
- Re: [Qemu-devel] diskimage HOWTO, Bai Shuwei, 2009/08/24
- Re: [Qemu-devel] diskimage HOWTO, Mulyadi Santosa, 2009/08/24
- Re: [Qemu-devel] diskimage HOWTO, Kevin Wolf, 2009/08/25
- Re: [Qemu-devel] diskimage HOWTO, Mulyadi Santosa, 2009/08/25
- Re: [Qemu-devel] diskimage HOWTO, Kevin Wolf, 2009/08/25
- Re: [Qemu-devel] diskimage HOWTO, Mulyadi Santosa, 2009/08/25
- Re: [Qemu-devel] diskimage HOWTO, Bai Shuwei, 2009/08/25
Re: [Qemu-devel] diskimage HOWTO,
Laurent Vivier <=
[Qemu-devel] Re: [Buildroot] diskimage HOWTO, Steve Calfee, 2009/08/25