Ubuntu is a computer operating system based on the Debian GNU/Linux distribution and distributed as free and open source software。It is named after the Southern African philosophy of Ubuntu ("humanity towards others")。
With an estimated global usage of more than 12 million users,Ubuntu is designed primarily for desktop use,although netbook and server editions exist as well。Web statistics suggest that Ubuntu's share of Linux desktop usage is about 50%,and indicate upward trending usage as a web server。
Ubuntu is sponsored by the UK-based company Canonical Ltd.,owned by South African entrepreneur Mark Shuttleworth。Canonical generates revenue by selling technical support and services tied to Ubuntu,while the OS itself is entirely free of charge。
Linux is one OS which has the easy way to customize it by yourself,and no any extra fee is needed,Ubuntu is a rising star in the mainstream Linux market in these years,the below methodology describes the steps how to customize the Ubuntu Desktop Live CD easily。
$ sudo apt-get install squashfs-tools
.Mount the ISO file under /tmp/livecd
$ mkdir /tmp/livecd
$ sudo mount -o loop ~/Desktop/ubuntu-10.04.1-desktop-i386.iso
/tmp/livecd
.Create a directory containing the future CD image named ”cd”
in working directory named ”~/livecd”and copy all the CD
content but exclude casper/filesystem.squashfs in ~/livecd/cd
directory.
$ mkdir ~/livecd
$ mkdir ~/livecd/cd
$ rsync --exclude=/casper/filesystem.squashfs -a /tmp/livecd
~/livecd/cd
.Mount casper/filesystem.squashfs onto a directory named
~/livecd/squashfs in order to copy its content in a directory
where we are going to edit live CD filesystem : ~/livecd/custom
$ mkdir ~/livecd/squashfs
$ mkdir ~/livecd/custom
$ sudo modprobe squashfs
$ sudo mount -t squashfs -o loop /tmp/livecd/casper/
filesystem.squashfs ~/livecd/squashfs/
$ sudo cp -a ~/livecd/squashfs/* ~/livecd/custom
.Copy /etc/resolve.conf /etc/hosts /etc/wgetrc to ~/livecd
/custom/etc and copy /etc/apt/apt.conf to ~/livecd/custom
/etc/apt/ so we can access network from within the image
we are going to customize through.
chroot :
$ sudo cp /etc/resolve.conf /etc/hosts ~/livecd/custom/etc
$ sudo cp /etc/apt/apt.conf ~/livecd/custom/etc/apt/
$ sudo cp /etc/wgetrc ~/livecd/custom/etc/
.For customize the image,chroot into ~/livecd/custom
directory,mount some necessary pseudo-filesystem (/proc
and /sys),From there,we will be able to customize our Live
CD.
$ sudo chroot ~/livecd/custom
# mount -t proc none /proc/
# mount -t sysfs none /sys/
# export HOME=/root
.Install text editor ”vim”
# apt-get install vim
.Custom Background for GNOME
Put a picture (DSC03920.JPG) which used for customized
background in below path :
/usr/share/backgrounds
Add the below section in the file ”/usr/share/gnome-
background-properties/ubuntu-wallpapers.xml”
<filename>/usr/share/backgrounds/DSC03920.JPG</filename>
<options>zoom</options>
<pcolor>#091d5c</pcolor>
<scolor>#091d5c</scolor>
<shade_type>solid</shade_type>
</wallpaper>
Modify the file ”/usr/share/gconf/defaults/16_ubuntu-wallpapers”
to point to the path of customized file,something like this :
/desktop/gnome/background/picture_filename "/usr/share
/backgrounds/DSC03920.JPG”
/desktop/gnome/background/picture_options "zoom”
/desktop/gnome/background/color_shading_type "solid"
/desktop/gnome/background/primary_color "#091d5c”
/desktop/gnome/background/secondary_color "#091d5c”
Search the section ”background” in the file ”/var/lib/gconf/
debian.defaults/%gconf-tree.xml” and modify it for the
corresponding value,something like this :
<dir name="background">
<entry name="picture_options" mtime="1281952284" type="string">
<stringvalue>zoom</stringvalue>
</entry>
<entry name="picture_filename" mtime="1281952284"
type="string">
<stringvalue>/usr/share/backgrounds/DSC03920.JPG
</stringvalue>
</entry>
<entry name="color_shading_type" mtime="1281952284"
type="string">
<stringvalue>solid</stringvalue>
</entry>
<entry name="secondary_color" mtime="1281952284"
type="string">
<stringvalue>#091d5c</stringvalue>
</entry>
<entry name="primary_color" mtime="1281952284"
type="string">
<stringvalue>#091d5c</stringvalue>
</entry>
</dir>
.We will remove gnome-games,non-english language
packages,and openoffice.org-math。
# apt-get remove --purge gnome-games*
# apt-get remove –purge gbrainy
Modify the file ”/var/lib/locales/supported.d/local” as
en_US.UTF-8 UTF-8
Modify the file ”/etc/default/locale” as LANG="en_US.UTF-8"
LANGUAGE="en_US:en"
# apt-get remove --purge `dpkg-query -W --showformat=
'${Package}\n' | grep language-pack | egrep -v '\-en'`
To check all the installed packages, executing the below
commands :
# dpkg-query -W --showformat='${Package}\n' | less or
# dpkg-query -W --showformat='${Package}
${Version}\t${Maintainer}\n'
Remove openoffice.org-math package :
# apt-get remove –purge openoffice.org-math
.Open and edit the file /etc/apt/sources.list, and make it look
like :
# vim /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu lucid main restricted
universe multiverse
deb-src http://archive.ubuntu.com/ubuntu lucid main restricted
universe multiverse
deb http://archive.ubuntu.com/ubuntu lucid-updates main
restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu lucid-updates main
restricted universe multiverse
deb http://security.ubuntu.com/ubuntu lucid-security main
restricted universe multiverse
deb-src http://security.ubuntu.com/ubuntu lucid-security main
restricted universe multiverse
.Update the image :
# apt-get update
# apt-get dist-upgrade
.Install all the multimedia packages we may need :
# apt-get install gstreamer0.10-ffmpeg gstreamer0.10-plugins-ugly
gstreamer0.10-plugins-ugly-multiverse gstreamer0.10-plugins-bad
gstreamer0.10-plugins-bad-multiverse vlc mplayer mplayer-fonts
# cd /usr/share/doc/libdvdread4/
# ./install-css.sh
.Download ”libdvdcss2_1.2.10-0.2medibuntu1_i386.deb” from
http://packages.medibuntu.org/pool/free/libd/libdvdcss/ and
put it under the path /usr/share/doc/libdvdread4, install it as
command :
# dpkg -i libdvdcss2_1.2.10-0.2medibuntu1_i386.deb
.Install RealPlayer
Download ”RealPlayer11GOLD.deb” from http://www.real.com/
realplayer/linux and put it under the path /tmp,install it as
command :
# dpkg -i RealPlayer11GOLD.deb
.Install some useful utilities
# apt-get install rar unrar unace-nonfree
.Install some wireless network utilities
# apt-get install ndiswrapper-common ndiswrapper-utils-1.9
cabextract unshield kismet aircrack-ng
.Install some network utilities
# apt-get install wireshark nmap ettercap traceroute
.Install some flash plugin and firefox plugin
# apt-get install flashplugin-nonfree flashplugin-installer mozilla
-plugin-vlc swfdec-mozilla mozilla-plugin-gnash
.Clean the download cache files and remove unnecessary files
# apt-get clean
# rm -rf /tmp/*
# rm -f /etc/hosts /etc/resolv.conf
# umount /proc/
# umount /sys/
# exit
.Make the new manifest file
$ chmod +w ~/livecd/cd/casper/filesystem.manifest
$ sudo chroot ~/livecd/custom dpkg-query -W
-showformat='${Package}${Version}\n' > ~/livecd/cd/casper/
filesystem.manifest
$ sudo cp ~/livecd/cd/casper/filesystem.manifest ~/livecd
/cd/casper/filesystem.manifest-desktop
.Make the new squash file system
$ sudo mksquashfs ~/livecd/custom ~/livecd/cd/casper/
filesystem.squashfs
.Customize the file ”~/livecd/cd/README.diskdefines”
$ vim ~/livecd/cd/README.diskdefines
.Update the file ”~/livecd/cd/md5sum.txt”
$ sudo rm ~/livecd/cd/md5sum.txt
$ sudo -s
# cd ~/livecd/cd && find . -type f -print0 | xargs -0 md5sum
> md5sum.txt
.Make the CD ISO file
$ cd ~/livecd/cd
$ sudo mkisofs -r -V "Ubuntu-Live-Custom" -b isolinux/isolinux.bin
-c isolinux/boot.cat -cache-inodes -J -l -no-emul-boot -boot
-load-size 4 -boot-info-table -o ~/Desktop/Ubuntu-Live-10.04
-custom_R.iso .
.Use Virtualbox to open the ISO file,if no problem, just can
burn it as a CD。
The related PowerPoint file will be downloaded from the below
address :
Customize Ubuntu Desktop Live CD

沒有留言:
張貼留言