Welcome 微信登录

首页 / 操作系统 / Linux / Gentoo Linux x86快速安装指南对Grub引导不成功的补救措

Gentoo Linux x86快速安装指南参考文档如下:
http://www.gentoo.org/doc/zh_cn/gentoo-x86-quickinstall.xml#doc_chap21,在mirrors.163.com上下载
install-x86-minimal-20120710.iso设置光盘引导2,到安装grub,这块要做更改,因为哪里漏掉了initrd这块没有写,所以导致系统重启时启动不起来
这时其实数据已经保存在sda硬盘上了,这时我们只需要重启用光盘引导挂上就好了
livecd ~ # mount /dev/sda3 /mnt/gentoo livecd ~ # mount /dev/sda1 /mnt/gentoo/boot3,在在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/sda3grub> 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安装自己需要的软件了Ubuntu 12.10下安装ibus中文输入法Solaris中dd命令还原系统记录相关资讯      Gentoo Linux  Grub引导安装Linux  Grub安装Linux 
  • Gentoo Linux 20140826 发布下载  (09/05/2014 08:22:57)
  • Gentoo Linux--解决fcitx在GTK3应  (04/09/2013 06:25:16)
  • Gentoo Linux 在命令行下用鼠标  (11/12/2012 14:28:19)
  • VirtualBox导入ova报VERR_VD_VMDK_  (04/11/2013 11:31:50)
  • Gentoo Linux 20121221 世界末日版  (12/21/2012 20:09:44)
  • Gentoo Linux 出现 net.eth0   (09/06/2012 17:45:14)
本文评论 查看全部评论 (0)
表情: 姓名: 字数