手斧Linux – 从LFS到Funtoo (115)

/var/tmp/portage/sys-kernel/debian-sources-3.2.29/temp/config,然后cd /var/tmp/portage/sys-kernel/debian-sources-3.2.29/work/linux-3.2.29,用make menuconfig 来load ../../temp/config ,就可在菜单中查看最后参加内核编译的配置。

为什么要将lib改成lib64呢?因为在我们构建的文件系统里,lib是个指向lib64的符号链接,如果不将编译结果的lib改名,随后的cp -r 操作会失败。

step4:设置时区。命令如下:

ln -sf /usr/share/zoneinfo/Asia/Shanghai  /etc/localtime

step5:设主机名和域名。命令如下:

cd /etc

echo "127.0.0.1 mywolf localhost" > hosts

sed -i -e 's/hostname=.*/hostname="mywolf"/' conf.d/hostname

step6:配置fstab。

这个要在最后装到目标系统里时,再做对应的调整。命令如下:

cat >/etc/fstab <<EOF

## /etc/fstab: static file system information.

##

## The root filesystem should have a pass number of either 0 or 1.

## All other filesystems should have a pass number of 0 or greater than 1.

##

## NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.

##

## See the manpage fstab(5) for more information.

##

## <fs> <mountpoint>   <type>   <opts> <dump/pass>

#

#/dev/sda1   /boot   ext2 noauto,noatime 1 2

#/dev/sda2   none   swap sw 0 0

#/dev/sda3   /   xfs noatime 0 1

##/dev/cdrom  /mnt/cdrom  auto noauto,ro 0 0

EOF

step7:配置网络。命令如下:

cd /etc/init.d

ln -s netif.lo netif.eth0    #将eth0当成本地回环

cd ../conf.d

echo 'config_eth0="192.168.1.10 netmask 255.255.255.0 brd 192.168.1.255"' >> net

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值