先用u盘启动盘安装了ubuntu,后来想再安装一个redhat。
我用分区软件划了一个新的区出来,不大,30G。
重启系统,进入grub rescue界面:
运行以下命令,修复grub
1. ls
2. ls (hd0,X) /boot/grub, 如果出现大量内容,很多是module名,XXX.mod,说明找到了我之前安装ubuntu的位置
3. set root=(hd0,8)
4. set prefix=(hd0,8)/boot/grub
5. insmod boot/grub/normal.mod (grub2用insmod normal)
6. normal
7.sudo update-grub
8. sudo grub-install /dev/sda
下面可以安装redhat了,我用的是移动硬盘安装-----不详细说了,网上很多教程,解压isolinux和images文件夹,用grub挂载,命令如下:
grub > set root=(hd0,X) X为刚分出来的那块空间
grub > set prefix=(hd0,X)/boot/grub
grub > linux (hd0,X)/isolinux/vmlinuz (这里,grub2用linux,grub用kernel)
grub > initrd (hd0, X)/isolinux/initrd.img
grub > boot
到此启动了redhat的图形化安装界面了
省