LFS 7.2
虛擬機
40G 硬盤
?
引導
最開始使用 LFS LiveCD,在解壓?tar.xz 文件時出現問題,安裝了 xz 也不行,缺少鏈接庫。于是更換成?Fedora 17 x64?LiveCD 引導。安裝 openssh,但提示出錯。yum update 也出錯。
yum?clean all
rm -f /var/lib/rpm/__db
yum info kernel
yum install opensh
需要開端口哦,不然SSH連不上的。盡管好像沒有防火墻,但就是連不上。
iptables -I INPUT -p tcp --dport 22 -j ACCEPT
gcc perl 這些都要安裝一下
?
分區并格式化
root [ ~ ]# cfdisk
Disk has been changed.
WARNING: If you have created or modified any
DOS 6.x partitions, please see the cfdisk manual
page for additional information.
root [ ~ ]# mke2fs -jv /dev/sda1
mke2fs 1.40.2 (12-Jul-2007)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
4921952 inodes, 9837796 blocks
491889 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
301 block groups
32768 blocks per group, 32768 fragments per group
16352 inodes per group
Superblock backups stored on blocks:
??????? 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
??????? 4096000, 7962624
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 35 mounts or
180 days, whichever comes first.? Use tune2fs -c or -i to override.
root [ ~ ]# mkswap /dev/sda2
Setting up swapspace version 1, size = 2648535 kB
no label, UUID=ede04e32-a951-436c-9f46-c01fd248906f
?
設置變量
root [ ~ ]# export LFS=/mnt/lfs
root [ ~ ]# mkdir -pv $LFS
mkdir: created directory `/mnt/lfs'
root [ ~ ]# mount -v -t ext3 /dev/sda1 $LFS
/dev/sda1 on /mnt/lfs type ext3 (rw)
root [ ~ ]# /sbin/swapon -v /dev/sda2
swapon on /dev/sda2
下載軟件包
root [ ~ ]# mkdir -v $LFS/sources
mkdir: created directory `/mnt/lfs/sources'
root [ ~ ]# chmod -v a+wt $LFS/sources
mode of `/mnt/lfs/sources' changed to 1777 (rwxrwxrwt)
root [ ~ ]# wget http://www.linuxfromscratch.org/lfs/view/stable/wget-list
--16:55:28--? http://www.linuxfromscratch.org/lfs/view/stable/wget-list
?????????? => `wget-list'
Resolving http://www.linuxfromscratch.org/... 216.171.237.234
Connecting to http://www.linuxfromscratch.org%7c216.171.237.234%7c/... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4,788 (4.7K) [text/plain]
100%[====================================>] 4,788???????? 11.40K/s
16:55:30 (11.38 KB/s) - `wget-list' saved [4788/4788]
root [ ~ ]# wget -i wget-list -P $LFS/sources
?
Binutils 2.22
注意這句
case $(uname -m) in
? x86_64) mkdir -v /tools/lib && ln -sv lib /tools/lib64 ;;
esac
這里要注意 ln -sv 這個用法
?
?
轉載于:https://www.cnblogs.com/zhangyingda/archive/2012/11/30/2795630.html
總結
- 上一篇: 算法学习:强连通分量 --tarjan
- 下一篇: 网络流24题