Ubuntu LiveCD製作
ftp://ftp3.tnc.edu.tw/KNOPPIX/health/kgubuntu/
修改能使用ROOT:
先使用# sudo su,進入root身分
文字邊輯修改# gedit /etc/gdm/gdm.conf
找AllowRoot 把值改為true
修改root密碼:# passwd root
以root身份登入,你會發現會是英文環境,這是.profile檔在作怪(此檔案root下的隱藏檔)
請進入# gedit /root/.profile 中把 LANG=C 與 LANGUAGE=C註解起來(不執行),然後重新登出再登入即可
登入後會有彈出畫面,記得選擇執行[Update Names],才會將檔案夾換成中文。
最初的中文化重製工作:
# apt-get update
中文化所需的套件
# apt-get install language-pack-gnome-zh
# apt-get install language-support-zh
# apt-get install language-pack-zh
移除不必要的語言套件
# apt-get remove --purge language-pack-es language-pack-xh language-pack-pt
# apt-get remove --purge language-pack-gnome-es language-pack-gnome-pt language-pack-gnome-xh
# apt-get install fusion-icon compizconfig-settings-manager
建立重製的環境:
安裝並要的套件:
squashfs-tools 用來進行壓縮(製作映像檔)
mkisofs套件(製作ISO檔)
# apt-get install squashfs-tools mkisofs qemu
建立來源與目的目錄:cd 重製磁區
# cd /media/sda3 (製作印象檔的資料夾)
# mkdir kgubuntuSource; mkdir kgubuntuDest
# rsync --exclude=casper/filesystem.squashfs -a 光碟機位置 kgubuntuDest/
複製重製的來源環境的必要檔案:
# mkdir /root/squashfs
# mount -t squashfs -o loop 光碟機位置/casper/filesystem.squashfs /root/squashfs
# cp -a /root/squashfs/* kgubuntuSource/
chroot到你的製作的Source
cd 重製磁區
# cd /media/sda3
# cp -f /etc/resolv.conf kgubuntuSource/etc/->以便你的子系統可以上網
# cp -f /etc/apt/sources.list kgubuntuSource/etc/apt->變更為台灣地區的軟體來源
# chroot kgubuntuSource/->進入子系統,以下的動作均為子系統的命令,與主系統無關
# mount -t proc none /proc
# mount -t sysfs none /sys
# mount -t devpts none /dev/pts
# export HOME=/root
進入子系統的準備工作完成,接著就可以對它進行修改
# apt-get update
中文化所需的套件
# apt-get install language-pack-gnome-zh
# apt-get install language-support-zh
# apt-get install language-pack-zh
移除不必要的語言套件
# apt-get remove --purge language-pack-es language-pack-xh language-pack-pt
# apt-get remove --purge language-pack-gnome-es language-pack-gnome-pt language-pack-gnome-xh
安裝3D控制套件
# apt-get install fusion-icon compizconfig-settings-manager
移除一些遊戲
# apt-get remove --purge gnome-cards-data
讓系統支援Big5的環境
若不熟悉vim指令的文字編輯,這個時候,我們可以使用主系統的gedit,去編輯『重製磁區』/kgubuntuSource/var/lib/locales/supported.d/zh,並存檔,如下
zh_CN.UTF-8 UTF-8
zh_SG.UTF-8 UTF-8
zh_HK.UTF-8 UTF-8
zh_TW.UTF-8 UTF-8
zh_TW.Big5 Big5->加入這行
執行# locale-gen
清除軟體暫存
# apt-get clean
退出子系統:
# umount /proc
# umount /sys
# umount /dev/pts
# exit
重製我的第1片live光碟:
# rm -rf kgubuntuSource/tmp/*
# rm -f kgubuntuSource/var/crash/*
# rm -f kgubuntuSource/etc/resolv.conf
# chroot kgubuntuSource dpkg-query -W --showformat='${Package} ${Version}\n' > kgubuntuDest/casper/filesystem.manifest
# cp kgubuntuDest/casper/filesystem.manifest kgubuntuDest/casper/filesystem.manifest-desktop
# rm kgubuntuDest/casper/filesystem.squashfs
# mksquashfs kgubuntuSource kgubuntuDest/casper/filesystem.squashfs
上一篇:Ubuntu 指令
下一篇:Ubuntu LiveCD製作2