Chinaunix首页 | 论坛 | 博客
  • 博客访问: 342601
  • 博文数量: 72
  • 博客积分: 2130
  • 博客等级: 大尉
  • 技术积分: 857
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-05 16:10
文章分类

全部博文(72)

文章存档

2010年(5)

2009年(14)

2008年(53)

分类: LINUX

2008-09-28 12:05:17

1. 下载lfslivecd-x86-6.3-r2160.iso到~/soft/目录下
2. 执行脚本00lfs_prepare_env.sh
    sudo ./00lfs_prepare_env.sh
3. 执行脚本01lfs_prepare_sources.sh
    sudo ./01lfs_prepare_sources.sh
4. 复制脚本到/home/lfs目下
    sudo cp 02lfs_loginlfs_config.sh 03lfs_toolchain_build.sh /home/lfs
5. su - lfs
6. 执行脚本02lfs_loginlfs_config.sh
   ./02lfs_loginlfs_config.sh
7. source /home/lfs/.bash_profile
8. 执行脚本03lfs_toolchain_build.sh
   ./03lfs_toolchain_build.sh
9. 退出lfs用户
    exit
10. 执行脚本04lfs_target_prepare.sh
    sudo ./04lfs_target_prepare.sh
11.export LFS=/media/lfs
   sudo chroot "$LFS" /tools/bin/env -i HOME=/root TERM="$TERM"     PS1='\u:\w\$ ' PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin /tools/bin/bash --login +h
12. 执行脚本05lfs_target_build1.sh
    ./05lfs_target_build1.sh
13. exec /tools/bin/bash --login +h
14. 执行脚本05lfs_target_build2.sh (about 6 hours)
    ./05lfs_target_build2.sh
15. exec /bin/bash --login +h
16. 执行脚本05lfs_target_build3.sh
    ./05lfs_target_build3.sh
17. logout
    export LFS=/media/lfs
    chroot $LFS /tools/bin/env -i HOME=/root TERM=$TERM PS1='\u:\w\$ '   PATH=/bin:/usr/bin:/sbin:/usr/sbin /tools/bin/bash --login
    /tools/bin/find /{,usr/}{bin,lib,sbin} -type f -exec /tools/bin/strip --strip-debug '{}' ';'
    logout
    chroot "$LFS" /usr/bin/env -i HOME=/root TERM="$TERM" PS1='\u:\w\$ ' PATH=/bin:/usr/bin:/sbin:/usr/sbin /bin/bash --login
18. 执行脚本05lfs_target_build4.sh
    ./05lfs_target_build4.sh
19. grub
    root (hd0,3)
    setup (hd0)
    quit
20. cat > /boot/grub/menu.lst << "EOF
    default 0
    timeout 30
    color green/black light-green/black
    title LFS 6.3
    root (hd0,3)
    kernel /boot/lfskernel-2.6.22.5 root=/dev/hda4
    EOF
21. mkdir -v /etc/grub
    ln -sv /boot/grub/menu.lst /etc/grub
    logout
NOTE:
1. you must make sure where your lfs install
    my lfs swap is installed in /dev/sda3
    my lfs / is installed in /dev/sda4
    so you perhaps need change 4th and 5th row in 00lfs_prepare_env.sh
2. you should make a dir named soft in ~/ and put lfslivecd-x86-6.3-r2160.iso in
    it or you should change 6th row in 01lfs_prepare_sources.sh
3. you should change usr and group of tools and sources in      04lfs_target_prepare.sh
   mine is sam
4. you should change /etc/fstab file in 05lfs_target_build4.sh
   mine is  echo '/dev/hda4 / ext3 defaults 1 1 ' >> /etc/fstab
            echo '/dev/hda3 swap swap pri=1 0 0 ' >> /etc/fstab
文件:LFSscripts.tar.gz
大小:9KB
下载:下载


     
阅读(1783) | 评论(0) | 转发(0) |
0

上一篇:构建APT服务器

下一篇:单链表的排序

给主人留下些什么吧!~~