个人工具

“老旧文章/UbuntuHelp:LiveCDCustomization/zh”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
(新页面: == 定制 LiveCD == 原文出处: 原文作者: 授权许可: * [http://creativecommons.org/licenses/by-sa/2.0/ 创作共用协议Attribution-ShareAlike 2.0] * [http://www.gnu.o...)
 
第1行: 第1行:
 
 
== 定制 LiveCD ==
 
== 定制 LiveCD ==
  
第22行: 第21行:
  
  
=== How To Customize the Ubuntu Dapper Desktop CD(如何定制Ubuntu Dapper桌面系统CD) ===
+
=== 如何定制Ubuntu图形安装光盘 ===
 
+
This howto is mainly based on the [[LiveCDCustomization]], but some parts
+
of the building process are specific for DapperDrake, so I decided to help those
+
people who want to build a Desktop CD based on an official ISO.
+
  
这篇指南主要基于 [[LiveCDCustomization]],但是它的构建过程的一些部分是专门针对于 DapperDrake 的,考虑到有些人想构建一个基于官方ISO的桌面系统CD,所以我写了这篇指南。
+
你或许基于以下原因定制UBUNTU桌面(LIVE)版:
  
Why? Well, because some people want to create specialized Desktop CDs to show off a particular application or localized to a certain language. If you can think of
+
* 预装特定的程序
anything else that can be done, put it on the wiki.
+
* 本地化语言支持
 +
* 移出软件安装包
 +
* 添加软件安装包
 +
* 更新软件安装包
 +
* 改变系统默认设置 (主题、图标、桌面、面板、浏览器主页等等)<br>
  
为什么要定制CD?因为有些人想要创建特定的桌面系统CDs,比如增加一些特定的应用或者做出特定的语言版本。如果您觉得还有其它可以做的事情,请把您的想法写到 wiki 上。
+
本向导针对桌面版/LIVE CD,[https://help.ubuntu.com/community/InstallCDCustomization 定制文字安装光盘和服务器安装光盘]请参考其他页面。
  
 
=== System Requirements(系统需求) ===
 
=== System Requirements(系统需求) ===

2008年2月26日 (二) 16:54的版本

定制 LiveCD

原文出处:

原文作者:

授权许可:

翻译人员:oylb

校正人员:

贡献人员:

适用版本: 文章状态:等待校正



如何定制Ubuntu图形安装光盘

你或许基于以下原因定制UBUNTU桌面(LIVE)版:

  • 预装特定的程序
  • 本地化语言支持
  • 移出软件安装包
  • 添加软件安装包
  • 更新软件安装包
  • 改变系统默认设置 (主题、图标、桌面、面板、浏览器主页等等)

本向导针对桌面版/LIVE CD,定制文字安装光盘和服务器安装光盘请参考其他页面。

System Requirements(系统需求)

  • About 3-5 gigabytes of free space
  • 大约3-5 GB的空闲磁盘空间
  • I built the CDs pretty quickly with 512 MB RAM and 1 GB swap
  • 我在 512MB 内存和 1GB 的交换分区的环境下可以很快速的创建 CDs
  • `squashfs-utils`
  • `mkisofs`
  • An Ubuntu kernel with squashfs support (the stock kernel in DapperDrake has it)
  • 支持 squashfs 的Ubuntu内核( DapperDrake 自带的内核中包含此项支持)
  • Qemu for testing
  • 用于测试的 Qemu

The Process(过程)

First make sure that you have installed the needed tools:

首先,请确认您安装了必要的工具:

$ sudo apt-get install squashfs-tools mkisofs qemu

Load the squashfs module

加载 squashfs 模块

$ sudo modprobe squashfs

You need to download an official Desktop CD http://releases.ubuntu.com/dapper/

你需要从 http://releases.ubuntu.com/dapper/ 下载一张官方的桌面系统CD

Move or copy it into an empty directory:

把它移动或者复制到一个空的目录:

$ mkdir ~/live
$ mv ubuntu-6.06-desktop-i386.iso ~/live
$ cd ~/live

Extracting the CD contents(释放出CD的内容)

Mount the Desktop .iso

挂载桌面系统 .iso

$ mkdir mnt
$ sudo mount -o loop ubuntu-6.06-desktop-i386.iso mnt

Extract .iso contents into dir 'extract-cd'

把 .iso 的内容释放到 'extract-cd' 目录

$ mkdir extract-cd
$ rsync --exclude=/casper/filesystem.squashfs -a mnt/ extract-cd

Extracting the Desktop system(释放桌面系统)

Mount the squashfs filesystem

加载 squashfs 文件系统

$ mkdir squashfs
$ sudo mount -t squashfs -o loop mnt/casper/filesystem.squashfs squashfs

Extract squashfs contents into dir 'edit'

把 squashfs 内容释放到 'edit' 目录

$ mkdir edit
$ sudo cp -a squashfs/* edit/

Prepare and chroot(准备以及改变根目录)

$ sudo chroot edit
$ sudo mount -t proc proc proc
$ sudo mount -t sysfs sys sys

Customizations(定制)

Do anything you want

做您想做的事情

Cleanup(清理)

Umount special filesystems and exit chroot

卸载特殊的文件系统,然后退出chroot

$ sudo umount proc
$ sudo umount sys
$ sudo rm -rf /tmp/*
$ exit

Putting the CD together(把CD合在一起)

Regenarate manifest

重建manifest

chmod +w extract-cd/casper/filesystem.manifest
sudo chroot edit dpkg-query -W --showformat='${Package} ${Version}\n' > extract-cd/casper/filesystem.manifest

Compress filesystem

压缩文件系统

$ sudo rm extract-cd/casper/filesystem.squashfs
$ sudo mksquashfs edit extract-cd/casper/filesystem.squashfs

Set an image name in extract-cd/README.diskdefines

在extract-cd/README.diskdefines中设置一个镜像名

$ sudo vim extract-cd/README.diskdefines

Calculate md5 sums

计算md5 sum

$ (cd extract-cd && find . -type f -print0 | xargs -0 md5sum > md5sum.txt)

Create Iso

制作 ISO 文件

$ cd extract-cd
$ 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 ../cdname.iso .

Testing the CD(测试CD)

Test using qemu emulator

用qemu模拟器来测试

$ qemu -cdrom cdname.iso -boot d

Comments(评论)

If you have any comments or questions, please feel free to add them here.

如果您有任何意见或者疑问,您可以放心地把它写到这里。

I have created an small Customization Example (named Firebird Live CD) by adding an firebird-super-server and flamerobin packages

我制作了一个小的定制光盘样例(名为"火鸟" Live CD),我在其中加入了firebird-super-server 和 flamerobin 包。 http://flamerobin.blogspot.com/2006/05/creating-flamerobinfirebird-live-cd.html


1st off great write-up and very timely, THX. 2nd here are my comments

首先,写得很好,很及时,谢谢。另外,这是我的评论:

  • In Customizations One has to update /etc/resolv.conf in the chroot for network access
  • 在“定制”步骤,为了访问网络,您需要更新在chroot中的 /etc/resolv.conf 。
  • In Calculate MD5sums the text needs to be updated. There are read permission errors on the the filesystem.squashfs and md5sums.txt in the extract-cd cannot be written. I worked around this by cd'ing into extract-cd and temporarily changing the permission on casper/filesystem.squashfs to allow reading. Also, the md5sums file was created in .. and then copied over with sudo.
  • 在“计算 MD5 Sum”步骤,需要有些修改。由于在 extract-cd 中的 filesystem.squashfs 和 md5sums.txt 不能被写入,这会导致权限错误。我通过cd 进入 extract-cd ,然后临时改变 casper/filesystem.squashfs 的权限,让它可读,这样就解决了这个问题。md5sums文件被建立在..中,然后用sudo命令复制过来。
  • In Create ISO a sudo is needed.
  • 在“制作 ISO 文件”步骤,需要 sudo 命令。

I have created tool for automatic remastering of live CD images. See http://lichota.net/~krzysiek/projects/ubuntu-livecd-customization/ .

我制作了一个自动重新灌录 Live CD 镜像的工具。参见 http://lichota.net/~krzysiek/projects/ubuntu-livecd-customization/

Features:

特性:

    • GUI for simple creation of localized CDs (including changing gfxboot and installing language packs)
    • 有简单制作本地化 CDs 的 GUI(包括改变 gfxboot 和 安装语言包)
    • Script for customization of ISO, SquashFS and initrd on live CD.
    • Live CD 中包含定制 ISO,SquasFS 和 initrd 的脚本

I think we also need a small documentation about customizing gfxboot, at least something about changing the default language.

我想我们需要一篇关于如果定制 gfxboot 的文档,至少要涉及如何改变默认的语言。


http://www.atworkonline.it/~bibe/ubuntu/custom-livecd.htm seems to have some nice info. no license that I can see so we would need to ask permission from the author to us its material.

http://www.atworkonline.it/~bibe/ubuntu/custom-livecd.htm 上有很好的信息。我没有看到有关的许可信息,所以我们用到它的资源时需要得到作者的许可。