【已解决】EFI格盘后恢复deepin启动
Tofloor
poster avatar
风吹过的绿洲
deepin
2019-02-21 18:29
Author
本帖最后由 as763190097 于 2019-2-27 21:46 编辑

因为EFI分区出现坏道,我格式化重做分区了。

解决方案:
https://bbs.deepin.org/post/133379

两点补充
请看

11楼:


/etc/fstab 这个文件,把里面对应 /boot/efi 那一行的UUID改成正确的UUID就行了。
如何查看UUID:
  1. sudo blkid /dev/sda1
Copy the Code


14楼:

还搜索手动去解决了上面的问题



Reply Favorite View the author
All Replies
1 / 2
To page
avatar
151******18
deepin
2019-02-21 18:41
#1
我把整个/boot的文件打包了,要用吗?
Reply View the author
avatar
151******18
deepin
2019-02-21 18:47
#2
Reply View the author
avatar
SiyerBOBO
deepin
2019-02-21 18:55
#3
他要的该不会是那个隐藏分区的东西吧。。。
Reply View the author
avatar
A·S·M·X·T 😏😜
deepin
2019-02-21 20:06
#4
本帖最后由 liululin 于 2019-2-21 12:08 编辑

deepin wiki: https://wiki.deepin.org/wiki/%E4%BF%AE%E5%A4%8D%E5%90%AF%E5%8A%A8


EFI+GPT模式下修复GRUB2:

用 Linux 启动盘(debian、Ubuntu等live cd都可以,)进入 Live 系统环境,在终端中依次执行如下命令:
$ sudo su
# mount /dev/sda4 /mnt(注意先确认自己的 / 分区是 sdaX)
# mount /dev/sda1 /mnt/boot/efi (注意先确认自己的ESP分区是 sdaX)
# mount -t proc proc /mnt/proc
# mount -t sysfs sys /mnt/sys
# mount -o bind /dev /mnt/dev
# mount -t devpts pts /mnt/dev/pts/
# chroot /mnt
# grub-install /dev/sda1 (没有grub就apt安装一下)
# update-grub2
Reply View the author
avatar
173******56
deepin
2019-02-22 02:04
#5
安装镜像里也有
Reply View the author
avatar
风吹过的绿洲
deepin
2019-02-22 05:01
#6
本帖最后由 as763190097 于 2019-2-21 21:04 编辑


没能成功。。。。。

修复工具也没能修复
Reply View the author
avatar
风吹过的绿洲
deepin
2019-02-22 06:04
#7


有什么文件不对吗?

Reply View the author
avatar
风吹过的绿洲
deepin
2019-02-22 06:06
#8
https://bbs.deepin.org/post/174925
链接:https://pan.baidu.com/s/1gzx91iGGked7X9rggiTRmQ 密码:mhdq

麻烦了,可是还没修复
sudo mount /dev/sda1 /mnt/boot/efi
麻烦把这个分区的东西给我。
Reply View the author
avatar
风吹过的绿洲
deepin
2019-02-22 06:52
#9
https://bbs.deepin.org/post/174925
deepin wiki: https://wiki.deepin.org/wiki/%E4%BF%AE%E5%A4%8D%E5%90%AF%E5%8A%A8

其实我可以手动引导,但是这里还是还是报错了
这个UUID哪里可以修改呢
Reply View the author
avatar
wtz
deepin
2019-02-22 08:03
#10
你看看 /etc/fstab 这个文件,把里面对应 /boot/efi 那一行的UUID改成正确的UUID就行了。
如何查看UUID:
  1. sudo blkid /dev/sda1
Copy the Code
Reply View the author
avatar
风吹过的绿洲
deepin
2019-02-22 18:41
#11
https://bbs.deepin.org/post/174925
你看看 /etc/fstab 这个文件,把里面对应 /boot/efi 那一行的UUID改成正确的UUID就行了。
如何查看UUID: ...

感谢!我感觉也一定有地方修改
Reply View the author
avatar
风吹过的绿洲
deepin
2019-02-23 22:34
#12
https://bbs.deepin.org/post/174925
你看看 /etc/fstab 这个文件,把里面对应 /boot/efi 那一行的UUID改成正确的UUID就行了。
如何查看UUID: ...

可以进系统了。非常感谢。

还有个问题需要请教,引导用修复工具修复成功了,但是启动还是grub2的命令界面是什么原因呢?

每次都要手动输命令引导。。。

启动日志还有个错误

Reply View the author
avatar
风吹过的绿洲
deepin
2019-02-23 22:47
#13
meta. 还搜索手动去解决了上面的问题
简单的方法是编辑/etc/lvm/lvm.conf这个文件,找到use_lvmetad = 1将1修改为0,保存,重新配置grub。
Reply View the author
avatar
wtz
deepin
2019-02-24 07:27
#14
https://bbs.deepin.org/post/174925
可以进系统了。非常感谢。

还有个问题需要请教,引导用修复工具修复成功了,但是启动还是grub2的命令界 ...

缺少 grub.cfg 这个文件,看看 /boot/grub 下面有没有这个文件。
Reply View the author
avatar
风吹过的绿洲
deepin
2019-02-25 00:25
#15
https://bbs.deepin.org/post/174925
缺少 grub.cfg 这个文件,看看 /boot/grub 下面有没有这个文件。

有的,

配置也没什么问题,不知道怎么引导不了
Reply View the author
avatar
DeepinOS
deepin
2019-02-25 00:42
#16
https://bbs.deepin.org/post/174925
有的,

配置也没什么问题,不知道怎么引导不了

这里要说一下,画个重点,系统有两个grub.cfg
其中一个在/boot/efi/EFI/deepin 文件夹下面,这个grub.cfg 文件把配置文件指向下面所说的grub.cfg。
另一个在/boot/grub 文件夹下面,这个是真正的grub.cfg配置文件,两个缺一不可,你可以cat 命令看一下里面的内容。

既然你可以进系统,那么你运行一下update-grub,更新启动配置文件。
Reply View the author
Comments
wtz
2019-02-26 00:49
涨姿势了~
avatar
风吹过的绿洲
deepin
2019-02-26 05:00
#17
本帖最后由 as763190097 于 2019-2-25 21:11 编辑
https://bbs.deepin.org/post/174925
这里要说一下,画个重点,系统有两个grub.cfg
其中一个在/boot/efi/EFI/deepin 文件夹下面,这个gr ...




之前就试了还是一样。


  1. #
  2. # DO NOT EDIT THIS FILE
  3. #
  4. # It is automatically generated by grub-mkconfig using templates
  5. # from /etc/grub.d and settings from /etc/default/grub
  6. #

  7. ### BEGIN /etc/grub.d/00_header ###
  8. if [ -s $prefix/grubenv ]; then
  9.   set have_grubenv=true
  10.   load_env
  11. fi
  12. if [ "${next_entry}" ] ; then
  13.    set default="${next_entry}"
  14.    set next_entry=
  15.    save_env next_entry
  16.    set boot_once=true
  17. else
  18.    set default="0"
  19. fi

  20. if [ x"${feature_menuentry_id}" = xy ]; then
  21.   menuentry_id_option="--id"
  22. else
  23.   menuentry_id_option=""
  24. fi

  25. export menuentry_id_option

  26. if [ "${prev_saved_entry}" ]; then
  27.   set saved_entry="${prev_saved_entry}"
  28.   save_env saved_entry
  29.   set prev_saved_entry=
  30.   save_env prev_saved_entry
  31.   set boot_once=true
  32. fi

  33. function savedefault {
  34.   if [ -z "${boot_once}" ]; then
  35.     saved_entry="${chosen}"
  36.     save_env saved_entry
  37.   fi
  38. }
  39. function load_video {
  40.   if [ x$feature_all_video_module = xy ]; then
  41.     insmod all_video
  42.   else
  43.     insmod efi_gop
  44.     insmod efi_uga
  45.     insmod ieee1275_fb
  46.     insmod vbe
  47.     insmod vga
  48.     insmod video_bochs
  49.     insmod video_cirrus
  50.   fi
  51. }

  52. if [ x$feature_default_font_path = xy ] ; then
  53.    font=unicode
  54. else
  55. insmod part_gpt
  56. insmod ext2
  57. set root='hd0,gpt10'
  58. if [ x$feature_platform_search_hint = xy ]; then
    else
  59.   search --no-floppy --fs-uuid --set=root f648c029-c0b9-4347-a04d-82b0e3874da1
  60. fi
  61.     font="/usr/share/grub/unicode.pf2"
  62. fi

  63. if loadfont $font ; then
  64.   set gfxmode=1920x1080,1680x1050,1280x1024,1280x960,1152x864,1280x720,1024x768,auto
  65.   load_video
  66.   insmod gfxterm
  67.   set locale_dir=$prefix/locale
  68.   set lang=zh_CN
  69.   insmod gettext
  70. fi
  71. terminal_output gfxterm
  72. insmod part_gpt
  73. insmod ext2
  74. set root='hd0,gpt10'
  75. if [ x$feature_platform_search_hint = xy ]; then
    else
  76.   search --no-floppy --fs-uuid --set=root f648c029-c0b9-4347-a04d-82b0e3874da1
  77. fi
  78. insmod gfxmenu
  79. loadfont ($root)/boot/grub/themes/deepin-fallback/unifont-regular-16.pf2
  80. insmod jpeg
  81. insmod png
  82. set theme=($root)/boot/grub/themes/deepin-fallback/theme.txt
  83. export theme
  84. if [ "${recordfail}" = 1 ] ; then
  85.   set timeout=30
  86. else
  87.   if [ x$feature_timeout_style = xy ] ; then
  88.     set timeout_style=menu
  89.     set timeout=5
  90.   # Fallback normal timeout code in case the timeout_style feature is
  91.   # unavailable.
  92.   else
  93.     set timeout=5
  94.   fi
  95. fi
  96. ### END /etc/grub.d/00_header ###

  97. ### BEGIN /etc/grub.d/01_live ###
  98. if [ ! -z ${boot_once} ];then
  99.   set timeout_style=countdown
  100.   set load_config=load-config
  101. else
  102.   set load_config=
  103. fi
  104. ### END /etc/grub.d/01_live ###

  105. ### BEGIN /etc/grub.d/05_debian_theme ###
  106. set menu_color_normal=cyan/blue
  107. set menu_color_highlight=white/blue
  108. ### END /etc/grub.d/05_debian_theme ###

  109. ### BEGIN /etc/grub.d/10_linux ###
  110. function gfxmode {
  111.         set gfxpayload="${1}"
  112. }
  113. set linux_gfx_mode=
  114. export linux_gfx_mode
  115. menuentry 'Deepin 15.9.1 GNU/Linux' --class deepin --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-f648c029-c0b9-4347-a04d-82b0e3874da1' {
  116.         load_video
  117.         insmod gzio
  118.         if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
  119.         insmod part_gpt
  120.         insmod ext2
  121.         set root='hd0,gpt10'
  122.         if [ x$feature_platform_search_hint = xy ]; then
            else
  123.           search --no-floppy --fs-uuid --set=root f648c029-c0b9-4347-a04d-82b0e3874da1
  124.         fi
  125.         linux        /boot/vmlinuz-4.15.0-29deepin-generic root=UUID=f648c029-c0b9-4347-a04d-82b0e3874da1 ro  splash quiet DEEPIN_GFXMODE=$DEEPIN_GFXMODE
  126.         initrd        /boot/initrd.img-4.15.0-29deepin-generic
  127. }
  128. submenu 'Advanced options for Deepin 15.9.1 GNU/Linux' $menuentry_id_option 'gnulinux-advanced-f648c029-c0b9-4347-a04d-82b0e3874da1' {
  129.         menuentry 'Deepin 15.9.1 GNU/Linux,Linux 4.15.0-29deepin-generic' --class deepin --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.15.0-29deepin-generic-advanced-f648c029-c0b9-4347-a04d-82b0e3874da1' {
  130.                 load_video
  131.                 insmod gzio
  132.                 if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
  133.                 insmod part_gpt
  134.                 insmod ext2
  135.                 set root='hd0,gpt10'
  136.                 if [ x$feature_platform_search_hint = xy ]; then
                    else
  137.                   search --no-floppy --fs-uuid --set=root f648c029-c0b9-4347-a04d-82b0e3874da1
  138.                 fi
  139.                 linux        /boot/vmlinuz-4.15.0-29deepin-generic root=UUID=f648c029-c0b9-4347-a04d-82b0e3874da1 ro  splash quiet DEEPIN_GFXMODE=$DEEPIN_GFXMODE
  140.                 initrd        /boot/initrd.img-4.15.0-29deepin-generic
  141.         }
  142.         menuentry 'Deepin 15.9.1 GNU/Linux, with Linux 4.15.0-29deepin-generic (recovery mode)' --class deepin --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.15.0-29deepin-generic-recovery-f648c029-c0b9-4347-a04d-82b0e3874da1' {
  143.                 load_video
  144.                 insmod gzio
  145.                 if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
  146.                 insmod part_gpt
  147.                 insmod ext2
  148.                 set root='hd0,gpt10'
  149.                 if [ x$feature_platform_search_hint = xy ]; then
                    else
  150.                   search --no-floppy --fs-uuid --set=root f648c029-c0b9-4347-a04d-82b0e3874da1
  151.                 fi
  152.                 linux        /boot/vmlinuz-4.15.0-29deepin-generic root=UUID=f648c029-c0b9-4347-a04d-82b0e3874da1 ro recovery
  153.                 initrd        /boot/initrd.img-4.15.0-29deepin-generic
  154.         }
  155. }

  156. ### END /etc/grub.d/10_linux ###

  157. ### BEGIN /etc/grub.d/15_linux_bar ###
  158. menuentry 'Deepin Recovery' --class deepin --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-f648c029-c0b9-4347-a04d-82b0e3874da1' {
  159.         insmod gzio
  160.         insmod part_gpt
  161.         insmod ext2
  162.         set root='hd0,gpt10'
  163.         if [ x$feature_platform_search_hint = xy ]; then
            else
  164.           search --no-floppy --fs-uuid --set=root f648c029-c0b9-4347-a04d-82b0e3874da1
  165.         fi
  166.         linux        /boot/deepin/vmlinuz-4.14.13 ro boot=live $load_config components quiet splash toram locales=zh_CN.UTF-8 acpi_backlight=vendor live-media=UUID=f648c029-c0b9-4347-a04d-82b0e3874da1 live-media-path=recovery
  167.         initrd        /boot/deepin/initrd.img-4.14.13
  168. }

  169. ### END /etc/grub.d/15_linux_bar ###

  170. ### BEGIN /etc/grub.d/20_linux_xen ###

  171. ### END /etc/grub.d/20_linux_xen ###

  172. ### BEGIN /etc/grub.d/30_os-prober ###
  173. ### END /etc/grub.d/30_os-prober ###

  174. ### BEGIN /etc/grub.d/30_uefi-firmware ###
  175. menuentry 'System setup' $menuentry_id_option 'uefi-firmware' {
  176.         fwsetup
  177. }
  178. ### END /etc/grub.d/30_uefi-firmware ###

  179. ### BEGIN /etc/grub.d/35_deepin_gfxmode ###
  180. insmod deepin_gfxmode
  181. deepin_gfxmode
  182. ### END /etc/grub.d/35_deepin_gfxmode ###

  183. ### BEGIN /etc/grub.d/40_custom ###
  184. # This file provides an easy way to add custom menu entries.  Simply type the
  185. # menu entries you want to add after this comment.  Be careful not to change
  186. # the 'exec tail' line above.
  187. ### END /etc/grub.d/40_custom ###

  188. ### BEGIN /etc/grub.d/41_custom ###
  189. if [ -f  ${config_directory}/custom.cfg ]; then
  190.   source ${config_directory}/custom.cfg
  191. elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  192.   source $prefix/custom.cfg;
  193. fi
  194. ### END /etc/grub.d/41_custom ###
Copy the Code



Reply View the author
avatar
foxbcd
deepin
2019-02-26 05:28
#18
grub-mkconfig -o /boot/grub/grub.cfg
Reply View the author
avatar
foxbcd
deepin
2019-02-26 05:30
#19
  1. grub-mkconfig -o /boot/grub/grub.cfg
Copy the Code


Reply View the author
avatar
风吹过的绿洲
deepin
2019-02-26 07:38
#20
Reply View the author
1 / 2
To page