3.8 然后编译内核和驱动,并安装驱动
- make && make modules_install
3.9 安装内核
- cp arch/x86/boot/bzImage /boot/kernel-3.0.6-gentoo
四、配置系统
4.1 修改/etc/fstab
- # /etc/fstab: static file system information.
- #
- # noatime turns off atimes for increased performance (atimes normally aren't
- # needed); notail increases performance of ReiserFS (at the expense of storage
- # efficiency). It's safe to drop the noatime options if you want and to
- # switch between notail / tail freely.
- #
- # 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.
- #
- # See the manpage fstab(5) for more information.
- #
- # <fs> <mountpoint> <type> <opts> <dump/pass>
- # NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
- /dev/sda2 /boot ext3 defaults,noatime 1 2
- /dev/sda3 / ext3 noatime 1 1
- /dev/sda5 none swap sw 0 0
- /dev/sda6 /home ext3 defaults,noatime 1 2
- /dev/cdrom /mnt/cdrom auto noauto,ro 0 0
4.2 配置网络
- # nano -w /etc/conf.d/hostname
- (将HOSTNAME的变量值设定为主机名)
- HOSTNAME="yan-laptop"
- # nano -w /etc/conf.d/net
- (设定dns_domain的变量值为你的域名)
- dns_domain_lo="homenetwork"
- config_eth0=( "192.168.0.2 netmask 255.255.255.0 brd 192.168.0.255" )
- routes_eth0=( "default via 192.168.0.1" )
- config_eth0=( "dhcp" )
- # cd /etc/init.d
- # ln -s net.lo net.eth0
- # rc-update add net.eth0 default
- # nano -w /etc/hosts
- 127.0.0.1 localhost yan-laptop
- emerge dhcpcd
五、安装GRUB引导
- emerge grub
5.1 修改/boot/grub/grub.cfg
- nano -w /etc/boot/grub/grub.cfg
- # This is a sample grub.conf for use with Genkernel, per the Gentoo handbook
- # http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=10#doc_chap2
- # If you are not using Genkernel and you need help creating this file, you
- # should consult the handbook. Alternatively, consult the grub.conf.sample that
- # is included with the Grub documentation.
- default 0
- timeout 5
- #splashimage=(hd0,0)/boot/grub/splash.xpm.gz
- title Gentoo Linux 3.0.6
- root (hd0,1)
- kernel /boot/kernel-3.0.6-gentoo root=/dev/sda3
- title Windows 7
- rootnoverify(hd0,0)
- makeactive
- chainloader +1
- # vim:ft=conf:
5.2 创建mtab
- grep -v rootfs /proc/mounts > /etc/mtab
5.3 安装grub
- grub-install --no-floppy /dev/sda
有空将KDE桌面装上。不过编译得有一天的时间。这就是Gentoo的特点,高度的定制性,才能获得高的效率。这就是Gentoo的Philosopy。
