[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] diskimage HOWTO
From: |
Richard W.M. Jones |
Subject: |
Re: [Qemu-devel] diskimage HOWTO |
Date: |
Fri, 11 Sep 2009 10:32:17 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Mon, Aug 24, 2009 at 01:39:53PM +0800, Bai Shuwei wrote:
> 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
> # mkfs.ext2 -m0 -Lslash /dev/loop0
> # mount -oloop,rw /dev/loop0 fs/
You may find that libguestfs is better for this sort of thing. It
doesn't need you to be root for a start.
You'd do something like:
$ guestfish <<EOF
alloc img 64M
run
sfdiskM /dev/sda ,
mkfs ext2 /dev/sda1
EOF
Rich.
--
Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 75 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
- Re: [Qemu-devel] diskimage HOWTO,
Richard W.M. Jones <=