终于成功了,以下是安装过程中总结的经验:
环境:
◎ 使用VMWare gsx 3.2.1
◎ VM配置如下:
Memory 264 MB
Hard Disk 1 (SCSI 0:0) LSI Logic 4G for RHEL
Hard Disk 1 (SCSI 0:1) LSI Logic 512M for swap
Hard Disk 1 (SCSI 0:2) LSI Logic 2G for LFS
Hard Disk 1 (SCSI 0:3) LSI Logic 4G for LFS Source
CD-ROM 1 (IDE 1:0) Using image [LFS_cdrom.img]
NIC 1 Host-only
◎ 宿主:RHEL4U2,最小安装,通过rpm命令手工安装以下包:gcc, flex, Bison, autoconf, texinfo manually install
◎ LFS Version 6.1
如果打算全部解码再编译,请准备足够大的空间放源码。第5章结束前,源码和产生的编译文件已经占用了1.4G
第5章结束前,strip前,tools目录使用186M,strip后142M,删除info和man后123M
第6章结束前,strip前,/mnt/lfs(不含tools)使用328M,strip后266M,--strip-all后263M
第6章的测试有些出错,到网上搜也没找到答案,后来索性不check了
● Binutils
◎ ar.o(.text+0x23): In function `mri_emul':
: undefined reference to `yyparse'
安装Flex和Bison(RHEL4U2 CD3)
● Linux-Libc-Headers
◎ 不是拷贝宿主系统中/usr/include,而是解压开Linux-Libc-Headers包,拷贝这个包中的内容
● glibc
◎ configure: WARNING:
*** These auxiliary programs are missing or incompatible versions: autoconf
*** some features will be disabled.
*** Check the INSTALL file for required versions.
安装autoconf(RHEL4U2 CD3)
◎ configure: WARNING:
*** These auxiliary programs are missing or incompatible versions: makeinfo
*** some features will be disabled.
*** Check the INSTALL file for required versions.
安装texinfo(RHEL4U2 CD3)
● tcl
◎ cd .., export TCLPATH=`pwd`
运行前处于/mnt/lfs/sources/tcl8.4.9/unix/目录
◎ ln -s tclsh8.4 /tools/bin/tclsh
运行前处于/tools/bin/目录
● bash
◎ ln -s bash /tools/bin/sh
运行前处于/mnt/lfs/tools/bin目录
● 第6章 Gettext出错
◎ 找不到/mnt/...库
使用了上一次编译后的源代码。先执行make clear或者删除并重新解压源码(原以为不打补丁的情况下重新configure后再编译应该没问题的,后来我在重复编译时全部重新解压源码了)
● Linux-2.6.11.12
◎ make menuconfig的默认值
make menuconfig时,会先后读取/boot/config.[version]和[KernelSource]/.config文件内容
设置优先权为:[KernelSource]/.config > /boot/config.[version] > [default]
希望使用默认值,请删除/boot/config.[version]和[KernelSource]/.config文件
◎ 关于VMWare
使用VMWare LSILogic SCSI时,请加入Device Drivers ---> Fusion MPT device support ---> <*> Fusion MPT (base + ScsiHost) drivers
使用VMWare 网卡时,请加入Device Drivers ---> Networking support --->[*] Networking support ->[*] Network device support -> Ethernet (10 or 100Mbit) --->[*] Ethernet (10 or 100Mbit) ->[*] EISA, VLB, PCI and on board controllers[*] -> <*> AMD PCnet32 PCI support
据说声卡是es1371,我没有调查
● 使你的 LFS 系统可以启动
因为宿主RHEL装在第一块SCSI盘上,我原先想把grub安装到lfs的硬盘上(第三块SCSI),更改VMWare的bios从这块硬盘启动,可惜不成功。只好在RHEL的grub中加上LFS的启动配置,成功了。
不过我想删除宿主盘后应该没问题的,现在还没这样做过(做的话记得更改grub配置,因为这时LFS已经是第一块盘了)

