[coreboot] questions about "QEMU Build Tutorial"

Jun Ma sync.jma at gmail.com
Fri May 2 18:21:52 CEST 2008


On Fri, May 2, 2008 at 11:12 PM, Myles Watson <mylesgw at gmail.com> wrote:
>
>  > http://www.coreboot.org/QEMU_Build_Tutorial
>  >

>  I don't know how this tutorial is supposed to work.  Disk.img is supposed to
>  be the whole hard drive, and you're treating it like a partition with
>  mkfs.ext2.  Here is something that should work:
>
>  1. Create the raw image like it says in the tutorial
>  2. Boot QEMU with a rescue disk from your favorite OS
>  3. Run fdisk and create a single partition on the drive that takes up the
>  whole drive
>  4. Quit and write the partition to disk
>  5. Run mkfs.ext2fs on that partition
>  6. Exit QEMU
>
>  You now have a partitioned disk with an ext2 fs.  You could have put in a
>  second partition for swap while you were there, but lets keep this simple.
>
>  Now you have a hard drive image with a partition and you need to mount that
>  partition to copy the files you want.
>
>  Use
>
>  mount -o loop,skip=32256 disk.img /mnt/rootfs
>
>  (Thanks to http://wiki.archlinux.org/index.php/Qemu)
>
>  and continue the tutorial.
>
>  To restate:  The problem is that when you run mkfs.ext2 on the disk.img,
>  you're formatting it as if it were a partition, not a drive, and you don't
>  have a valid partition table.
>
>  There are many other ways to get this done, I think this is the easiest.  If
>  you can't get it to work you might also try:
>
>  1. Stealing the first 32256 bytes (63 * 512B sectors) from a known good
>  image of the same size and concatenating it to the front of a partition like
>  you made in the tutorial (- 63 sectors)
>
>  Hope that helps,

Thanks, Myles.  This wiki maybe need update, :)  I supposed that wiki
page to be the official coreboot guide.
I just installed debian-4.0r2 using qemu-0.9.1(and bochs pc-bios), it
works fine.

Another try will be taken for coreboot tomorrow, I would like to write
a new doc about "QEMU Build Tutorial".

>
>  PS The page I referenced above has other advanced tips too.
>
>
Nice page,  thanks!





-- 
FIXME if it is wrong.




More information about the coreboot mailing list