Ubuntu桌面光盘定制
--------------------------------------------------------------------
1.将光盘内容全部解压到new目录;
[挂在到/mnt;cp -avrf /mnt/* new];
2.释放桌面系统,加载squashfs文件系统 :
sudo unsquashfs new/casper/filesystem.squashfs
释放了会有squashfs-root目录;安装系统是的文件系统的全部东东
3.如果你需要在虚拟根系统内使用网络连接 :
sudo cp /etc/resolv.conf squashfs-root/etc/
根据你的配置,你也许需要复制hosts文件
sudo cp /etc/hosts squashfs-root/etc/
4.切换根系统目录及挂在所需系统:
sudo chroot squashfs-root/
mount -t proc none /proc
mount -t sysfs none /sys
mount -t devpts none /dev/pts
为了避免区域问题以及导入GPS key
export HOME=/root
export LC_ALL=C
5.定制,预安装软件:
根据大小查看被安装的软件包:
dpkg-query -W --showformat='${Installed-Size} ${Package}\n' | sort -nr | less
移去软件包使用purge参数:apt-get remove --purge package name
设置GNOME的桌面,通常桌面文件位于/usr/share/backgrounds。复制你的PNG
文件到那里并编辑下面的文档:
1./usr/share/gnome-background-properties/ubuntu-wallpapers.xml
2. /etc/gconf/gconf.xml.defaults/%gconf-tree.xml
更改字符串 /usr/share/backgrounds/warty-final-ubuntu.png 指向你的文件
安装中文支持,和中文字体:
sudo apt-get install language-pack-gnome-zh language-pack-zh
ttf-arphic- uming ttf-wqy-zenhei
6.清理:
apt-get clean ;rm -rf /tmp/* ; rm /etc/resolv.conf
umount /proc ;umount /sys ;umount /dev/pts
7.整合光盘
chmod +w new/casper/filesystem.manifest
chroot squashfs-root/ dpkg-query -W --showformat='${Package}
${Version}\n' > new/casper/filesystem.manifest
cp new/casper/filesystem.manifest new/casper/filesystem.manifest-desktop
sed -ie '/ubiquity/d' new/casper/filesystem.manifest-desktop
8.重新压缩映像
sudo rm new/casper/filesystem.squashfs
sudo mksquashfs squashfs-root new/casper/filesystem.squashfs
9.编辑diskdefines,这里定义一些版本信息
define DISKNAME Ubuntu 10.04.3 LTS "Lucid Lynx" - Release amd64
define TYPE binary
define TYPEbinary 1
define ARCH amd64
define ARCHamd64 1
define DISKNUM 1
define DISKNUM1 1
define TOTALNUM 0
define TOTALNUM0 1
10。生成md5值
sudo -s
cd new/ && find . -type f -print0 |xargs -0 md5sum > md5sum.txt
11.重新制作ISO
cd new
sudo mkisofs -r -V "$IMAGE_NAME" -cache-inodes -J -l -b isolinux/isolinux.bin
-c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table
-o ../ubuntu-10.04-desktop-X86_64-custom.iso .
[复制的时候有个.disk文件 一定要确保复制过来,否则会有问题]
----------------------------------------------------------------------------------------
整理来自于:
http://wiki.ubuntu.org.cn/%E8%80%81%E6%97%A7%E6%96%87%E7%AB%A0/UbuntuHelp:LiveCDCustomization/zh
http://forum.ubuntu.org.cn/viewtopic.php?t=134333
转载于:https://blog.51cto.com/878045653/821326