Re: Add a partition into the binary image
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
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?
For a particular device, such a filesystem can easily be created, see
For the unlikely event that you have a large number of devices of the
same size and want to put the resulting combination of partitions (FAT
for the live part and ext2 for the writable partition), you should
apply the procedure outlined in the mail referenced above once and
then copy the resulting image to all the other devices.
Indeed I have ;) I'm using 1GB CF and an Alix board . I only need a
relatively small writable partition in order to persist some
configuration changes. Because the Alix board access the CF through an
IDE controller, I guess that I should use ext3. The board does not have
a poweroff button so the only way to shutdown the system is to remove
the power supply (I hope the IDE controller has some capacitors...). The
filesystem needs to be quite robust (as needs to be the CF I guess...).
Any suggestion about the filesystem type for the persistence partition?
Thanks and Regards,