Gentoo Linux x86快速安装指南对Grub引导不成功的补救措

Gentoo Linux x86快速安装指南

参考文档如下:#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和initrdGentoo-2012 boot # lsboot grub initramfs-genkernel-x86-3.3.0-gentoo-r1 kernel-genkernel-x86-3.3.0-gentoo-r1Gentoo-2012 boot # scp * 192.168.220.153:/mnt/gentoo/bootThe 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)? yesWarning: Permanently added ‘192.168.220.153’ (RSA) to the list of known hosts.Password: boot: not a regular filegrub: not a regular fileinitramfs-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>boot5,这样就可以进入系统,再编辑grub.conf文件

localhost ~ # df -hFilesystem Size Used Avail Use% Mounted onrootfs 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% /runrc-svcdir 1.0M 44K 980K 5% /lib/rc/init.dcgroup_root 10M 0 10M 0% /sys/fs/cgroupshm 186M 0 186M 0% /dev/shmlocalhost ~ # 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# ?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 0timeout 10#splashimage=(hd0,0)/boot/grub/splash.xpm.gztitle Gentoo 12.1root (hd0,0)kernel /boot/kernel-genkernel-x86-3.3.0-gentoo-r1 root=/dev/sda3initrd /boot/initramfs-genkernel-x86-3.3.0-gentoo-r1# vim:ft=conf:”/boot/grub/grub.conf” 13L, 598C written

6,重启成功,然后就可以根据自己的需求用emerge安装自己需要的软件了

当你开展的事业从事的行动穷途末路大势已去的时候,

Gentoo Linux x86快速安装指南对Grub引导不成功的补救措

相关文章:

你感兴趣的文章:

标签云: