Ubuntu 14.04.2 Desktop i386 光碟要處理的部分就會比較多一些。
1. 切換成 root
$ sudo su –
2. 安裝 squashfs-tools 套件
# apt-get install squashfs-tools
3. 建立 Trusty 目錄
# mkdir Trusty
4. 掛載 iso 光碟
# mount -o loop ubuntu-14.04.2-desktop-i386.iso Trusty
5. 複製 Trusty 目錄成 iso.Trusty 以進行修改作業
# cp -af Trusty iso.Trusty[@more@]
6. 搬移 iso.Trusty/casper/filesystem.squashfs 到現在的目錄之下
# mv iso.Trusty/casper/filesystem.squashfs .
7. 解開 filesystem.squashfs
# unsquashfs -d os.Trusty filesystem.squashfs
8. 複製原本系統使用的 /etc/apt/sources.list
# cp /etc/apt/sources.list /root/os.Trusty/etc/apt
9. chroot 到 os.Trusty 目錄之下,前置字元改成 /# 代表在 chroot 之下
# chroot ./os.Trusty
10. 掛載目錄
/# mount -t proc none /proc
/# mount -t sysfs none /sys
/# mount -t devpts none /dev/pts
11. 增加 DNS Server 設定
/# echo “nameserver 168.95.1.1” > /etc/resolv.conf
11. 修改套件庫來源及更新套件庫
/# cd /etc/apt
/# sed -ri ‘s/tw.archive.ubuntu.com/free.nchc.org.tw/g’ sources.list
/# sed -ri ‘s/archive.ubuntu.com/free.nchc.org.tw/g’ sources.list
/# sed -ri ‘s/security.ubuntu.com/free.nchc.org.tw/g’ sources.list
/# apt-get update
13. 處理中文環境
/# sed -i ‘$azh_TW.UTF-8 UTF-8’ /var/lib/locales/supported.d/zh-hant
/# locale-gen zh_TW.UTF-8
/# update-locale LANG=zh_TW.UTF-8
/# update-locale LANGUAGE=zh_TW.UTF-8
14. 安裝 Gnome 傳統介面
/# apt-get install gnome-session-fallback
15. 移除遊戲
/# apt-get remove –purge aisleriot gnome-mahjongg gnome-mines gnome-sudoku gnomine
16. 移除 amazon
/# apt-get remove –purge unity-webapps-common
17. 移除 simple-scan
/# apt-get remove –purge simple-scan
18. 移除 empathy
/# apt-get remove –purge empathy empathy-common nautilus-sendto-empathy
19. 移除 thunderbird
/# apt-get remove –purge thunderbird thunderbird-gnome-support thunderbird-locale-en thunderbird-locale-en-us
20. 移除 onboard / orca
/# apt-get remove –purge onboard onboard-data gnome-orca
21. 移除 brasero
/# apt-get remove –purge brasero brasero-cdrkit libbrasero-media3-1 rhythmbox-plugin-cdrecorder
22. 移除 ibus
/# apt-get remove –purge ibus
23. 安裝字形
/# apt-get install fonts-arphic-bkai00mp fonts-arphic-bsmi00lp fonts-wqy-microhei fonts-wqy-zenhei ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy fonts-droid
24. 安裝思源字型(參考網頁:Ubuntu 安裝思源字體)
/# mkdir -p /tmp/noto
/# cd /tmp/noto
/# wget http://www.google.com/get/noto/pkgs/Noto-hinted.zip
/# unzip Noto-hinted.zip
/# mkdir /usr/share/fonts/truetype/noto
/# mv *.otf /usr/share/fonts/truetype/noto
/# wget -O fonts.conf https://gist.githubusercontent.com/ingramchen/21533bbfc0d2dead94a7/raw/c750592f750cb446f6a6a19d75892c7d2fb5395f/gistfile1.xml
/# mkdir -p /etc/skel/.config/fontconfig
/# cp fonts.conf /etc/skel/.config/fontconfig/fonts.conf
25. 安裝中文語系
/# apt-get install language-pack-zh-hant language-pack-zh-hant-base language-pack-gnome-zh-hant language-pack-gnome-zh-hant-base language-selector-common language-selector-gnome
26. 安裝 gcin
/# apt-get install gcin gcin-chewing
27. 安裝 ubuntu-restricted-extras 套件
/# apt-get install ubuntu-restricted-extras
28. 安裝 vim / leafpad 編輯器
/# apt-get install vim leafpad
29. 安裝 shutter 擷圖軟體
/# apt-get install shutter
30. 安裝 Chromium 瀏覽器及 Flash Player
/# apt-get install chromium-browser chromium-browser-l10n
/# apt-add-repository ppa:skunk/pepper-flash
/# apt-get update
/# apt-get install pepflashplugin-installer
/# sed -i ‘$a. /usr/lib/pepflashplugin-installer/pepflashplayer.sh’ /etc/chromium-browser/default
or
/# apt-get install pepperflashplugin-nonfree
/# update-pepperflashplugin-nonfree –install
31. 安裝壓縮及解壓縮工具
/# apt-get install rar unrar p7zip p7zip-full p7zip-rar xarchiver unar unrar-free
32. 安裝 gnome-tweak-tool
/# apt-get install gnome-tweak-tool
33. 安裝 unity-tweak-tool 及 GLX-Dock
/# apt-get install unity-tweak-tool cairo-dock
34. 安裝 kolourpaint
/# apt-get install kolourpaint4 kde-l10n-zhtw
35. 安裝 add-apt-repository 指令
/# apt-get install software-properties-common python-software-properties
36. 安裝 LibreOffice 正體中文語系及圖庫
/# apt-get install libreoffice-help-zh-tw libreoffice-l10n-zh-tw openclipart-libreoffice openclipart-png
37. 安裝 smplayer 和 parole
/# apt-get install mplayer mplayer-fonts smplayer mplayer-skins mplayer-skin-blue parole
38. 安裝 variety 自動切換背景
/# add-apt-repository ppa:peterlevi/ppa
/# apt-get update
/# apt-get install variety
39. 安裝 CompizConfig Settings Manager
/# apt-get install compizconfig-settings-manager
40. 安裝晶片卡讀卡機所需程式
/# apt-get install pcscd
41. 把煩人的浮動式輸入法工具列的顯示時間從 10 秒改為 3 秒(參考網頁:[教學] Ubuntu 14.04的調校 [論壇 – Ubuntu基本設定] | Ubuntu 正體中文站)
/# cp /usr/share/glib-2.0/schemas/org.freedesktop.ibus.gschema.xml /usr/share/glib-2.0/schemas/org.freedesktop.ibus.gschema.xml.bak
/# sed -i ‘s/10000/3000/g’ /usr/share/glib-2.0/schemas/org.freedesktop.ibus.gschema.xml
/# glib-compile-schemas /usr/share/glib-2.0/schemas
42. 把 vorbis、flac、mp3 檔的預設播放程式改為 Totem(參考網頁:[教學] Ubuntu 14.04的調校 [論壇 – Ubuntu基本設定] | Ubuntu 正體中文站)
/# sed -i ‘s/ogg=rhythmbox/ogg=totem/g ; s/flac=rhythmbox/flac=totem/g ; s/mp3=rhythmbox/mp3=totem/g ; s/mpeg=rhythmbox/mpeg=totem/g ; s/vorbis=rhythmbox/vorbis=totem/g’ /etc/gnome/defaults.list
43. 取消 Ubuntu 登入時的訪客作業階段
/# echo allow-guest=false | tee -a /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
44. 不提示更新
/# sed -i ‘/Package-Lists/s/1/0/’ /etc/apt/apt.conf.d/10periodic
/# sed -i ‘s/Prompt=lts/Prompt=never/’ /etc/update-manager/release-upgrades
45. 關畢錯誤回報
/# sed -i ‘s/enabled=1/enabled=0/g’ /etc/default/apport
46. 善後工作
/# apt-get autoremove
/# apt-get autoclean
/# apt-get clean all
47 . 取消掛載目錄
/# umount -l /proc /sys /dev/pts
48. 退出 chroot
/# exit
49. 進行打包
# rm -rf iso.Trusty/casper/filesystem.squashfs
# mksquashfs os.Trusty iso.Trusty/casper/filesystem.squashfs
50. 切換目錄
# cd iso.Trusty
51. 產生 iso 光碟
# mkisofs -r -V “Ubuntu 14.04.2 LTS” -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul -boot-load-size 4 -boot-info-table -o ../ubuntu-14.04.2-desktop-i386_0418.iso .
備註:
加入 ezgo 套件庫來源
# wget -O – http://ezgo.goodhorse.idv.tw/apt/ezgo/ezgo.gpg.key | apt-key add –
# echo “deb http://ezgo.goodhorse.idv.tw/apt/ezgo/ ezgo12 main” >> /etc/apt/sources.list.d/ezgo.list
# apt-get update