On Mon, 2010-11-29 at 23:34 +0100, Per Sjoholm wrote: > On 2010-11-29 22:52, Andrew wrote: > > 29.11.2010 23:32, Per Sjoholm пишет: > >> Hi > >> I been trying to make a diskimage with a fat32 partition for use with > >> virtualbox or qemu. > >> > >> Bering-uClibc_4.0-beta1_i486_syslinux_vga.tar.gz and installation > >> instruction for usb/CF > >> assumes a partition. > >> > >> My idee was to configure leaf using a virtual environment and then write > >> the image to a media. > >> > >> > >> Any suggestion on how create a diskimage and a best practice for using > >> qemu or virtualbox? > >> > >> I can update the wiki(need permission) > >> > >> /Per > > LEAF has syslinux, fdisk and mkfs.vfat; so you may boot from CD image, > > load required packages (hdsupp, possible something else), and create > > partition& make it bootable; then - extract here tarball. > > But IMHO it'll be better not to write full image, it'll be better to > > make system (syslinux) partition and place here all distro by packages. > > > Yes, I have done it with cdrom/iso image and floppy. > On floppy you have the device and no partition. > We are leaving floppies. > > On usb and hd/CF-card you want to use partitions. > One for system and for one configuration, possible more depending on usage. > > With > syslinux bering.img > The configuration in tarball assumes /dev/sda1 (a vfat partition). > syslinux on diskimage with no partition will boot. > But LINUXRC does not find the configurations(leaf.cfg) as no /dev/sda1. > > Either some one prepare a empty image (for download) with a partition and > instruktion on how to mount and copy > files(tarball) to it. > Or better(IMHO) a instruction for creating image with partitions from > scratch, mounting partitions and copy tarball. > > > /Per
Hi Per, I have been thinking about distributing a "raw" disk image (like the old floppy disk image) in addition to the .tar.gz for syslinux images, so I have some ideas / notes from a few days ago. Something is wrong with the procedure because the disk image does not boot with qemu, but you may be able to find the problem and fix it... I presume you are running Linux :-) You need to be "root" for (some of) the following commands. Create a blank image file 64MB in size: dd if=/dev/zero of=disk.img bs=1024k count=0 seek=64 Get the name of the next available loopback device losetup -f (Adjust the following commands if this is *not* /dev/loop0) Connect the whole-disk image as a loopback device losetup /dev/loop0 disk.img Populate the Master Boot Record on the disk image dd if=/usr/share/syslinux/mbr.bin of=/dev/loop0 bs=440 count=1 Create a blank partition table on the disk image parted -s /dev/loop0 "mklabel msdos" Create a partition occupying the whole disk; bootable; not lba parted -s /dev/loop0 "mkpart primary fat32 1s -1s" parted -s /dev/loop0 "set 1 boot on" parted -s /dev/loop0 "set 1 lba off" Disconnect the whole-disk image as a loopback device losetup -d /dev/loop0 Now connect the *partition* image as a loopback device losetup -o 32256 /dev/loop0 disk.img Format the partition mkfs.vfat -F 32 -n LEAF_BUC4 /dev/loop0 Install the SYSLINUX boot loader on the partition syslinux /dev/loop0 Mount the partition at /mnt mount /dev/loop0 /mnt Extract the Bering-uClibc .tar.gz cd /mnt tar -xvzf ~/Download/Bering-uClibc_4.0-beta1_i486_syslinux_vga.tar.gz Unmount the partition cd $HOME umount /mnt Disconnect the partition image as a loopback device losetup -d /dev/loop0 Fire up the VM qemu disk.img Hangs at "Booting from Hard Disk... :-( You may have more success using qemu-img to create the initial image, or fdisk rather than parted... davidMbrooke ------------------------------------------------------------------------------ Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ leaf-devel mailing list leaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/leaf-devel