Search code examples
installationdebianpackageeditcd

how to edit existing debian package in installation cd?


ive been trying to edit a Debian installation CD, followed tutorial on debian website https://wiki.debian.org/DebianInstaller/Modify/CD, successfully extract cd, use genisoimage to recreate iso, try to install debian, no problem.

and then the problem, when i tried to edit one of the package, say i want to change a picture in a package .deb, i used this command:

extract .deb:

mkdir directoryname
cd directoryname
dpkg-deb -x pathtopackage/package_name.deb .
dpkg-deb -e pathtopackage/package_name.deb

building .deb :

dpkg-deb -b . pathtopackage/new_package_name.deb

and replaced the very same package on /pool/main debian cd directory however after built the iso, it failed to install my edited package,

i've tried to fix md5 sum inside cd, rebuild dist/Release, still no luck. any advice?

thanks in advance


Solution

  • finally did it.

    first mistake

    building .deb :

    dpkg-deb -b . pathtopackage/new_package_name.deb
    

    correct command:

    dpkg-deb -b -Zgzip . pathtopackage/new_package_name.deb
    

    to recreate exact package as original one

    and then following the rest tutorial on https://wiki.debian.org/DebianInstaller/Modify/CD,

    except for debootstrap error, it can be done by following tutorial from this page https://bugs.launchpad.net/ubuntu/+source/debootstrap/+bug/1001131

    edit my debootstrap.deb, repackage, and voila, done all the works.

    apparently my error was because debootstrap error from official debian page doesnt work for me.

    hope this information useful for anyone