0

I have a UEFI system drive and a UEFI LiveUsb key and I have installed both 16.04 and 17.04 before using this setup so I don't think that configuration or video drivers is an issue.

I decided that I needed to go down to the metal and create a new UEFI system volume. I created a new GPT partition table, an ESP partition, a root partition and a /home partition but I forgot to set the ESP and Boot flags on the ESP partition. I went ahead and installed 16.04 on this configuration without problems and used it for a few weeks. Today, I decided it was time to upgrade to 17.04 and make sure this was a proper UEFI install so first I set the ESD and boot flags on my ESP partition. I then proceeded to install 17.04 from my UEFI LiveUsb key. The install went OK but when I tried to boot the new system I got a black screen before Grub2 could display the boot screen, even if I held down the right shift key during the boot. Just to be sure that it was not my video card I tried with nomodeset without success.

Gparted view of system drive

ESD partition contents

Grub2 Configuration file:

#
# 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,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  24989abc-3526-4933-a477-493a0dd822b4
else
  search --no-floppy --fs-uuid --set=root 24989abc-3526-4933-a477-493a0dd822b4
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=en_US
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=hidden
    set timeout=0
  # Fallback hidden-timeout code in case the timeout_style feature is
  # unavailable.
  elif sleep --interruptible 0 ; then
    set timeout=0
  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-24989abc-3526-4933-a477-493a0dd822b4' {
    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,gpt2'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  24989abc-3526-4933-a477-493a0dd822b4
    else
      search --no-floppy --fs-uuid --set=root 24989abc-3526-4933-a477-493a0dd822b4
    fi
    linux   /boot/vmlinuz-4.10.0-19-generic.efi.signed root=UUID=24989abc-3526-4933-a477-493a0dd822b4 ro  quiet splash $vt_handoff
    initrd  /boot/initrd.img-4.10.0-19-generic
}
submenu 'Advanced options for Ubuntu' $menuentry_id_option 'gnulinux-advanced-24989abc-3526-4933-a477-493a0dd822b4' {
    menuentry 'Ubuntu, with Linux 4.10.0-19-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.10.0-19-generic-advanced-24989abc-3526-4933-a477-493a0dd822b4' {
        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,gpt2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  24989abc-3526-4933-a477-493a0dd822b4
        else
          search --no-floppy --fs-uuid --set=root 24989abc-3526-4933-a477-493a0dd822b4
        fi
        echo    'Loading Linux 4.10.0-19-generic ...'
        linux   /boot/vmlinuz-4.10.0-19-generic.efi.signed root=UUID=24989abc-3526-4933-a477-493a0dd822b4 ro  quiet splash $vt_handoff
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-4.10.0-19-generic
    }
    menuentry 'Ubuntu, with Linux 4.10.0-19-generic (upstart)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.10.0-19-generic-init-upstart-24989abc-3526-4933-a477-493a0dd822b4' {
        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,gpt2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  24989abc-3526-4933-a477-493a0dd822b4
        else
          search --no-floppy --fs-uuid --set=root 24989abc-3526-4933-a477-493a0dd822b4
        fi
        echo    'Loading Linux 4.10.0-19-generic ...'
        linux   /boot/vmlinuz-4.10.0-19-generic.efi.signed root=UUID=24989abc-3526-4933-a477-493a0dd822b4 ro  quiet splash $vt_handoff init=/sbin/upstart
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-4.10.0-19-generic
    }
    menuentry 'Ubuntu, with Linux 4.10.0-19-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.10.0-19-generic-recovery-24989abc-3526-4933-a477-493a0dd822b4' {
        recordfail
        load_video
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  24989abc-3526-4933-a477-493a0dd822b4
        else
          search --no-floppy --fs-uuid --set=root 24989abc-3526-4933-a477-493a0dd822b4
        fi
        echo    'Loading Linux 4.10.0-19-generic ...'
        linux   /boot/vmlinuz-4.10.0-19-generic.efi.signed root=UUID=24989abc-3526-4933-a477-493a0dd822b4 ro recovery nomodeset 
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-4.10.0-19-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 ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
### 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

This is a tardy update relating to this boot problem. I have taken the following steps to try and get more information about the problem:

  • Clear all partitions from /dev/sda
  • Zero the entire physical disk with dd
  • Install one of the following Ubuntu configurations on a GPT partitioned disk with a ESD partition as the first partition on the disk:
    • LVM system volume
    • Normal system with separate boot partition
    • Normal system - no separate boot partition
    • Repeat for each configuration

Early in this process the boot sympton changed from getting a blank screen before Grub appeared to the EFI firmware trying each boot possibility in turn ending with an attempted network boot without finding a bootable source.

If my LiveUsb stick was not present it would go through the entire boot order winding up with a failure at the network boot option. If my LivUsb stick was present it could always boot to it (it is second in the boot order). Thus it appears that something is making the firmware think that the Ubuntu entry is not bootable but no messages appear to help understand why it is not bootable. I have also tried the recommended repair from boot-repair without success. I have done extensive manual checking as well and everything appears to be OK.

You can access the latest boot repair report at www.pastebin.com/1qvuy647. Any suggestions on what I should do next?

Jonathan
  • 1,280
  • How far does your boot process proceed? It's unclear if GRUB even appears. (You first say it doesn't appear, but then you refer to adding a nomodeset option, which suggests it did appear.) See https://askubuntu.com/questions/162075/my-computer-boots-to-a-black-screen-what-options-do-i-have-to-fix-it and please run the Boot Repair utility and select the "Create BootInfo Summary" option. (DO NOT click "Recommended Repair," at least not yet!) When asked whether to upload the report, click "Yes," and then post the URL provided here. – Rod Smith Jul 31 '17 at 13:08
  • @Rod Smith The system never gets to display the grub boot screen. I used my LiveUsb to get at grub.cfg on the target system to add nomodeset. I decided that since my system was out of action that I would take the opportunity to improve its' organization by implementing LVM. You caught me in the middle of doing this and I don't have a bootable system at the moment so boot-repair was not helpful. I will advise what happened as soon as I complete the restructuring, including boot-repair if necessary. – Jonathan Jul 31 '17 at 14:42
  • I don't see anything mounted to /. – Pilot6 Aug 09 '17 at 16:32
  • The boot-repair was done on a LiveUsb stick not on the target system. – Jonathan Aug 09 '17 at 19:57

0 Answers0