配置系統
系統信息:
- 文件系統信息:
創建/etc/fstab
nano -w /etc/fstab
- 網絡信息:
Host name, Domainname, etc
nano -w /etc/conf.d/hostname
Configuring Network
nano -w /etc/conf.d/net
- 系統信息:
Gentoo uses /etc/rc.conf to configure the services, startup, and shutdown of your system.
nano -w /etc/rc.conf
Root Password
passwd
Gentoo uses /etc/conf.d/hwclock to set clock options.
nano -w /etc/conf.d/hwclock
安裝系統工具軟件:
- 可選:PCMCIA使用lspci查看硬件信息:
emerge pcmciautils
- System Logger:
emerge syslog-ng
rc-update add syslog-ng default
- 可選:File Indexing:
emerge mlocate
- 可選:Remote Access:
rc-update add sshd default
- 可選:DHCP Client:
emerge dhcpcd
配置啓動項:
- Using GRUB2:
emerge sys-boot/grub
grub2-install /dev/sda
Generating GRUB2 configuration:
grub2-mkconfig -o /boot/grub/grub.cfg
- 可選:Using GRUB Legacy:
emerge sys-boot/grub:0
編輯配置文件:
nano -w /boot/grub/grub.conf
Example grub.conf:
# 默認選擇哪個列表來引導。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:
grep -v rootfs /proc/mounts > /etc/mtab
Install GRUB Legacy:
grub-install --no-floppy /dev/sda
重啓系統:
exit
cd
umount -l /mnt/gentoo/dev{/shm,/pts,}
umount -l /mnt/gentoo{/boot,/proc,}
reboot