TuxedoLinux 2012-10-26
Gentoo Linux x86快速安装指南
参考文档如下:
http://www.gentoo.org/doc/zh_cn/gentoo-x86-quickinstall.xml#doc_chap2
1,在mirrors.163.com上下载
install-x86-minimal-20120710.iso设置光盘引导
2,到安装grub,这块要做更改,因为哪里漏掉了initrd这块没有写,所以导致系统重启时启动不起来
这时其实数据已经保存在sda硬盘上了,这时我们只需要重启用光盘引导挂上就好了
livecd ~ # mount /dev/sda3 /mnt/gentoo livecd ~ # mount /dev/sda1 /mnt/gentoo/boot
3,在在mirrors.163.com上下载
livedvd-x86-amd64-32ul-2012.1.iso
在一台机器上引导,我们主要是用这里的/boot分区下的,kernel和initrd
Gentoo-2012 boot # ls
boot grub initramfs-genkernel-x86-3.3.0-gentoo-r1 kernel-genkernel-x86-3.3.0-gentoo-r1
Gentoo-2012 boot # scp * 192.168.220.153:/mnt/gentoo/boot
The authenticity of host '192.168.220.153 (192.168.220.153)' can't be established.
RSA key fingerprint is 97:34:54:99:66:03:48:2e:6a:a7:41:26:d1:50:ea:28.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.220.153' (RSA) to the list of known hosts.
Password:
boot: not a regular file
grub: not a regular file
initramfs-genkernel-x86-3.3.0-gentoo-r1 100% 9504KB 9.3MB/s 9.3MB/s 00:00
kernel-genkernel-x86-3.3.0-gentoo-r1 100% 5704KB 5.6MB/s 9.3MB/s 00:00
这样我们就可以利用livedvd里的内核文件启动了。
4,安装系统的那台重启切换到系统硬盘启动
进入grub时,按住 c ,进入grub命令行编辑模式
grub> root (hd0,0)
grub> kernel /boot/kernel-genkernel-x86-3.3.0-gentoo-r1 root=/dev/sda3
grub> initrd /boot/initramfs-genkernel-x86-3.3.0-gentoo-r1
grub>boot
5,这样就可以进入系统,再编辑grub.conf文件
localhost ~ # df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 7.1G 2.5G 4.3G 37% /
udev 10M 0 10M 0% /dev
/dev/sda3 7.1G 2.5G 4.3G 37% /
tmpfs 186M 204K 185M 1% /run
rc-svcdir 1.0M 44K 980K 5% /lib/rc/init.d
cgroup_root 10M 0 10M 0% /sys/fs/cgroup
shm 186M 0 186M 0% /dev/shm
localhost ~ # mount /dev/sda1 /boot
这里boot分区默认没有挂载可能是系统保护机制,前面fstab里面有自动挂载,或者那里设置有问题
不过这里没有问题,只要把grub.conf这个文件更改好就可以了,下次就能自动重启而不用手动引导启动了
localhost ~ # vim /boot/grub/grub.conf
这里的vim也是在前面用emerge安装的,默认只有nano,这个真不会
# 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 10
#splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title Gentoo 12.1
root (hd0,0)
kernel /boot/kernel-genkernel-x86-3.3.0-gentoo-r1 root=/dev/sda3
initrd /boot/initramfs-genkernel-x86-3.3.0-gentoo-r1
# vim:ft=conf:
"/boot/grub/grub.conf" 13L, 598C written
6,重启成功,然后就可以根据自己的需求用emerge安装自己需要的软件了