配置系统

系统信息:

  • 文件系统信息:

创建/etc/fstab

1
nano -w /etc/fstab
  • 网络信息:

Host name, Domainname, etc

1
nano -w /etc/conf.d/hostname

Configuring Network

1
nano -w /etc/conf.d/net
  • 系统信息:

Gentoo uses /etc/rc.conf to configure the services, startup, and shutdown of your system.

1
nano -w /etc/rc.conf

Root Password

1
passwd

Gentoo uses /etc/conf.d/hwclock to set clock options.

1
nano -w /etc/conf.d/hwclock

安装系统工具软件:

  • 可选:PCMCIA使用lspci查看硬件信息:
1
emerge pcmciautils
  • System Logger:
1
2
emerge syslog-ng
rc-update add syslog-ng default
  • 可选:File Indexing:
1
emerge mlocate
  • 可选:Remote Access:
1
rc-update add sshd default
  • 可选:DHCP Client:
1
emerge dhcpcd

配置启动项:

  • Using GRUB2:
1
2
emerge sys-boot/grub
grub2-install /dev/sda

Optionally, install theos-prober utility (provided through the sys-boot/os-prober package) to have GRUB2 probe for other operating systems when running thegrub2-mkconfig command. In most instances, this will enable GRUB2 to automatically detect other operating systems (Windows 7, Windows 8.1, etc.).

Generating GRUB2 configuration:

1
grub2-mkconfig -o /boot/grub/grub.cfg
  • 可选:Using GRUB Legacy:
1
emerge sys-boot/grub:0

编辑配置文件:

1
nano -w /boot/grub/grub.conf

Example grub.conf:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# 默认选择哪个列表来引导。0表示第一个, 1表示第二个,以此类推。
default 0
# 引导默认列表前等待多少秒
timeout 30
# 使用漂亮、“臃肿”的spalsh图像来增加一点趣味:)
# 如果您没有安装显卡,请将这行注释掉
splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title Gentoo Linux 3.10.10
# 内核镜像(或者操作系统)所在分区
root (hd0,0)
kernel /boot/kernel-3.10.10-gentoo root=/dev/sda2

title Gentoo Linux 3.10.10 (rescue)
# 内核镜像(或者操作系统)所在分区
root (hd0,0)
kernel /boot/kernel-3.10.10-gentoo root=/dev/sda2 init=/bin/bb

# 接下来的四行只有在您与Windows系统进行双启动的情况下才需要。
# 本例中,windows系统位于/dev/sda6。
title Windows XP
rootnoverify (hd0,5)
makeactive
chainloader +1

#win7下注释掉makeactive

Setting up GRUB Legacy using grub-install: Creating /etc/mtab:

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

Install GRUB Legacy:

1
grub-install --no-floppy /dev/sda

重启系统:

1
2
3
4
5
exit
cd
umount -l /mnt/gentoo/dev{/shm,/pts,}
umount -l /mnt/gentoo{/boot,/proc,}
reboot