我自己在服务器上装了centos 6.5系统,默认用的就是UEFI,没有注意可以只用GRUB,接着问题就出现了,我在服务器内安装了另外一块带grub启动系统的硬盘,
这个硬盘启动系统后,如果去掉此块硬盘,再重新启动,总是识别不出来centos 6.5的UEFI,这个可以通过启动主板的UEFI,然后用UEFI的命令:
mount fs0
fs0:
cd EFI
cd redhat
grub.efi
文件夹名称可能不准,大概是这样就可以手动启动系统了,另外还可以通过插入系统盘,upgrade一下就可以了,不用每次手动,也不会丢失数据,但是总觉得
这样不是很好。所以我就有了将UEFI-GPT回退为MBR的想法。
谷歌总是很牛x,所以我得到的结果是用gdisk,我启动另一个系统,挂载上centos 6.5的硬盘,然后按照google上的步骤:
1
Click "Applications." Point to "Accessories," then click "Terminal." Input the following into Terminal: sudo fdisk -l
2
Press "Enter" to see the disk devices connected to the computer. The device with the asterisk next to it is the boot device. Write down the filename (for example, /dev/sda) assigned to the disk.
3
Input the following into Terminal: sudo apt-get install gdisk. Press "Enter" to install the partitioning tool to Ubuntu.
4
Input "sudo gdisk" into Terminal, then press "Enter" to run gdisk as a superuser. Input the name assigned to the boot device, then press "Enter" again.
5
Press "r," then hit "Enter," to switch to the recovery and transformation options. Press "g," then press "Enter," to select the option to convert GPT to MBR on Linux.
6
Press "w," then press "Enter," to convert GPT to MBR on the primary partitions. Press "y," then "Enter," to finalize and exit.
操作完成后,重启发现系统起不来,手动引导UEFI也不行了。
人类一思考,上帝就发笑,可是俺思考后发现还是能拯救的,
先提前说明,centos 6.5安装的时候,是分了三个区的,sda1 -- UEFI所在区,是fat32,sda2 -- 在fdisk -l下显示是NTFS(但实际上是ext4)的存储实际系统和数据的分区,
sda3 -- swap 分区。
我进入U盘启动的系统后,把sda1分区挂载到mnt目录内,发现在efi->redhat目录内,存在一个文件grub.conf,相比经常把玩系统的人都知道这个是干嘛的。就是有了这个,我才有了希望。
下面就是拯救的具体步骤:
1、mount上sda1,然后拷贝出grub.conf留作后用,切忌!然后umount
2、使用fdisk将sda1修改为83-linux,sda2也修改为83-linux,并且把sda1设置为启动分区。
大致命令流程如下: fdisk /dev/sda t 1 83 t 2 83 a 1
3、将sda1做成ext3,因为他是fat32
命令:mkfs.ext3 /dev/sda1
4、mount上sda1和sda2,我这里sda1在/mnt,sda2在/sda2 ,给sda1安装grub,grub-install --root-directory=/mnt /dev/sda,这样grub就装好了
5、 把备份的grub.conf拷贝到/mnt/boot/grub目录下,并且做一个软连接,menu.lst指向grub.conf,命令是:ln -s grub.conf menu.lst
6、将/sda2/boot/目录下在grub.conf内用到的文件,一个是kernel会用到的,一个是initrd会用到的,拷贝到/mnt/boot目录下
7、修改/mnt/boot/grub/grub.conf,把root (hd0, 1)这个改为root (hd0,0)
8、保存,sync,umount,卸载硬盘,重新启动就可以了。
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
P70系列延期,华为新旗舰将在下月发布
3月20日消息,近期博主@数码闲聊站 透露,原定三月份发布的华为新旗舰P70系列延期发布,预计4月份上市。
而博主@定焦数码 爆料,华为的P70系列在定位上已经超过了Mate60,成为了重要的旗舰系列之一。它肩负着重返影像领域顶尖的使命。那么这次P70会带来哪些令人惊艳的创新呢?
根据目前爆料的消息来看,华为P70系列将推出三个版本,其中P70和P70 Pro采用了三角形的摄像头模组设计,而P70 Art则采用了与上一代P60 Art相似的不规则形状设计。这样的外观是否好看见仁见智,但辨识度绝对拉满。
更新日志
- 《原神》「星路拾忆」网页活动壁纸展示
- 群星.2024-祝你幸福!电影原声带【阿里巴巴】【FLAC分轨】
- 于台烟.2004-执着【乾坤唱片】【WAV+CUE】
- 黄品源.2004-感谢·情人(引进版)【滚石】【WAV+CUE】
- 《最终幻想16》评测:游、戏两难全的系列转折
- 《纸嫁衣》五部打包¥104,《鬼泣5》仅需¥44
- 《崩坏:星穹铁道》造物大赛卷出新高度
- 《王菲 菲常传奇 2CD》[WAV+CUE][950MB]
- 《王菲 空灵独味唱腔 非常传奇 紫水晶2CD》[WAV+CUE][860MB]
- 《车载专业测试王1号 极品音质》[WAV/分轨][980MB]
- 炉石传说的国服回归送什么奖励 炉石传说9.25回归最新消息介绍
- 云顶之弈最强阵容汇总2024 云顶之弈最强阵容搭配最新版本
- S14lol全球总决赛在哪观看 lol全球总决赛观赛直播地址汇总
- 黄思婷2011-感谢天[豪记唱片][WAV+CUE]
- 孙淑媚2013-太阳[台湾首版][WAV+CUE]