How can I add a program in the main file system of Clonezilla live, i.e. in the file "filesystem.squashfs"? |
The follow describes how to add a program "ms-sys" in Cloinezilla live.
- Follow http://ms-sys.sourceforge.net/, you can compile ms-sys binary code for lenny ("make", "gcc", and "gettext" packages are required to compile ms-sys), say "~/ms-sys-2.3.0" is its source path.
- You need a GNU/Linux system as a working environment to do this. Here we use Debian Jessie as the working environment. First we need to install squashfs-tools:
$ sudo apt-get update; sudo apt-get install squashfs-tools
- Download Clonezilla live 2.5.0-25 zip file, then uncompress clonezilla-live-2.5.0-25-i686-pae.zip and extract the original filesystem.squashfs (Here 2.5.0-25 is an example, you can do it for different version of Clonezilla live)
$ mkdir ~/zip-tmp ~/squashfs-tmp
$ unzip clonezilla-live-2.5.0-25-i686-pae.zip -d ~/zip-tmp
$ cp ~/zip-tmp/live/filesystem.squashfs ~/squashfs-tmp
$ cd ~/squashfs-tmp; sudo unsquashfs filesystem.squashfs
(it will extract filesystem.squashfs to directory "squashfs-root" )
- Copy ms-sys binary files into relative path of squashfs-root:
$ sudo cp ~/ms-sys-2.3.0/bin/ms-sys squashfs-root/usr/local/bin
- Rebuild the new filesystem.squashfs and replace the original one ,then rebuild clonezilla-live zip file with a XZ-compressed filesystem.squashfs:
$ sudo mksquashfs squashfs-root filesystem.squashfs.new -b 1024k -comp xz -Xbcj x86 -e boot
$ sudo cp filesystem.squashfs.new ~/zip-tmp/live/filesystem.squashfs
$ cd ~/zip-tmp ; sudo zip -r ../clonezilla-live.new.zip ./*
Now you have clonezilla-live.new.zip with ms-sys included.
If you want to convert the zip file to iso file, check this doc.
|
|