你好,游客 登录 注册 搜索
背景:
阅读新闻

Gentoo Linux最小安装

[日期:2011-12-04] 来源:Linux社区  作者:yming0221 [字体:大 中 小]

3.8 然后编译内核和驱动,并安装驱动

  1. make && make modules_install  

3.9 安装内核

  1. cp arch/x86/boot/bzImage /boot/kernel-3.0.6-gentoo  

注意修改内核的名字对应自己的内核版本

四、配置系统

4.1 修改/etc/fstab

  1. # /etc/fstab: static file system information.   
  2. #   
  3. # noatime turns off atimes for increased performance (atimes normally aren't    
  4. # needed); notail increases performance of ReiserFS (at the expense of storage    
  5. # efficiency).  It's safe to drop the noatime options if you want and to    
  6. # switch between notail / tail freely.   
  7. #   
  8. # The root filesystem should have a pass number of either 0 or 1.   
  9. # All other filesystems should have a pass number of 0 or greater than 1.   
  10. #   
  11. # See the manpage fstab(5) for more information.   
  12. #   
  13.   
  14. # <fs>            <mountpoint>  <type>        <opts>        <dump/pass>   
  15.   
  16. # NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.   
  17. /dev/sda2       /boot       ext3        defaults,noatime    1 2  
  18. /dev/sda3       /       ext3        noatime     1 1  
  19. /dev/sda5       none        swap        sw      0 0  
  20. /dev/sda6       /home       ext3        defaults,noatime    1 2  
  21. /dev/cdrom      /mnt/cdrom  auto        noauto,ro   0 0  

4.2 配置网络

  1. # nano -w /etc/conf.d/hostname  
  2.   
  3. (将HOSTNAME的变量值设定为主机名)  
  4. HOSTNAME="yan-laptop"  
 
  1. # nano -w /etc/conf.d/net  
  2.   
  3. (设定dns_domain的变量值为你的域名)  
  4. dns_domain_lo="homenetwork"  
  5.   
  6. config_eth0=( "192.168.0.2 netmask 255.255.255.0 brd 192.168.0.255" )  
  7. routes_eth0=( "default via 192.168.0.1" )  
  8. config_eth0=( "dhcp" ) 
 
  1. # cd /etc/init.d  
  2. # ln -s net.lo net.eth0  
  3. # rc-update add net.eth0 default  
 
  1. # nano -w /etc/hosts  
  2. 127.0.0.1 localhost  yan-laptop   
最后安装一个DHCP客户端,让机器自动配置网络
  1. emerge dhcpcd

五、安装GRUB引导

  1. emerge grub

5.1 修改/boot/grub/grub.cfg

  1. nano -w /etc/boot/grub/grub.cfg
文件内容如下:
  1. # This is a sample grub.conf for use with Genkernel, per the Gentoo handbook  
  2. # http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=10#doc_chap2   
  3. # If you are not using Genkernel and you need help creating this file, you   
  4. # should consult the handbook. Alternatively, consult the grub.conf.sample that   
  5. # is included with the Grub documentation.   
  6.   
  7. default 0  
  8. timeout 5  
  9. #splashimage=(hd0,0)/boot/grub/splash.xpm.gz   
  10.   
  11. title Gentoo Linux 3.0.6  
  12. root (hd0,1)  
  13. kernel /boot/kernel-3.0.6-gentoo root=/dev/sda3  
  14.   
  15. title Windows 7  
  16. rootnoverify(hd0,0)  
  17. makeactive  
  18. chainloader +1  
  19.   
  20. # vim:ft=conf:

5.2 创建mtab

  1. grep -v rootfs /proc/mounts > /etc/mtab 

5.3 安装grub

  1. grub-install --no-floppy /dev/sda 
重启,选择Gentoo,启动成功,基本系统安装完成。

有空将KDE桌面装上。不过编译得有一天的时间。这就是Gentoo的特点,高度的定制性,才能获得高的效率。这就是Gentoo的Philosopy。

linux
相关资讯       Gentoo Linux 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款