Re: Add a partition into the binary image
On Mon, Jan 19, 2009 at 04:55:33PM +0100, Cyril Jaquier wrote:
> Hi Hans,
> >>I'm trying to build a live system for an embedded computer with a CF
> >>card. I would like to use the persistence feature to have a writable
> >>root filesystem.
> >>I would like to create a writable filesystem in a file (ext2) and have
> >>this file "appended" to the final binary image.
> >>Is it possible to add an additional partition to the final binary image?
> >Since you might want to use the image on different sized devices, it
> >does not make sense to automate the creating of a binary image with a
> >writable ext2 filesystem on it.
> I'm trying to build an image for a given board/device size. So it makes
> sense to automate this. Of course, I could copy the binary image on the
> CF image, use fdisk to create a new partition, format/label it and then
> recreate a binary image of the device. But I would like to automate this.
> I should be able to achieve this with a combination of dd, losetup,
> fdisk and mkfs. It seems like the losetup.sh from live-helper will be
> really helpful in this case. I think I will need to write a wrapper
> script over lh_build because lh_binary_local-hooks is executed before
> lh_binary_usb-hdd. Or is there a place where I could hook in order to
> modify the final binary.img file?
You can also use sfdisk or parted as part of the installation (after