UEFI被格式化了
Tofloor
poster avatar
artisaner
deepin
2017-01-05 20:53
Author
UEFI被格式化了,系统打不开了,怎么办?
Reply Favorite View the author
All Replies
1 / 2
To page
avatar
qwq
deepin
2017-01-05 21:28
#1
进入大白菜pe(不要鄙视我),把整个磁盘都删除了,然后创建一个新的,创建好mbr和esp分区,再创建普通硬盘分区装系统就ok了
Reply View the author
avatar
Feng Yu
deepin
2017-01-05 21:36
#2
UEFI修复还算是简单,用livecd进去重新grub-install就搞定了
Reply View the author
avatar
isunny
deepin
2017-01-05 21:46
#3
把u盘格式化为fat32格式,解压缩 win8 以上的系统的系统镜像到u盘。。。f12启动带uefi字样的u盘选项,进入win系统安装过程,按shift+f10 进入命令行,输入 diskpart  进入diskpart 。。。
Reply View the author
avatar
182******97
deepin
2017-01-05 22:23
#4
uefi它是个接口,你能格式化接口?
Reply View the author
avatar
comzhong
deepin
2017-01-05 22:30
#5
https://bbs.deepin.org/post/133776
进入大白菜pe(不要鄙视我),把整个磁盘都删除了,然后创建一个新的,创建好mbr和esp分区,再创建普通硬盘分 ...

把整个磁盘都删除?你这会害死人的啊!
Reply View the author
avatar
artisaner
deepin
2017-01-05 23:49
#6
按照deepin百科重装grub报错(百科地址:https://wiki.deepin.org/index.php?title=%E4%BF%AE%E5%A4%8D%E5%90%AF%E5%8A%A8#.E9.87.8D.E8.A3.85GRUB)
root@Deepin:/# sudo grub-install --target=$(ls usr/lib/grub/ | grep efi)
sudo: unable to resolve host Deepin: Connection refused
Installing for x86_64-efi platform.
grub-installl: error: cannot find EFI directory.

电脑此时是能上网的,我用浏览器试了,可以上网。
Reply View the author
avatar
artisaner
deepin
2017-01-05 23:51
#7
https://bbs.deepin.org/post/133776
UEFI修复还算是简单,用livecd进去重新grub-install就搞定了

按照deepin百科重装grub报错(百科地址:https://wiki.deepin.org/index.php?title=%E4%BF%AE%E5%A4%8D%E5%90%AF%E5%8A%A8#.E9.87.8D.E8.A3.85GRUB)
root@Deepin:/# sudo grub-install --target=$(ls usr/lib/grub/ | grep efi)
sudo: unable to resolve host Deepin: Connection refused
Installing for x86_64-efi platform.
grub-installl: error: cannot find EFI directory.

电脑此时是能上网的,我用浏览器试了,可以上网。
Reply View the author
avatar
comzhong
deepin
2017-01-06 00:27
#8
https://bbs.deepin.org/post/133776
按照deepin百科重装grub报错(百科地址:https://wiki.deepin.org/index.php?title=%E4%BF%AE%E5%A4%8D%E ...

首先要挂载ESP分区

挂载ESP分区
sudo mount /dev/sda1 /mnt/boot/efi

再安装grub到ESP分区
sudo grub-install /mnt/boot/efi grub-efi-amd64
Reply View the author
avatar
artisaner
deepin
2017-01-06 00:56
#9
https://bbs.deepin.org/post/133776
首先要挂载ESP分区

挂载ESP分区

恩,挂载上ESP就好了。
不过执行完update-grub,我执行的grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=Deepin
这个命令报错了,
grub-install: error: cannot open '/boot/efi/EFI/Deepin/shimx64.efi': No such file or directory.

Reply View the author
avatar
comzhong
deepin
2017-01-06 01:20
#10
注意livecd里的/boot目录不是你的电脑上的,你要将电脑上的ESP分区挂载到一个目录,再将grub安装到这个目录,再更新grub
Reply View the author
avatar
artisaner
deepin
2017-01-06 01:33
#11
https://bbs.deepin.org/post/133776
注意livecd里的/boot目录不是你的电脑上的,你要将电脑上的ESP分区挂载到一个目录,再将grub安装到这个目录 ...

挂载了,我在挂载/ proc sys的时候就将/dev/sda1 挂载到/mnt/boot/efi   了。
不过重启系统提示的界面不是grub rescue> 而是grub>了。
按照这种方式,用 linux (hd0,gpt2)/boot/vmlinuz...  在命令行模式下成功进入我原来的系统了,进入后,我执行了update-grub也成功了,但是重启后来时在grub>界面了。
Reply View the author
avatar
comzhong
deepin
2017-01-06 01:47
#12
https://bbs.deepin.org/post/133776
挂载了,我在挂载/ proc sys的时候就将/dev/sda1 挂载到/mnt/boot/efi   了。
不过重启系统提示的界面不 ...

忘了说了,命令:grub-install
安装引导后,在ESP分区添后如下目录和文件
-----------------------begin------------------------------
/EFI/
       --/deepin
                     grub.cfg
                      grubx64.efi
                      MokManager.efi
                      shimx64.efi
-------------------------end-----------------------------

没有生成下面的目录和文件
-----------------------begin------------------------------
/EFI/
       --/ubuntu
                     grub.cfg
-------------------------end-----------------------------
Deepin添加到系统UEFI启动序列的是shimx64.efi文件,启动后顺序加载顺序为:
shimx64.efi --> grubx64.efi --> /EFI/ubuntu/grub.cfg
也就是说/EFI/deepin/grub.cfg这个文件就是目前没起作用,你需要手动建立Ubuntu文件夹,复制/EFI/deepin/grub.cfg到 /EFI/ubuntu/目录下。

如果依然没能自动加载,可以将/EFI/ubuntu/grub.cfg内容改成如下内容,就会自动搜索配置菜单并加载了
-----------------------begin------------------------------
menuentry "Deepin Linux"{
        search -f /boot/grub/grub.cfg --set=root
        set prefix=($root)'/boot/grub'
        configfile $prefix/grub.cfg

        search -f /grub/grub.cfg --set=root
        set prefix=($root)'/grub'
        configfile $prefix/grub.cfg
}
-------------------------end-----------------------------
Reply View the author
Comments
artisaner
2017-01-06 19:02
非常感谢你的帮助,终于解决了,真没想到需要手动建立ubuntu文件夹,拷贝grub.cfg。
avatar
artisaner
deepin
2017-01-06 04:28
#13
https://bbs.deepin.org/post/133776
忘了说了,命令:grub-install
安装引导后,在ESP分区添后如下目录和文件
-----------------------begin- ...

果然可以了,不过启动级别不对,是3级别启动的,不是图形界面启动的
Reply View the author
avatar
comzhong
deepin
2017-01-06 05:17
#14
artisaner 发表于 2017-1-5 20:28
果然可以了,不过启动级别不对,是3级别启动的,不是图形界面启动的

什么叫3级别启动?
Reply View the author
avatar
artisaner
deepin
2017-01-06 05:37
#15
https://bbs.deepin.org/post/133776
什么叫3级别启动?

就是字符界面启动的,没有图形界面,不过好像是recovery模式,直接让输入root密码,进入字符界面了
Reply View the author
avatar
qwq
deepin
2017-01-06 17:18
#16
https://bbs.deepin.org/post/133776
把整个磁盘都删除?你这会害死人的啊!

..只要你u盘工具充足。。有系统,有安装系统的东西,有winpe,激活工具等一系列东西,整个磁盘删了然后再重新创建也可以的。此方法本人亲测
Reply View the author
avatar
comzhong
deepin
2017-01-06 17:48
#17
qwq 发表于 2017-1-6 09:18
..只要你u盘工具充足。。有系统,有安装系统的东西,有winpe,激活工具等一系列东西,整个磁盘删了然后再 ...

你知道人家硬盘上有没有重要资料啊,动不动就叫人整个磁盘删除
Reply View the author
avatar
LMDM387
deepin
2017-01-06 18:29
#18
https://bbs.deepin.org/post/133776
进入大白菜pe(不要鄙视我),把整个磁盘都删除了,然后创建一个新的,创建好mbr和esp分区,再创建普通硬盘分 ...

你这直接让楼主丢全数据了不鄙视你鄙视谁?
支持UEFI的机器强行MBR不鄙视你鄙视谁?
Reply View the author
avatar
comzhong
deepin
2017-01-06 18:43
#19
https://bbs.deepin.org/post/133776
就是字符界面启动的,没有图形界面,不过好像是recovery模式,直接让输入root密码,进入字符界面了 ...

进去系统更新一下grub配置
sudo update-grub
Reply View the author
avatar
artisaner
deepin
2017-01-06 18:49
#20
https://bbs.deepin.org/post/133776
进去系统更新一下grub配置
sudo update-grub

昨天我说错了,是进入 emergency mode 了。
update-grub也不行。
我怀疑是挂载表的问题,不过挂载好像也没问题
/dev/sda2 /
/dev/sda1 /boot/efi
/dev/sda3 swap
Reply View the author
1 / 2
To page