ImageModification

Differences between revisions 1 and 2
Revision 1 as of 2008-09-03 08:53:57
Size: 1595
Editor: p5098ed03
Comment: Initial Creation
Revision 2 as of 2008-09-03 09:59:32
Size: 1595
Editor: p5098ed03
Comment: typo
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
mdkir /tmp/image mkdir /tmp/image

This Howto is outlining the process to install a package inside Intrepid (8.10) Mobile and MID Images. Download the latest .img file, then follow the steps below.

Preparation:

mkdir /tmp/image
mkdir /tmp/squashfs
mkdir /tmp/tmpfs
mkdir /tmp/mergemount

Mount the filesystems:

sudo mount -o loop <your downloaded .img file> /tmp/image
sudo mount -o loop -t squashfs /tmp/image/casper/filesystem.squashfs /tmp/squashfs
sudo mount -t tmpfs tmpfs /tmp/tmpfs
sudo mount -t aufs -o br:/tmp/tmpfs:/tmp/squashfs none /tmp/mergemount

Make sure essential filesystems are mounted inside the image:

sudo chroot /tmp/mergemount mount -t proc proc /proc
sudo chroot /tmp/mergemount mount -t sysfs sysfs /sys

Make sure packagelists are up to date and install the software you like:

sudo chroot /tmp/mergemount apt-get update
sudo chroot /tmp/mergemount apt-get install <your desired package>

Clean up:

sudo chroot /tmp/mergemount apt-get clean
sudo chroot /tmp/mergemount umount /proc
sudo chroot /tmp/mergemount umount /sys

Build a new squashfs with your changes:

sudo mksquashfs /tmp/mergemount /tmp/filesystem.squashfs

Clean up the temporary mountpoints:

sudo umount /tmp/mergemount
sudo umount /tmp/tmpfs
sudo umount /tmp/squashfs

Copy the new squashfs in place:

sudo cp /tmp/filesystem.squashfs /tmp/image/casper/

Clean up the rest:

sudo umount /tmp/image
sudo rm -rf /tmp/image /tmp/tmpfs /tmp/squashfs /tmp/mergemount

Have fun with your changed imagefile ....

MobileTeam/Mobile/HowTo/ImageModification (last edited 2008-09-04 13:40:45 by p5098ed03)