How I construct my own Ubuntu LTS 12.04 Customization DVD

Created: January 29, 2013   Last Modified: October 05, 2020   Category: linux   Print this pageBack to Home

Summary

This post aims to record what I did to construct my own Ubuntu LTS 12.04 Customization DVD. You can still find the old configuration files at Google Code Archive, and the whole repository can be downloaded here. Even though the original instruction was deleted, you can still access a saved copy at the Internet Archive.

Prepare for configuring system

The system configurations were processed in Ubuntu Linux. For convenience, you should execute sudo without typing password. In order to do that, in terminal, type

sudo visudo

and add the following line to the end of the file

[username] ALL=(ALL) NOPASSWD: ALL

where [username] is your username. The configuration required at least 15 - 20 GB of free disk space. The following packages are also needed

sudo apt-get install grub2 xorriso squashfs-tools debootstrap qemu subversion rar unrar zip unzip p7zip-full p7zip-rar

A good internet connection is highly recommended.

Create working directory

export WORK=~/work CD=~/cd FORMAT=squashfs FS_DIR=casper
sudo mkdir -p ${CD}/{${FS_DIR},boot/grub} ${WORK}/rootfs
sudo debootstrap precise ${WORK}/rootfs

Download required files to ${WORK}/rootfs/

Build my own custom system

Prepare the new system before chrooting it

sudo unzip ${WORK}/rootfs/apt.zip -d ${WORK}/rootfs/etc

Answer A (which means overwrite all) for the question. Next, in terminal, type

for i in /etc/resolv.conf /etc/hosts /etc/hostname; do sudo cp -pv $i ${WORK}/rootfs/etc/; done
sudo mount --bind /dev ${WORK}/rootfs/dev
sudo mount -t proc proc ${WORK}/rootfs/proc
sudo mount -t sysfs sysfs ${WORK}/rootfs/sys
sudo chroot ${WORK}/rootfs /bin/bash
apt-get update --allow-unauthenticated

Modify the new system

Install some basic packages.

GNOME desktop

apt-get install aptitude dselect xorg lightdm faenza-icon-theme ambiance-blue-theme \
indicator-applet-complete gnome-tweak-tool compiz-gnome dconf-tools gconf-defaults-service gconf-editor

To set GNOME as the default desktop, use the command

/usr/lib/lightdm/lightdm-set-defaults -s gnome

Install packages for various archive formats

apt-get install unace unrar zip unzip p7zip-full p7zip-rar \
sharutils rar uudeview mpack lha arj cabextract file-roller

Complie and install Mplayer

Install office and media packages

apt-get install gedit gedit-plugins gedit-developer-plugins \
libreoffice-gnome libreoffice-pdfimport mozilla-libreoffice \
ubuntu-restricted-extras app-install-data-medibuntu apport-hooks-medibuntu evince \
non-free-codecs gxine mencoder flac faac faad sox libmpeg3-1 mpeg3-utils \
mpegdemux mpeg2dec mpg321 totem-mozilla tagtool easytag \
id3tool nautilus-script-audio-convert libjpeg-progs libdvdcss2 \
ibus-unikey scim-unikey ttf-abc-fonts ttf-bkunicode-fonts ttf-vni-fonts \
vlc mozilla-plugin-vlc audacity gimp \
pidgin pidgin-data \
skype bleachbit nuvolaplayer avidemux lives gtkpod sopcast-player \
gtk-recordmydesktop cheese

Install language packages

apt-get install language-pack-vi-base language-pack-en-base

Install some extra useful packages

apt-get install firefox nautilus-dropbox dropbox-share ubuntuone-client-gnome \
indicator-ubuntuone rhythmbox-ubuntuone goldendict artha fbreader \
galculator djview4 shotwell shutter wine1.4 tasksel

Install packages for utilities and configurations

apt-get install synaptic y-ppa-manager gdebi \
ubuntu-tweak super-boot-manager preload \
network-manager network-manager-gnome network-manager-openvpn openvpn \
unetbootin grub2 xorriso isomaster squashfs-tools debootstrap dkms virtualbox-4.1 \
samba smbfs system-config-samba ssh subversion git git-core mercurial mercurial-common \
filezilla transmission-gtk transmission-common nitroshare openjdk-7-jre gnome-terminal \
nautilus-open-terminal xfig gnome-power-manager hibernate remastersys \
python-dev python-mysqldb python-setuptools python-pip python-matplotlib libnetpbm10 libnetpbm10-dev

Install games

apt-get install gnugo uligo qgo gmchess 

Install Fonts

Install packages for using in emergency situations

apt-get install boot-repair os-uninstaller gparted testdisk wipe \
partimage xfsprogs reiserfsprogs jfsutils ntfs-3g ntfsprogs dosfstools mtools winusb

Install some deb packages: Google Video and Voice Chat Plugin for Ubuntu, Foxit Reader, Google Chrome, Teamviewer, mail.ru agent for pidgin, Foobnix, Livestation, XvidCap

wget -i deb_links
dpkg -i google-talkplugin_current_i386.deb FoxitReader_1.1.0_i386.deb google-chrome-stable_current_i386.deb \
teamviewer_linux.deb mrim-prpl_0.1.28-2_i386.deb foobnix_2.5.36p_i386.deb xvidcap_1.1.7-0.2ubuntu12_i386.deb
rm google-talkplugin_current_i386.deb FoxitReader_1.1.0_i386.deb google-chrome-stable_current_i386.deb \
teamviewer_linux.deb mrim-prpl_0.1.28-2_i386.deb foobnix_2.5.36p_i386.deb xvidcap_1.1.7-0.2ubuntu12_i386.deb

Install Winetricks

wget http://winetricks.org/winetricks
chmod +x winetricks
mv winetricks /usr/local/bin

Install TeX Live 2012

Install Texmaker

wget http://www.xm1math.net/texmaker/texmaker_ubuntu_12.04_3.5_i386.deb
apt-get install libpoppler-qt4-3
dpkg -i texmaker_ubuntu_12.04_3.5_i386.deb
rm texmaker_ubuntu_12.04_3.5_i386.deb

Install Customizer

wget https://github.com/downloads/fluxer/Customizer/install.sh
chmod a+x install.sh
./install.sh -i
rm install.sh

Install Sphinx

easy_install -U Sphinx

Install Oxford Advanced Learner’s Dictionary 8th edition

Install Wink

Install Packages Essential for live CD

apt-get install casper lupin-casper ubiquity ubiquity-frontend-gtk

Some Extra Configurations

Finish configuring system

In chroot terminal

export kversion=`cd /boot && ls -1 vmlinuz-* | tail -1 | sed 's@vmlinuz-@@'`
depmod -a $kversion
update-initramfs -u -k $kversion
apt-get clean
apt-get --purge autoremove
aptitude purge ?config-files
rm wink15_b1060.tar.gz deb_links default.zip installed-software \
DMZ-icons.zip backgrounds.zip add.firefox.extension.sh 59794-Original.tar.gz
rm /etc/resolv.conf /etc/hostname
exit

Prepare The CD directory tree

Build the CD/DVD

sudo grub-mkrescue -o ~/live-cd.iso ${CD}

Clean the workspace

[ -d "$WORK" ] && sudo rm -r $WORK $CD

References