|
|
发表于 2008-8-5 22:28:31
|
显示全部楼层
刚刚翻译了一下第四章的1-3节。4-6就等明天有空才弄。
=========== 正文=========
Installation of the larch build system
Larch build系统的安装
The larch package may be installed in the normal Arch Linux way using pacman. This method will only work on an Arch system, of course.
Larch包可以使用Arch Linux的pacman工具来安装,当然,这种方法只能使用在Arch系统上面。
Alternatively, larch may be used without installing it. This should also work on non-Arch Linux systems. Download larch-setup to an empty working directory and run it (it is a shell script). This will in turn download and unpack the current larch package, setting up symlinks so that the build scripts can be run from this working directory. If you don't put this new directory on your 'PATH', you may well need to add a path prefix when running it (e.g. './mklarch' if your current directory is the one containing the script).
折衷地,larch可以被直接使用而不需要安装,折衷方法可以在非Arch Linux上面使用。下载larch-setup到一个空目录并且运行它(这是一个shell脚本)。接着它会下载解压最新版的larch包,设置软链接(symlink)使得build脚本可以从当前工作目录运行。如果你不把这个新目录加入到你的环境变量PATH,你需要加一个前缀来运行它(比如你需要运行‘./mklarch’来运行当前目录下面的脚本)。
Using the larch build system
使用larch的build系统
For building a live medium from a 'profile' you need, primarily, mklarch; for building from an existing installation (including rebuilding after using mklarch) larchify. mklarch uses inpacs to do the actual installation of the packages, and the functions for performing the live CD creation are in the file (larch/)buildlive.
为了从一个配置文件(’profile’)建立一个live媒体,首先你需要mklarch一下,以从larch的方式从当前系统建立一个新的系统(包括重建立mklarch以后的系统)。Mklarch使用inpacs去进行实际的安装工作,并且live CD创建所需要的功能都在(larch/)buildlive目录下面的文件里面。
Unlike a normal installation, that used by larch need not be a separate partition, it can be placed anywhere convenient. The default installation directory ('/home/larchroot', variable 'INSTLDIR' in the scripts) should normally be acceptable (the building work is done in the '.larch' sub-directory). Note that lots of space is necessary in ${INSTLDIR}, nearly 4GB for a 700MB CD.
和一般的安装不一样,larch的安装并不需要一个独立的磁盘分区,它可以在任何方便的地方进行。默认的安装目录(’/home/larchroot’,就是脚本里面的’INSTLDIR’变量)应该是比较合理的(建立系统的工作实在’.larch’子目录下面完成的)。需要注意的是安装目录${INSTLDIR}需要比较多的空间—制作700MB的CD需要将近4GB的空间。
Quick mklarch overview
Mklarch快速概览
That first stage is very much like a normal Arch installation to a partition - which is another possibility with the inpacs script. A couple of small tweaks are made to this base installation to make it more convenient for live CD/USB use: some glibc locales are generated (set by the file locale.gen in the profile) and, if openssh is installed, the initial ssh-keys are generated.
第一个阶段和一般的Arch安装到一个分区上面非常相像—这也是inpacs的另外一个潜力。我们对这个基本的安装过程做了一些小优化来使得它更加适合live CD和USB设备:一些glibc locale被预先生成(在配置的locale.gen里面设置),另外,如果已经安装了openssh的话,初始ssh密钥会被预先生成。
Before mklarch can be used a 'profile' for the live medium must be built. This is a folder containing configuration files determining which packages are installed, which glibc locales are installed, and generally which files should be customized. Further details are given in 'Profiles'.
在mklarch可用之前必须先使用一个’配置’。它是一个包含配置文件的文件夹,这些文件用于决定安装哪些包,安装那些glibc locale,和哪些文件应该被自定义等等。更多的内容请参考’配置文件’。
A simple way to build an iso would then be:
一个制作iso的简单例子:
./mklarch -p myprofile
./mklarch –p 配置
To build a live USB-stick using GRUB to boot and using the pacman databases as they exist on the build host (rather than the default of downloading the latest databases using 'pacman -Sy'):
建立一个从GRUB启动,并且使用当前系统的pacman数据库的U盘系统(而不是默认的使用‘pacman -Sy’获取最新数据):
./mklarch -p myprofile -y /var/lib/pacman –ug
./mklarch –p 配置 –y /var/lib/pacman -ug
The build process can be stopped after the Arch system installation (before building the 'squashed' live system) by passing the '-a' option to mklarch. All the available options can be seen by running 'mklarch -h'.
可以通过给mklarch命令传递’-a’参数使得在Arch系统安装以后(在建立压缩好的live系统之前)停止建立(build)过程。所有的可用参数可以通过运行’mklarch -h’来查看。
The rest of the build process is handled by the functions in buildlive, primarily mklive, which puts all the various components together into a CD image at '${INSTLDIR}/.larch/cd', then using the build_iso function to create the iso or (using the usbboot script) to prepare a bootable USB-stick.
剩下的建立(build)过程会在buildlive(主要是mklive)中进行,它会把各种组件放到’${INSTLDIR}/.larch/cd’里面去,最后会使用build iso功能创建iso或者(通过usbboot脚本)创建一个启动U盘。
If you set up your configuration wrong (or if you or I made some other mistake ...), you might find you have destroyed some important data and/or your system doesn't work any more. But that's life - Share and Enjoy!
如果你设置做了某些配置(或者犯了其他错……),你有可能会损坏你的系统或者数据。但这就是生活—分享和收获!
============ 正文结束 =============== |
|