GNOME Partition Editor

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.

  1. 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 if it's not installed:

    $ sudo apt-get update; sudo apt-get install squashfs-tools

  2. 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 -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" )

  3. 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" > /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

  4. 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 -b 1024k -comp xz -Xbcj x86 -e boot
    $ sudo cp ~/zip-tmp/live/filesystem.squashfs
    $ cd ~/zip-tmp ; sudo zip -r ../ ./*

    Now you have with firefox-esr included.

  5. If you want to convert zip file to iso file, you can make it by:

    $ cd ~/zip-tmp/
    $ genisoimage -A 'GParted live CD' -f -r -hide-rr-moved -hide-joliet-trans-tbl -J -l -allow-limited-size -b syslinux/isolinux.bin -c syslinux/ -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -efi-boot EFI/images/efiboot.img -no-emul-boot ./ > /tmp/gparted-live.iso
Documentation   FAQ   Forum   Bugs   Features   Screenshots   Articles   Contact

Get GParted at Fast, secure and Free
	Open Source software downloads Valid HTML 4.01! Correct CSS! Privacy policy