|
|

楼主 |
发表于 2006-1-25 16:31:55
|
显示全部楼层
4. 对nALFS-profile-LFS-6.1目录下的配置文件进行定制
为了节约时间,只进行了最基本的定制
1). 为了以后能查阅原始的配置文件,可以先把整个目录备份一下;
2). runit.sh
在这个文件中最后一行会调用/usr/local/bin/nALFS,但在LIVECD中nALFS不在这个位置,但在PATH路径中,所以只需要去掉nALFS前的路径就可以了;
3). config目录
general.ent:
<!-- Timezone file
This entity will be used as the target of the link
/etc/localtime
-->
<!ENTITY localtime "/usr/share/zoneinfo/Asia/Chongqing">
<!-- Password of the temporary user name &lfs;
You should change this value and keep the present file
secure this value has been changed or, better,
create yourself the user in the host distribution,
and give it a password.
If the user exists already, its password will not be changed.
-->
<!ENTITY lfs-password "******">
<!-- Root password.
This is the password of root in the new LFS distribution.
Of course, you should change it as soon as you log into
your new LFS.
-->
<!ENTITY password "******">
<!-- parallel build level (make flag -j). Default is unset. For faster build
times, you might try setting this flag to 2-3 times the number of
processors in your machine. So, for example, a single processor machine,
you might set this entity to "-j3"
-->
<!ENTITY jlevel ""> !!!!!!注意此处:按上面的说明设置为"-j3"导致编译不能通过,而简单地将其空白反而能正常编译
<!-- grub settings (these need to be in grub's notation) -->
<!ENTITY grub-root "hd0,1">
<!ENTITY grub-install-location "hd0"> !!!!!!注意此处:这里所给的是我引导区的位置,由于设置不当曾经导致不能引导编译后的系统
4). skeleton目录
在README文件中,nALFS建议将目录名改为按你给系统所取名称来作目录名,这里设为 myLinux;
① 将linux内核源码解开到适当位置,然后进入源码目录:make menuconfig对内核进行配置,并将最后的配置文件保存到 myLinux 目录下的linux-kernel-config 文件;
② 定制 myLinux/boot/grub目录下的 menu.lst文件,我的修改如下:
# Default Entry for LFS
title LFS ([LFS-version] kernel [linux-version])
root ([grub-root])
kernel /boot/lfskernel-[linux-version] root=/dev/sda2 !!!!!!注意此处:这是编译后系统的分区位置
③ 定制 myLinux/boot/etc目录下的 fstab 文件,我的修改如下:
/dev/sda2 / ext3 defaults 1 1
/dev/sda1 swap swap pri=1 0 0
④ 定制 myLinux/boot/etc目录下的 profile 文件,我的修改如下:
export LANG=zh_CN.UTF-8
⑤ 定制 myLinux/boot/etc/sysconfig 目录下的 clock 文件,我的修改如下:
UTC=0
5). chapter05 和 chapter06 目录下的 glibc.xml,增加 locale:
<execute command="localedef -i zh_CN -f UTF-8 zh_CN.UTF-8" />
<execute command="localedef -i zh_CN -f GB2312 zh_CN.GB2312" />
<execute command="localedef -i zh_CN -f GB18030 zh_CN.GB18030" />
<execute command="localedef -i zh_TW -f BIG5 zh_TW" />
<execute command="localedef -i zh_HK -f UTF-8 zh_HK" /> |
|