#acl FreaknetGroup:read,write,admin,delete,revert All:read == Dynebolic-III Debian-based distro == by Asbesto, MAY 2013 <> === Description === Make your own Debian Live hybrid ISO from http://live-build-cgi.debian.net/cgi-bin/live-build and download it! The basic procedure is simple: * mount the ISO image in loop mode; * copy the content of the image in a directory, except for the main squashfs filesystem (on ubuntu and debian: '''filesystem.squashfs'''); * unsquash the squashfs image file into another directory; * Add '''resolv.conf''' and '''hosts''' in '''/etc''' by hand or copying from your system; * mount the '''dev,proc and sys''' filesystems into the uncompressed directory; * do some minor stuff for having the system ready for your tweaks. === Requirements === You need the ''squashfs-tools''. {{{ #!bash apt-get install squashfs-tools }}} === HOWTO === You can cut'n paste from here to your shell, as you need. ;) {{{ #!bash # CREATING THE DEVELOPMENT SYSTEM FROM THE ISO IMAGE # we choose pd/ as our working directory, so... mkdir pd cd pd sudo mount binary.hybrid.iso /mnt -o loop mkdir extract-cd rsync --exclude=/live/filesystem.squashfs -a /mnt/ extract-cd sudo unsquashfs /mnt/live/filesystem.squashfs sudo mv squashfs-root edit # ISO IMAGE CREATED! # USE YOUR DEVELOPMENT SYSTEM # use resolv.conf and hosts from your system, or edit them by hand... sudo cp /etc/resolv.conf edit/etc/ sudo cp /etc/hosts edit/etc/ # if you are into your pd/ directory with # the system extracted as above, # just cut'n paste from here to start # working on the system. sudo mount --bind /dev/ edit/dev sudo chroot edit mount -t proc none /proc mount -t sysfs none /sys mount -t devpts none /dev/pts # To avoid locale problems during installation # of new packages, you need to export 2 # system variables: export HOME=/root export LC_ALL=C # You also need to do this as root (that's for some # reasons connected with a couple of dbus bugs). # If you are re-chrooting to a system you're working # on, don't mind about warnings or errors. dbus-uuidgen > /var/lib/dbus/machine-id dpkg-divert --local --rename --add /sbin/initctl ln -s /bin/true /sbin/initctl #done! }}} NOTE: if the above dpkg-divert fail with a "not allowed" message, just remove /sbin/initctl.distrib {{{ rm /sbin/initctl dpkg-divert --local --rename --add /sbin/initctl ln -s /bin/true /sbin/initctl }}} That's all folks! ;) === Suggestions === ''font console setup'': {{{ wopr ~ # dpkg-reconfigure console-setup }}} When you want to remove packages remember to use purge! Aptitude is ok. Once in the chroot start poking: {{{ # refresh your list apt-get update # some must have apt-get install htop modconf joe mc # some multimedia? apt-get install cinelerra sox twolame mpeg2dec a52dec libsox-fmt-all a52dec darkice darksnow }}} === rsync to carry the pack for working out of home === {{{ rsync --exclude=/edit/dev --exclude=/edit/proc --exclude=/edit/sys -auvz /home/youruser/wherever/src/pd/ /media/usbdisk/pd/ }}} In this way you rsync your pd/ working directory on a same pd/ dir on your usb key, so you can work everywhere on your eeepc. ;) === Closing === {{{ cd / aptitude clean rm -rf /tmp/* ~/.bash_history # I remove rm /etc/resolv.conf rm /var/lib/dbus/machine-id rm /sbin/initctl dpkg-divert --rename --remove /sbin/initctl dpkg -l > packages.txt umount /proc umount /sys umount /dev/pts exit sudo umount edit/dev sudo mv edit/packages.txt extract-cd/live/ # Into the pd dir: # creating those files sudo touch extract-cd/live/filesystem.manifest sudo chmod a+w extract-cd/live/filesystem.manifest # sudo chroot edit dpkg-query -W --showformat='${Package} ${Version}\n' > extract-cd/live/filesystem.manifest sudo cp extract-cd/live/filesystem.manifest extract-cd/live/filesystem.manifest-desktop sudo sed -i '/ubiquity/d' extract-cd/live/filesystem.manifest-desktop sudo sed -i '/live/d' extract-cd/live/filesystem.manifest-desktop # Compress the filesystem # remove the old squashfs sudo rm extract-cd/live/filesystem.squashfs # create the new squashfs sudo mksquashfs edit extract-cd/live/filesystem.squashfs # Remove old md5sum.txt and calculate new md5 sums cd extract-cd sudo rm md5sum.txt find -type f -print0 | sudo xargs -0 md5sum | grep -v isolinux/boot.cat | sudo tee md5sum.txt # From inside the extract-cd directory: sudo mkisofs -D -r -V "db3a" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o ../db3a.iso . sudo isohybrid ../db3a.iso # HASTA SIEMPRE, COMANDANTE CHE GUEVARA! }}} To create a bootable USB pendrive: {{{ sudo dd if=db3a.iso of=/dev/sdXX bs=8192k }}} For other kind of customizations, take a look at DyneBolicCreate :) === Hints === ==== Setting default console editor ====