Ubuntu 安装:找出 Grub 和 Windows 引导加载程序的位置

Ubuntu 安装:找出 Grub 和 Windows 引导加载程序的位置

我想安装 Ubuntu 16.10 来替换我当前的 15.10 安装。我还安装了 Windows 10。该系统是 EFI 系统。

现在我的问题是,我记得上次安装 Ubuntu 时,整个引导加载程序的情况有点混乱,这就是为什么我现在要格外小心,在哪里安装 Grub。但是我无法找到它在我当前设置中的安装位置,而且我不想冒险破坏 Windows 引导加载程序。我怎样才能找出 Grub 目前所在的位置,以便我可以安全地将它安装在同一个位置?我尝试了启动信息脚本,但没有提到 Grub 所在的位置。

这是相关输出fdisk -l

Disk /dev/sda: 111,8 GiB, 120034123776 bytes, 234441648 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: E11DDD93-18E8-4DAA-8538-BB230F42C8BA

Gerät          Start      Ende  Sektoren  Size Typ
/dev/sda1       2048    206847    204800  100M EFI System
/dev/sda2     206848    468991    262144  128M Microsoft reserved
/dev/sda3     468992 191592447 191123456 91,1G Microsoft basic data
/dev/sda4  191592448 192514047    921600  450M Windows recovery environment
/dev/sda5  192514048 234440703  41926656   20G Linux filesystem


Disk /dev/sdb: 931,5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 95D46DE3-4D90-410A-960A-46B464AD04D9

Gerät           Start       Ende   Sektoren   Size Typ
/dev/sdb1        2048  585939547  585937500 279,4G Microsoft basic data
/dev/sdb2   585940992 1933596671 1347655680 642,6G Linux filesystem
/dev/sdb3  1933596672 1953523711   19927040   9,5G Linux Swap

启动信息脚本内容如下:

                  Boot Info Script 0.61      [1 April 2012]


============================= Boot Info Summary: ===============================

 => No boot loader is installed in the MBR of /dev/sda.
 => Windows is installed in the MBR of /dev/sdb.

sda1: __________________________________________________________________________

    File system:       vfat
    Boot sector type:  Windows 7: FAT32
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /efi/Boot/bootx64.efi /efi/ubuntu/grubx64.efi 
                       /efi/ubuntu/MokManager.efi /efi/ubuntu/shimx64.efi

sda2: __________________________________________________________________________

    File system:       
    Boot sector type:  -
    Boot sector info: 
    Mounting failed:   mount: unknown filesystem type ''

sda3: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /Windows/System32/winload.exe

sda4: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        

sda5: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Ubuntu 15.10
    Boot files:        /boot/grub/grub.cfg /etc/fstab

sdb1: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        

sdb2: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  
    Boot files:        

sdb3: __________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info: 

============================ Drive/Partition Info: =============================

Drive: sda _____________________________________________________________________
Disk /dev/sda: 111,8 GiB, 120034123776 bytes, 234441648 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sda1                   1   234,441,647   234,441,647  ee GPT


GUID Partition Table detected.

Partition    Start Sector    End Sector  # of Sectors System
/dev/sda1           2,048       206,847       204,800 EFI System partition
/dev/sda2         206,848       468,991       262,144 Microsoft Reserved Partition (Windows)
/dev/sda3         468,992   191,592,447   191,123,456 Data partition (Windows/Linux)
/dev/sda4     191,592,448   192,514,047       921,600 Windows Recovery Environment (Windows)
/dev/sda5     192,514,048   234,440,703    41,926,656 Data partition (Linux)

Drive: sdb _____________________________________________________________________
Disk /dev/sdb: 931,5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sdb1                   1 1,953,525,167 1,953,525,167  ee GPT


GUID Partition Table detected.

Partition    Start Sector    End Sector  # of Sectors System
/dev/sdb1           2,048   585,939,547   585,937,500 Data partition (Windows/Linux)
/dev/sdb2     585,940,992 1,933,596,671 1,347,655,680 Data partition (Linux)
/dev/sdb3   1,933,596,672 1,953,523,711    19,927,040 Swap partition (Linux)

"blkid" output: ________________________________________________________________

Device           UUID                                   TYPE       LABEL

/dev/sda1        6EF5-751D                              vfat       
/dev/sda2                                                          
/dev/sda3        2A1808F61808C2B5                       ntfs       
/dev/sda4        0C3E6CED3E6CD16E                       ntfs       
/dev/sda5        03a4142e-656d-4063-a212-8d7ff0124be9   ext4       
/dev/sdb1        6431D7B521AC29B4                       ntfs       windata
/dev/sdb2        3afe68aa-02f4-45c5-b786-c6a39e2d0690   ext4       
/dev/sdb3        1128331f-ebcf-4d3d-81e4-b9da91fa736b   swap       

================================ Mount points: =================================

Device           Mount_Point              Type       Options

/dev/sda1        /boot/efi                vfat       (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/sda5        /                        ext4       (rw,relatime,errors=remount-ro,data=ordered)
/dev/sdb2        /home                    ext4       (rw,relatime,data=ordered)


=========================== sda5/boot/grub/grub.cfg: ===========================

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

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}
function recordfail {
  set recordfail=1
  if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod ext2
set root='hd0,gpt5'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5  03a4142e-656d-4063-a212-8d7ff0124be9
else
  search --no-floppy --fs-uuid --set=root 03a4142e-656d-4063-a212-8d7ff0124be9
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=de_DE
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=menu
    set timeout=10
  # Fallback normal timeout code in case the timeout_style feature is
  # unavailable.
  else
    set timeout=10
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
if background_color 44,0,30,0; then
  clear
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
    set gfxpayload="${1}"
    if [ "${1}" = "keep" ]; then
        set vt_handoff=vt.handoff=7
    else
        set vt_handoff=
    fi
}
if [ "${recordfail}" != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-03a4142e-656d-4063-a212-8d7ff0124be9' {
    recordfail
    load_video
    gfxmode $linux_gfx_mode
    insmod gzio
    if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
    insmod part_gpt
    insmod ext2
    set root='hd0,gpt5'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5  03a4142e-656d-4063-a212-8d7ff0124be9
    else
      search --no-floppy --fs-uuid --set=root 03a4142e-656d-4063-a212-8d7ff0124be9
    fi
    linux   /boot/vmlinuz-4.2.0-42-generic.efi.signed root=UUID=03a4142e-656d-4063-a212-8d7ff0124be9 ro  quiet splash $vt_handoff
    initrd  /boot/initrd.img-4.2.0-42-generic
}
submenu 'Erweiterte Optionen für Ubuntu' $menuentry_id_option 'gnulinux-advanced-03a4142e-656d-4063-a212-8d7ff0124be9' {
    menuentry 'Ubuntu, mit Linux 4.2.0-42-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.2.0-42-generic-advanced-03a4142e-656d-4063-a212-8d7ff0124be9' {
        recordfail
        load_video
        gfxmode $linux_gfx_mode
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt5'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5  03a4142e-656d-4063-a212-8d7ff0124be9
        else
          search --no-floppy --fs-uuid --set=root 03a4142e-656d-4063-a212-8d7ff0124be9
        fi
        echo    'Linux 4.2.0-42-generic wird geladen …'
        linux   /boot/vmlinuz-4.2.0-42-generic.efi.signed root=UUID=03a4142e-656d-4063-a212-8d7ff0124be9 ro  quiet splash $vt_handoff
        echo    'Initiale Ramdisk wird geladen …'
        initrd  /boot/initrd.img-4.2.0-42-generic
    }
    menuentry 'Ubuntu, with Linux 4.2.0-42-generic (upstart)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.2.0-42-generic-init-upstart-03a4142e-656d-4063-a212-8d7ff0124be9' {
        recordfail
        load_video
        gfxmode $linux_gfx_mode
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt5'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5  03a4142e-656d-4063-a212-8d7ff0124be9
        else
          search --no-floppy --fs-uuid --set=root 03a4142e-656d-4063-a212-8d7ff0124be9
        fi
        echo    'Linux 4.2.0-42-generic wird geladen …'
        linux   /boot/vmlinuz-4.2.0-42-generic.efi.signed root=UUID=03a4142e-656d-4063-a212-8d7ff0124be9 ro  quiet splash $vt_handoff init=/sbin/upstart
        echo    'Initiale Ramdisk wird geladen …'
        initrd  /boot/initrd.img-4.2.0-42-generic
    }
    menuentry 'Ubuntu, with Linux 4.2.0-42-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.2.0-42-generic-recovery-03a4142e-656d-4063-a212-8d7ff0124be9' {
        recordfail
        load_video
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt5'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5  03a4142e-656d-4063-a212-8d7ff0124be9
        else
          search --no-floppy --fs-uuid --set=root 03a4142e-656d-4063-a212-8d7ff0124be9
        fi
        echo    'Linux 4.2.0-42-generic wird geladen …'
        linux   /boot/vmlinuz-4.2.0-42-generic.efi.signed root=UUID=03a4142e-656d-4063-a212-8d7ff0124be9 ro recovery nomodeset 
        echo    'Initiale Ramdisk wird geladen …'
        initrd  /boot/initrd.img-4.2.0-42-generic
    }
    menuentry 'Ubuntu, mit Linux 4.2.0-41-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.2.0-41-generic-advanced-03a4142e-656d-4063-a212-8d7ff0124be9' {
        recordfail
        load_video
        gfxmode $linux_gfx_mode
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt5'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5  03a4142e-656d-4063-a212-8d7ff0124be9
        else
          search --no-floppy --fs-uuid --set=root 03a4142e-656d-4063-a212-8d7ff0124be9
        fi
        echo    'Linux 4.2.0-41-generic wird geladen …'
        linux   /boot/vmlinuz-4.2.0-41-generic.efi.signed root=UUID=03a4142e-656d-4063-a212-8d7ff0124be9 ro  quiet splash $vt_handoff
        echo    'Initiale Ramdisk wird geladen …'
        initrd  /boot/initrd.img-4.2.0-41-generic
    }
    menuentry 'Ubuntu, with Linux 4.2.0-41-generic (upstart)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.2.0-41-generic-init-upstart-03a4142e-656d-4063-a212-8d7ff0124be9' {
        recordfail
        load_video
        gfxmode $linux_gfx_mode
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt5'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5  03a4142e-656d-4063-a212-8d7ff0124be9
        else
          search --no-floppy --fs-uuid --set=root 03a4142e-656d-4063-a212-8d7ff0124be9
        fi
        echo    'Linux 4.2.0-41-generic wird geladen …'
        linux   /boot/vmlinuz-4.2.0-41-generic.efi.signed root=UUID=03a4142e-656d-4063-a212-8d7ff0124be9 ro  quiet splash $vt_handoff init=/sbin/upstart
        echo    'Initiale Ramdisk wird geladen …'
        initrd  /boot/initrd.img-4.2.0-41-generic
    }
    menuentry 'Ubuntu, with Linux 4.2.0-41-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.2.0-41-generic-recovery-03a4142e-656d-4063-a212-8d7ff0124be9' {
        recordfail
        load_video
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt5'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5  03a4142e-656d-4063-a212-8d7ff0124be9
        else
          search --no-floppy --fs-uuid --set=root 03a4142e-656d-4063-a212-8d7ff0124be9
        fi
        echo    'Linux 4.2.0-41-generic wird geladen …'
        linux   /boot/vmlinuz-4.2.0-41-generic.efi.signed root=UUID=03a4142e-656d-4063-a212-8d7ff0124be9 ro recovery nomodeset 
        echo    'Initiale Ramdisk wird geladen …'
        initrd  /boot/initrd.img-4.2.0-41-generic
    }
}

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

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

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

### BEGIN /etc/grub.d/20_memtest86+ ###
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows Boot Manager (auf /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-efi-6EF5-751D' {
    insmod part_gpt
    insmod fat
    set root='hd0,gpt1'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  6EF5-751D
    else
      search --no-floppy --fs-uuid --set=root 6EF5-751D
    fi
    chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
set timeout_style=menu
if [ "${timeout}" = 0 ]; then
  set timeout=10
fi
### END /etc/grub.d/30_os-prober ###

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

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

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------

=============================== sda5/etc/fstab: ================================

--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda5 during installation
UUID=03a4142e-656d-4063-a212-8d7ff0124be9 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda1 during installation
UUID=6EF5-751D  /boot/efi       vfat    umask=0077      0       1
# /home was on /dev/sdb2 during installation
UUID=3afe68aa-02f4-45c5-b786-c6a39e2d0690 /home           ext4    defaults        0       2
# swap was on /dev/sdb3 during installation
UUID=1128331f-ebcf-4d3d-81e4-b9da91fa736b none            swap    sw              0       0
/dev/disk/by-uuid/2A1808F61808C2B5 /mnt/2A1808F61808C2B5 auto nosuid,nodev,nofail,noauto 0 0
--------------------------------------------------------------------------------

=================== sda5: Location of files loaded by Grub: ====================

           GiB - GB             File                                 Fragment(s)


=============================== StdErr Messages: ===============================

cat: /tmp/BootInfo-qZ45TXCy/Tmp_Log: Datei oder Verzeichnis nicht gefunden

这是输出efibootmgr -v

BootCurrent: 0001
Timeout: 2 seconds
BootOrder: 0001,0000,0002
Boot0000* Windows Boot Manager  HD(1,GPT,9ffc789a-2364-433e-a852-797fd3b7da5b,0x800,0x32000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...a................
Boot0001* ubuntu    HD(1,GPT,9ffc789a-2364-433e-a852-797fd3b7da5b,0x800,0x32000)/File(\EFI\ubuntu\shimx64.efi)
Boot0002* ubuntu    HD(1,GPT,9ffc789a-2364-433e-a852-797fd3b7da5b,0x800,0x32000)/File(\EFI\Ubuntu\grubx64.efi)

虽然脚本说 Windows 安装在 /dev/sdb 的 MBR 中,但我认为它位于 /dev/sda1 中。

Grub 启动菜单有一个 Windows Bootloader 的条目(不是 Windows 本身,它特别提到了 bootloader),根据菜单条目,它位于 /dev/sda1 中

答案1

在继续之前,您可能需要查看一些有关 EFI 模式启动如何工作的信息。我建议:

关于启动信息脚本输出的一些具体观察:

  • 你的两个磁盘都使用GUID 分区表 (GPT)。Windows 无法在 BIOS/CSM/传统模式下从 GPT 磁盘启动;它必须在 EFI/UEFI 模式下启动。
  • 你的EFI 系统分区 (ESP)/dev/sda1。ESP 包含 EFI 模式引导加载程序。
  • 您的 ESP 包含 Ubuntu GRUB 2 引导加载程序(/efi/ubuntu/grubx64.efi)和相关文件(shimx64.efiMokManager.efi)。它还包含efi/Boot/bootx64.efi,可以是任何东西 — — 可能是 Windows 引导管理器,可能是 GRUB 的另一个副本,也可能是其他东西。
  • /dev/sda没有 BIOS 模式的引导加载程序。
  • 您的/dev/sdb包含 Windows 引导加载程序的 BIOS 模式版本。
  • 您的grub.cfg包含一个用于启动 Windows 的条目,它将/EFI/Microsoft/Boot/bootmgfw.efi在 上启动(这是 Windows EFI 引导加载程序的常用名称和位置)/dev/sda1;但是,启动信息脚本不会显示此文件存在。有时启动信息脚本会遗漏文件,因此可能是启动信息脚本错误导致了此差异。我建议您通过在 Ubuntu 中查找来手动检查这一点。(默认情况下,/boot/efi/EFI/Microsoft/Boot/bootmgfw.efiESP 安装在Ubuntu 中。)/boot/efi
  • 您的 Boot Info Script 输出缺少 的输出efibootmgr -v。当您以 EFI 模式启动时,通常会包含此输出。如果您从紧急磁盘运行 Boot Info Script,那么这可以解释这种差异。如果您从正常启动运行它,那就令人费解了,但还不足以让我建议您对此采取任何措施,至少不要单独采取措施。

总体而言,看起来您是在 EFI 模式下启动这两个操作系统,而启动信息脚本只是无法找到 Windows 启动管理器。我的直觉是 MBR 中的 BIOS 模式 Windows 启动加载程序只是/dev/sdb上次安装时遗留下来的;或者您可能是在 BIOS 模式下安装的,但随后按照程序将其转换为 EFI 模式安装。无论哪种方式,它都是无害的,只是它会引发有关如何安装的问题。

无论如何,您都应该能够按照通常的升级程序进行升级。请注意,安装引导加载程序的位置提示是被忽略在进行 EFI 模式安装时,您对此的担心是多余的。不过,我确实有几点建议:

  • 您可能不想安装 16.10,而应该考虑 16.04(或 16.04.1)LTS,因为它通常更稳定。您还可以使用该do-release-upgrade程序从当前安装中升级到 16.04。
  • 强烈建议在继续操作之前尽可能多地备份您的计算机。最低限度,备份 ESP(/dev/sda1/boot/efi)和您的个人文件(可能/home还有您在 Windows 中存储个人文件的位置)。操作系统安装和升级可以顺利进行,不会出现任何问题;但是如果您在某些重要方面出现失误,您最终可能会毁掉所有个人文件和/或 Windows 引导加载程序。建议在执行任何操作之前先备份这些文件。
  • 如果您使用 Ubuntu 安装介质进行升级,并且您的系统配置为允许 BIOS 模式或 EFI 模式启动,请将其重新配置为仅允许 EFI 模式启动。具体操作方法因计算机而异。由于您当前正在以 EFI 模式启动两个操作系统,因此 BIOS 模式支持对您没有好处,如果您意外以 BIOS 模式启动 Ubuntu 安装程序,可能会造成麻烦。请参阅我关于这个主题的页面更多细节。
  • 请阅读我在本回答开头发布的至少一个链接,最好是全部三个。了解 EFI 启动过程是避免在设置或升级系统时出现灾难性问题的最佳选择。

答案2

磁盘标签类型:gpt

因此错过了 2mb 特殊部分。fdisk 的 BIOS boot

有时您仍然可以安装它,但不是通过常用的方式。

认为 partedp可能会显示更多。因此无法使用旧版 BIOS 兼容模式,最后的启动机会是 uefi。

相关内容