Differences between revisions 2 and 3
Revision 2 as of 2013-05-14 10:06:01
Size: 5915
Editor: asbesto
Revision 3 as of 2013-05-14 13:45:13
Size: 5942
Editor: asbesto
Deletions are marked like this. Additions are marked like this.
Line 177: Line 177:
isohybrid ../dyneIIIb.iso

Create a Dyne:III iso image

by Asbesto, MAY 2013


Fetch your favorite iso, in the following examples we will take Linux Mint 14.1 iso but this procedures can apply to a lot of different iso/systems.

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.squash; on dynebolic: dyne.sys);
  • 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.


You need the squashfs-tools.

apt-get install squashfs-tools


You can cut'n paste from here to your shell, as you need. ;)

# we choose pd/ as our working directory, so...

mkdir pd
cd pd

sudo mount linuxmint-14.1-mate-dvd-32bit.iso /mnt -o loop
mkdir extract-cd
rsync --exclude=/casper/filesystem.squashfs -a /mnt/ extract-cd
# for d:b: rsync --exclude=/dyne/dyne.sys -a /mnt extract-cd/

sudo unsquashfs /mnt/casper/filesystem.squashfs
# for d:b: sudo unsquashfs /mnt/dyne/dyne.sys 

sudo mv squashfs-root edit

# 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


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! ;)


When you want to remove packages remember to use purge I investigated a bit the matter, not enough to know whats going on but enough to know is a good practice.

Once in the chroot start poking:

# refresh your list
apt-get update

# some must have
apt-get install htop modconf

# 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. ;)


cd /
aptitude clean
rm -rf /tmp/* ~/.bash_history
# tolgo rm /etc/resolv.conf perche comunque ci metto i dns dell'MIT
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
sudo umount edit/dev
sudo mv edit/packages.txt extract-cd/casper/

# Into the pd dir: 

# creiamo il file
sudo touch extract-cd/casper/filesystem.manifest
sudo chmod a+w extract-cd/casper/filesystem.manifest
sudo chroot edit dpkg-query -W --showformat='${Package} ${Version}\n' > extract-cd/casper/filesystem.manifest
sudo cp extract-cd/casper/filesystem.manifest extract-cd/casper/filesystem.manifest-desktop
sudo sed -i '/ubiquity/d' extract-cd/casper/filesystem.manifest-desktop
sudo sed -i '/casper/d' extract-cd/casper/filesystem.manifest-desktop

# Compress the filesystem

# cancelliamo il vecchio squashfs eventualmente in mezzo alle palle
sudo rm extract-cd/casper/filesystem.squashfs

# creiamo il nuovo squashfs
sudo mksquashfs edit extract-cd/casper/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 "dyneIIIb" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o ../dyneIIIb.iso .
isohybrid ../dyneIIIb.iso


Per quel che riguarda le customizzazioni relative a d:b si rimanda all'articolo precedente, DyneBolicCreate :)


  • Remove all useless documentation from /usr/share/doc
  • Splash screen: si trova in nella sezione extract-cd del kit di sviluppo, quindi fuori da edit/ : nel mio caso sta dentro /home/asbesto/Desktop/src/pd/extract-cd/isolinux e si chiama ovviamente splash.png, 640x480. SISTEMATO, VEDIAMO SE VA. CI SONO ANCHE ALTRI SFONDI DA PROVARE LI DENTRO.

  • Splash screen 2: usr/share/images/desktop-base/grubsplash-puredyne-logo-simple.png settato a Volcan.png per grub, usato da /etc/grub.d/05_debian_theme.

Settare l'editor default da console

Si usa update-alternatives --config editor che ti fa scegliere l'editor preferito tramite un menu.

DyneBolicCreate/mint (last edited 2013-05-14 16:51:11 by asbesto)