Differences between revisions 1 and 2
Revision 1 as of 2013-05-17 13:47:57
Size: 5231
Editor: asbesto
Comment:
Revision 2 as of 2013-05-17 17:36:21
Size: 5051
Editor: asbesto
Comment:
Deletions are marked like this. Additions are marked like this.
Line 16: Line 16:
 * copy the content of the image in a directory, except for the main squashfs filesystem (on ubuntu and debian: filesystem.squash);  * copy the content of the image in a directory, except for the main squashfs filesystem (on ubuntu and debian: '''filesystem.squashfs''');
Line 18: Line 18:
 * 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;
 * 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;
Line 24: Line 24:
You need the squashfs-tools. You need the ''squashfs-tools''.
Line 103: Line 103:
font console setup: ''font console setup'':
Line 109: Line 109:
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.
When you want to remove packages remember to use purge! Aptitude is ok.
Line 120: Line 119:
apt-get install htop modconf apt-get install htop modconf joe mc
Line 122: Line 121:
# some multimedia  # some multimedia?
Line 142: Line 141:
# tolgo rm /etc/resolv.conf perche comunque ci metto i dns dell'MIT # I remove rm /etc/resolv.conf
Line 156: Line 155:
# creiamo il file # creating those files
Line 167: Line 166:
# cancelliamo il vecchio squashfs eventualmente in mezzo alle palle # remove the old squashfs
Line 170: Line 169:
# creiamo il nuovo squashfs # create the new squashfs
Line 186: Line 185:
Per creare una chiavetta avviabile, basta fare To create a bootable USB pendrive:
Line 192: Line 191:
Per quel che riguarda le customizzazioni relative a d:b si rimanda all'articolo precedente, DyneBolicCreate :) For other kind of customizations, take a look at DyneBolicCreate :)
Line 196: Line 195:

==== Settare l'editor default da console ====
==== Setting default console editor ====

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.

apt-get install squashfs-tools

HOWTO

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

# 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

DyneBolicCreate/debian (last edited 2013-05-17 17:36:21 by asbesto)