Add packages in GParted live
GParted Live is a small bootable GNU/Linux distribution for x86 machine based on Debian live. If you want to add packages in GParted live, you can follow this:
//NOTE// Due to the changes in Debian Sid repository are very frequent, the following method might need to be adjusted according to the changes.
- 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, isolinux and xorriso if they are not installed:
$ sudo apt-get update; sudo apt-get install squashfs-tools isolinux xorriso
- Download the GParted live zip format file which you intend to add packages, e.g., GParted live version 0.28.1-1, then uncompress it and extract the filesystem.squashfs
$ mkdir ~/zip-tmp ~/squashfs-tmp
$ unzip gparted-live-0.28.1-1-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" )
- Assume the package you intend to add exists in Debian repository, e.g., firefox-esr, then we can do it by:
$ sudo mount --bind /proc squashfs-root/proc/
$ sudo mount --bind /sys squashfs-root/sys/
$ sudo mount --bind /dev squashfs-root/dev/
$ sudo chroot squashfs-root/
$ echo "nameserver 8.8.8.8" > /etc/resolv.conf
(It will write the nameserver for the chroot environment. You can use your desired namer server)
$ apt-get update; apt-get install firefox-esr
$ exit
- Rebuild the new filesystem.squashfs and replace the original one ,then rebuild GParted 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 ../gparted-live.new.zip ./*
Now you have gparted-live.new.zip with firefox-esr included.
- If you want to convert zip file to iso file, you can make it by:
$ cd ~/zip-tmp/
$ xorriso -as mkisofs -R -r -J -joliet-long -l -cache-inodes -iso-level 3 -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -partition_offset 16 -A 'GParted live CD' -b syslinux/isolinux.bin -c syslinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot --efi-boot boot/grub/efi.img -isohybrid-gpt-basdat -isohybrid-apm-hfsplus ./ > /tmp/gparted-live.iso