|
视频放在我的博客上http://blog.sina.com.cn/s/blog_535be3bb0100ac7v.html
----------------------------------------------
#版本lfs6.3-r2160:http://ftp.lfs-matrix.net/pub/lf ... d-x86-6.3-r2160.iso 环境:VM6.0
cfdisk
#分区
mkswap /dev/sda1
mke2fs /dev/sda2
#下载lfs_6.3.zip
unzip *.zip
mkdir /share
cp *.sh /share
chmod 777 /share/*.sh
/share/01.sh
su - lfs
/share/02.sh
source ~/.bash_profile
cd $LFS/sources
/share/03.sh
strip --strip-debug /tools/lib/*
strip --strip-unneeded /tools/{,s}bin/*
rm -rf /tools/{info,man}
exit
chown -R root:root $LFS/tools
/share/04.sh
export LFS=/mnt/lfs
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
#这里会提示I have no name
#另外开一个终端复制脚本到/mnt/lfs下
sh /05.sh
exec /tools/bin/bash --login +h
sh /06.sh
cd /sources
export LFS=/sources
sh /07.sh
exec /bin/bash --login +h
sh /08.sh
logout
export LFS=/mnt/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
cd /sources
export LFS=/sources
sh /09.sh
cd /sources
tar xvf $LFS/linux-2.6.22.5.tar.bz2
cd linux-2.6.22.5
make mrproper
make menuconfig
#这里:在Device Drivers->SCSI device support->SCSI low-level drivers下加B#usLogic SCSI support的支持
# 在Device Drivers->Networking support->Ethernet (10 or 100Mbit)加[M]AM#D PCnet32 PCI support的支持
# 在Device Drivers->Sound->Advanced Linux Sound Architecture->CI devic#es加入[M](Creative) Ensoniq AudioPCI 1371/1373的支持
make
make modules_install
cp -v arch/i386/boot/bzImage /boot/lfskernel-2.6.22.5
cp -v System.map /boot/System.map-2.6.22.5
cp -v .config /boot/config-2.6.22.5
install -d /usr/share/doc/linux-2.6.22.5
cp -r Documentation/* /usr/share/doc/linux-2.6.22.5
grub
root (hd0,1)
setup (hd0)
quit
cat > /boot/grub/menu.lst << "EOF"
# Begin /boot/grub/menu.lst
# By default boot the first menu entry.
default 0
# Allow 30 seconds before booting the default.
timeout 30
# Use prettier colors.
color green/black light-green/black
# The first entry is for LFS.
title LFS 6.3
root (hd0,1)
kernel /boot/lfskernel-2.6.22.5 root=/dev/sda2 vga=788
EOF
mkdir -v /etc/grub
ln -sv /boot/grub/menu.lst /etc/grub
logout
#大功告成
#警告:01-09脚本只能在linux下修改,最好不要到win下修改;因为win的编辑器会自动添加符号使得脚本无法使用,09.sh必须根据自己的分区,网络环境等实际情况修
#改,我的是虚拟机,可作参考。
----------------------------------------------
以上所需脚本已经打好包放在下面了,如有问题请联系我:wzl7222504@gmail.com |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|