Trying to terminate efi services again ошибка

Hello la Team,

Après avoir lu de nombreux postes et Googlelisé, je n’arrive pas à résoudre mon problème de «Trying to terminate EFI services again»

(j’ai bien décoché la case Read only de l’image disk et bien saisi mes données PID, VID, MAC1 et SN)

Migration de 5.2 to 6.2

Loader Jun 1.03b (DS3615) avec ou sans le spécial extra.lzma et DSM_DDSM_23739.pat

Matériels : 

— Carte mère MSI HM97M-E35 dernier bios à jour (16-02-2016)

— Processeur i5-4460 3.2 GhZ

— Carte réseau Realtek PCIe GBE Fam / driver : UEFI UNDI Dr v. 2.026 -> est-ce que ce driver est pris en charge ?

De plus je ne vois pas le serveur avec Synology assistant alors que «bilel» avec la même erreur le voit !

Merci d’avance pour votre aide.


Edited November 1, 2018 by maconly34

View previous topic :: View next topic   Author Message Tanktalus
Tux’s lil’ helper
Tux's lil' helper

Joined: 27 Apr 2005
Posts: 85

PostPosted: Mon Mar 03, 2014 4:23 am    Post subject: UEFI, Grub2, «Trying to terminate EFI services again&qu Reply with quote

I’m attempting to get Gentoo installed on my latest machine — this’ll make the fourth or so. But the first with EFI (specifically, UEFI), all the previous ones have been BIOS.

So, after fighting with the system a few different ways, I eventually got grub2 to boot. I did this by using sysrescuecd and some help on IRC.

However, I’m doing something wrong still. Because grub offers me the choice to load the kernel, and, when I select it, all I get is «Trying to terminate EFI services again.» Nothing else seems to happen.

No amount of googling has seemed to help, so I’m hoping someone here will have an idea.

Code:
root@sysresccd /boot/grub % parted /dev/sda

GNU Parted 3.1

Using /dev/sda

Welcome to GNU Parted! Type ‘help’ to view a list of commands.

(parted) print                                                           

Model: ATA Samsung SSD 840 (scsi)

Disk /dev/sda: 256GB

Sector size (logical/physical): 512B/512B

Partition Table: gpt

Disk Flags:

Number  Start   End     Size    File system  Name                 Flags

 1      1049kB  2097kB  1049kB  fat32        BIOS boot partition  bios_grub

 2      2097kB  212MB   210MB   fat32        EFI System           boot

 3      212MB   256GB   256GB   ext4         Linux filesystem

And …

Code:
root@sysresccd /boot/grub % parted /dev/sdb

GNU Parted 3.1

Using /dev/sdb

Welcome to GNU Parted! Type ‘help’ to view a list of commands.

(parted) print                                                           

Model: ATA ST2000DM001-1CH1 (scsi)

Disk /dev/sdb: 2000GB

Sector size (logical/physical): 512B/4096B

Partition Table: gpt

Disk Flags:

Number  Start   End     Size    File system     Name     Flags

 1      1049kB  34.4GB  34.4GB  linux-swap(v1)  swap

 2      34.4GB  2000GB  1966GB  ext4            disk1fs

I haven’t done anything with /dev/sda1, the EFI stuff is in /dev/sda2, which is supposed to eventually mount on /boot. Root is /dev/sda3, and /usr/portage and various other (bigger, less-frequently-accessed) things are found on /dev/sdb2.

Kernel settings:

Code:
(chroot) sysresccd linux-3.13.5-gentoo # grep EFI .config

CONFIG_EFI_PARTITION=y

CONFIG_EFI=y

# CONFIG_EFI_STUB is not set

CONFIG_FB_EFI=y

# EFI (Extensible Firmware Interface) Support

CONFIG_EFI_VARS=y

CONFIG_EFI_VARS_PSTORE=y

CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE=y

CONFIG_EFIVAR_FS=y

# CONFIG_EARLY_PRINTK_EFI is not set

Any advice would be appreciated. I’ve been beating my head against this for a while now, just to get grub to come up.

Back to top

View user's profile Send private message

SirRobin2318
Apprentice
Apprentice

Joined: 24 Apr 2004
Posts: 241
Location: Strasbourg, france.

PostPosted: Mon Mar 03, 2014 10:29 am    Post subject: Reply with quote

Not sure if it’s related, but why do you have a bios_grub partition? When booting on EFI, all of grub’s config & files should be on the EFI partition.

This is what I have:

Code:
Number  Start   End     Size    File system     Name     Flags

 1      1049kB  211MB   210MB   fat16           primary  boot

 2      211MB   4506MB  4295MB  linux-swap(v1)  primary

 3      4506MB  256GB   252GB   ext4            primary

And I mount /dev/sda1 /boot/efi on my root.

Back to top

View user's profile Send private message

Tanktalus
Tux’s lil’ helper
Tux's lil' helper

Joined: 27 Apr 2005
Posts: 85

PostPosted: Mon Mar 03, 2014 2:08 pm    Post subject: Reply with quote

The bios_grub partition was just because I had so many problems getting grub to install and boot — at one point grub said it didn’t have enough space or something, so I repartitioned it just in case. Maybe it’s not required, but it’s only an extra meg, so, unless it’s preventing me from continuing, I’d rather just leave it :)

grub2-mkconfig seems to have figured out the appropriate root partition, if I’m reading its output grub.cfg properly, I’m just not sure if I am making it that far.

The grub2 on the sysrescuecd is working, so I’m pretty sure it’s just me not doing something right.

Back to top

View user's profile Send private message

SirRobin2318
Apprentice
Apprentice

Joined: 24 Apr 2004
Posts: 241
Location: Strasbourg, france.

PostPosted: Mon Mar 03, 2014 2:19 pm    Post subject: Reply with quote

Did you this:

Code:
grub-mkimage -O x86_64-efi

To install grub?

Was /dev/sda2 mounted to /boot/efi at the time?

Back to top

View user's profile Send private message

Tanktalus
Tux’s lil’ helper
Tux's lil' helper

Joined: 27 Apr 2005
Posts: 85

PostPosted: Mon Mar 03, 2014 4:23 pm    Post subject: Reply with quote

No, I used grub2-install:

Code:
grub2-install /dev/sda —target=x86_64-efi —efi-directory=/boot —boot-directory=/boot

I had originally put in an —efi-directory of /boot/efi, but that didn’t want to work (grub wouldn’t even come up), so I switched to this and now at least grub comes up.

I’ve mounted /dev/sda2 at /boot, not /boot/efi, though I suppose I could move it down and put the rest of grub in /dev/sda3.

Back to top

View user's profile Send private message

SirRobin2318
Apprentice
Apprentice

Joined: 24 Apr 2004
Posts: 241
Location: Strasbourg, france.

PostPosted: Mon Mar 03, 2014 4:31 pm    Post subject: Reply with quote

Quote:
I’ve mounted /dev/sda2 at /boot, not /boot/efi, though I suppose I could move it down and put the rest of grub in /dev/sda3.

Give it a try. The only thing I can tell you is that’s what I’ve got, and it’s working.

This website helped me a lot setting grub up: http://www.rodsbooks.com/linux-uefi/

Back to top

View user's profile Send private message

SirRobin2318
Apprentice
Apprentice

Joined: 24 Apr 2004
Posts: 241
Location: Strasbourg, france.

PostPosted: Mon Mar 03, 2014 4:48 pm    Post subject: Reply with quote

OK, I just did something reeeally clever:

1/ log in as root, because that’s the account I used when I installed gentoo.

2/ Ctrl-r grub2 to check what command I used to install grub.

3/ Out of habit, press enter.

4/ Panic and hit ctrl-c

5/ «I wonder if it had time to squash my grub, let’s reboot and check»

… it had time to corrupt it, yeah :)

So I can confirm that on my system, with /dev/sda1 (sda2 for you) mounted on /boot/efi, the following command installs grub correctly:

Code:
 grub2-install —target=x86_64-efi /dev/sda

Try that instead of specifying efi & boot directories.

Back to top

View user's profile Send private message

Tanktalus
Tux’s lil’ helper
Tux's lil' helper

Joined: 27 Apr 2005
Posts: 85

PostPosted: Mon Mar 03, 2014 5:30 pm    Post subject: Reply with quote

grub2-mkimage seems to just create the .efi file — to stdout. So I’d have to figure out where to put it. And I think that’s what grub2-install does :) The info page for grub-install (not grub2-install, I just found out) indicates this.

As to without the extra install options?

Code:
(chroot) sysresccd linux-3.13.5-gentoo # grub2-install —target=x86_64-efi /dev/sda

EFI distributor id isn’t specified.

I put in the extra options which got rid of the warning here. I’m not sure if there’s a better way.

Is your /boot then part of your root filesystem (/dev/sda3 in your case)? And then /boot/grub is on your ext4 filesystem?

Back to top

View user's profile Send private message

SirRobin2318
Apprentice
Apprentice

Joined: 24 Apr 2004
Posts: 241
Location: Strasbourg, france.

PostPosted: Mon Mar 03, 2014 5:54 pm    Post subject: Reply with quote

Quote:
Is your /boot then part of your root filesystem (/dev/sda3 in your case)? And then /boot/grub is on your ext4 filesystem?

That is correct (colonel O’Neil). /boot/grub, /boot/kernel-… all on the root system.

And you were right about image vs install, I used install as well.

Back to top

View user's profile Send private message

ulenrich
Veteran
Veteran

Joined: 10 Oct 2010
Posts: 1473

PostPosted: Mon Mar 03, 2014 6:25 pm    Post subject: Reply with quote

SirRobin2318 wrote:
Quote:
Is your /boot then part of your root filesystem (/dev/sda3 in your case)? And then /boot/grub is on your ext4 filesystem?

That is correct (colonel O’Neil). /boot/grub, /boot/kernel-… all on the root system.

Efi specifications only guarantee loading from a EFI-fat partition.

Back to top

View user's profile Send private message

SirRobin2318
Apprentice
Apprentice

Joined: 24 Apr 2004
Posts: 241
Location: Strasbourg, france.

PostPosted: Mon Mar 03, 2014 6:41 pm    Post subject: Reply with quote

Quote:
Efi specifications only guarantee loading from a EFI-fat partition.

Yeah, for loading grub. Which installs in /dev/sda2 (on Tanktalus’ system, the fat partition). But once grub is loaded, it’ll boot your kernel from an ext partition, that’s its job.

Back to top

View user's profile Send private message

Tanktalus
Tux’s lil’ helper
Tux's lil' helper

Joined: 27 Apr 2005
Posts: 85

Back to top

View user's profile Send private message

SirRobin2318
Apprentice
Apprentice

Joined: 24 Apr 2004
Posts: 241
Location: Strasbourg, france.

Back to top

View user's profile Send private message

Tanktalus
Tux’s lil’ helper
Tux's lil' helper

Joined: 27 Apr 2005
Posts: 85

PostPosted: Tue Mar 04, 2014 1:54 pm    Post subject: Reply with quote

Technically, it’s /boot/grub/grub.cfg, but I get what you mean. I see a reference to grubenv — it’s effectively empty (just a bunch of #s)

Did I re-run -install and -mkconfig? Yes, since if I hadn’t, I doubt that I would have even gotten grub itself to come up with the correct choices. However, I did — it just won’t load the kernel. This could be a problem with the kernel? I don’t know, though given that the string that’s showing up is found in the grub code and not the kernel code, I would expect it’s in grub.

Code:
#

# DO NOT EDIT THIS FILE

#

# It is automatically generated by grub2-mkconfig using templates

# from /etc/grub.d and settings from /etc/default/grub

#

### BEGIN /etc/grub.d/00_header ###

if [ -s $prefix/grubenv ]; then

  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 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

}

terminal_input console

terminal_output console

if sleep —interruptible 0 ; then

  set timeout=10

fi

### END /etc/grub.d/00_header ###

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

menuentry ‘Gentoo GNU/Linux’ —class gentoo —class gnu-linux —class gnu —class os $menuentry_id_option ‘gnulinux-simple-99da9572-003e-4559-adc6-51d5b9f7c811’ {

   load_video

   insmod gzio

   insmod part_gpt

   insmod ext2

   set root=’hd0,gpt3′

   if [ x$feature_platform_search_hint = xy ]; then

     search —no-floppy —fs-uuid —set=root —hint-bios=hd0,gpt3 —hint-efi=hd0,gpt3 —hint-baremetal=ahci0,gpt3  99da9572-003e-4559-adc6-51d5b9f7c811

   else

     search —no-floppy —fs-uuid —set=root 99da9572-003e-4559-adc6-51d5b9f7c811

   fi

   echo   ‘Loading Linux 3.13.5 …’

   linux   /boot/kernel-3.13.5 root=/dev/sda3 ro 

}

submenu ‘Advanced options for Gentoo GNU/Linux’ $menuentry_id_option ‘gnulinux-advanced-99da9572-003e-4559-adc6-51d5b9f7c811’ {

   menuentry ‘Gentoo GNU/Linux, with Linux 3.13.5’ —class gentoo —class gnu-linux —class gnu —class os $menuentry_id_option ‘gnulinux-3.13.5-advanced-99da9572-003e-4559-adc6-51d5b9f7c811’ {

      load_video

      insmod gzio

      insmod part_gpt

      insmod ext2

      set root=’hd0,gpt3′

      if [ x$feature_platform_search_hint = xy ]; then

        search —no-floppy —fs-uuid —set=root —hint-bios=hd0,gpt3 —hint-efi=hd0,gpt3 —hint-baremetal=ahci0,gpt3  99da9572-003e-4559-adc6-51d5b9f7c811

      else

        search —no-floppy —fs-uuid —set=root 99da9572-003e-4559-adc6-51d5b9f7c811

      fi

      echo   ‘Loading Linux 3.13.5 …’

      linux   /boot/kernel-3.13.5 root=/dev/sda3 ro 

   }

   menuentry ‘Gentoo GNU/Linux, with Linux 3.13.5 (recovery mode)’ —class gentoo —class gnu-linux —class gnu —class os $menuentry_id_option ‘gnulinux-3.13.5-recovery-99da9572-003e-4559-adc6-51d5b9f7c811’ {

      load_video

      insmod gzio

      insmod part_gpt

      insmod ext2

      set root=’hd0,gpt3′

      if [ x$feature_platform_search_hint = xy ]; then

        search —no-floppy —fs-uuid —set=root —hint-bios=hd0,gpt3 —hint-efi=hd0,gpt3 —hint-baremetal=ahci0,gpt3  99da9572-003e-4559-adc6-51d5b9f7c811

      else

        search —no-floppy —fs-uuid —set=root 99da9572-003e-4559-adc6-51d5b9f7c811

      fi

      echo   ‘Loading Linux 3.13.5 …’

      linux   /boot/kernel-3.13.5 root=/dev/sda3 ro single

   }

}

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

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

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

### BEGIN /etc/grub.d/30_os-prober ###

### END /etc/grub.d/30_os-prober ###

### 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 ###

My build flags for grub:

Code:
[ebuild   R    ] sys-boot/grub-2.00_p5107-r2:2  USE=»efiemu multislot nls sdl truetype -custom-cflags -debug -device-mapper -doc (-libzfs) -mount -static {-test}» GRUB_PLATFORMS=»efi-64 emu pc -coreboot -efi-32 -ieee1275 -multiboot -qemu -qemu-mips -yeeloong» 0 kB

Back to top

View user's profile Send private message

DONAHUE
Watchman
Watchman

Joined: 09 Dec 2006
Posts: 7644
Location: Goose Creek SC

PostPosted: Tue Mar 04, 2014 3:32 pm    Post subject: Reply with quote

Have you considered avoiding using grub2?

http://wiki.gentoo.org/wiki/EFI_stub_kernel
_________________
Defund the FCC.

Back to top

View user's profile Send private message

SirRobin2318
Apprentice
Apprentice

Joined: 24 Apr 2004
Posts: 241
Location: Strasbourg, france.

PostPosted: Tue Mar 04, 2014 4:37 pm    Post subject: Reply with quote

Yeah, we have basically the same thing.

What I don’t get, is that you’re past the hardest part, getting into grub. From then on it should be easier…

What motherboard does your system have? maybe something will come up in google?

In the mean time, I checked your USE flags, I don’t have -efiemu. You could try without it.

Back to top

View user's profile Send private message

Logicien
Veteran
Veteran

Joined: 16 Sep 2005
Posts: 1506
Location: Montréal

PostPosted: Tue Mar 04, 2014 7:52 pm    Post subject: Reply with quote

This /etc/portage/make.conf variable can be the culprit even if it have what’s seem to be a normal value

Code:
GRUB_PLATFORMS=»efi-64 emu pc -coreboot -efi-32 -ieee1275 -multiboot -qemu -qemu-mips -yeeloong»

I use only

Code:
GRUB_PLATFORMS=»efi-64″

and Grub2 work perfectly in UEFI mode on my HP Pavilion g6 Notebook PC.

These are my USE flags:

Code:
equery u grub

[ Legend : U — final flag setting for installation]

[        : I — package is installed with flag     ]

[ Colors : set, unset                             ]

 * Found these USE flags for sys-boot/grub-2.00_p5107-r2:

 U I

 — — custom-cflags            : Build with user-specified CFLAGS (unsupported)

 — — debug                    : Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see http://www.gentoo.org/proj/en/qa/backtraces.xml

 — — device-mapper            : Enable support for device-mapper from sys-fs/lvm2

 — — doc                      : Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally

 — — efiemu                   : Build and install the efiemu runtimes

 — — grub_platforms_coreboot  : Coreboot platform support

 — — grub_platforms_efi-32    : EFI 32 bit platform support (Old MACs)

 + + grub_platforms_efi-64    : EFI 64 bit platform support

 — — grub_platforms_emu       : Emulation platform support

 — — grub_platforms_ieee1275  : IEEE1275 pltaform support

 — — grub_platforms_multiboot : Multiboot platform support

 — — grub_platforms_pc        : PC platform suppport

 — — grub_platforms_qemu      : QEMU platform support

 — — grub_platforms_qemu-mips : QEMU MIPS platform support

 — — grub_platforms_yeeloong  : YEEELONG MIPS platform support

 — — mount                    : Build and install the grub-mount utility

 + + multislot                : Allow concurrent installation of sys-boot/grub:0 and sys-boot/grub:2 by renaming all programs.

 + + nls                      : Add Native Language Support (using gettext — GNU locale utilities)

 + + sdl                      : Add support for Simple Direct Layer (media library)

 — — static                   : !!do not set this during bootstrap!! Causes binaries to be statically linked instead of dynamically

 — — test                     : Workaround to pull in packages needed to run with FEATURES=test. Portage-2.1.2 handles this internally, so don’t set it in make.conf/package.use anymore

 + + truetype                 : Add support for FreeType and/or FreeType2 fonts

The efiemu USE flag is off. So, give a try to reemerge Grub2 with this new make.conf GRUB_PLATFORMS value and USE flags and réinstall it with grub-install. It can change something.
_________________
Paul

Back to top

View user's profile Send private message

Tanktalus
Tux’s lil’ helper
Tux's lil' helper

Joined: 27 Apr 2005
Posts: 85

PostPosted: Tue Mar 04, 2014 9:47 pm    Post subject: Reply with quote

gah!

Ok, I’ve done the above. Still no change — still getting «Trying to terminate EFI services again.»

However I just figured something out. It *IS* booting. Darned fast, too, I might add, but that’s likely something to do with the fact that it has nothing to boot.

It just isn’t displaying anything on the screen. I can ssh in just fine.

Am I missing something video related?

Back to top

View user's profile Send private message

SirRobin2318
Apprentice
Apprentice

Joined: 24 Apr 2004
Posts: 241
Location: Strasbourg, france.

PostPosted: Tue Mar 04, 2014 10:36 pm    Post subject: Reply with quote

:D well, that was fun.

Well it seems it would be a kernel issue then. The «Trying to terminate EFI services again.» does seem to be grub related though.

Just to rule out a efi problem coming from the kernel, I have the following activated:

Code:
CONFIG_EFI_PARTITION=y

CONFIG_EFI=y

CONFIG_EFI_STUB=y

CONFIG_FB_EFI=y

# EFI (Extensible Firmware Interface) Support

CONFIG_EFI_VARS=y

CONFIG_EFIVAR_FS=y

But I’m guessing it’s more framebuffer related… Time for bed for me, I’ll see what I can find tomorrow.

Back to top

View user's profile Send private message

srs5694
Guru
Guru

Joined: 08 Mar 2004
Posts: 434
Location: Woonsocket, RI

PostPosted: Wed Mar 05, 2014 1:03 am    Post subject: Reply with quote

DONAHUE wrote:
Have you considered avoiding using grub2?

http://wiki.gentoo.org/wiki/EFI_stub_kernel

I’d phrase this as a recommendation, not a question. I’ve tried every EFI boot loader for Linux in existence (or at least, all of them that I know of), and in my experience, GRUB 2 is the most difficult to configure by hand and the least reliable. It’s not all that bad on Fedora, Ubuntu, OpenSUSE, and other distributions that provide pre-built binaries and a mound of well-tested scripts to configure everything so that it works; but Gentoo expects end users to build the binaries and do more in the way of manual configuration. These tasks are where GRUB 2 falls flat on its face, taking you down with it. Those other distributions typically use GRUB because it supports a wide variety of platforms (both firmware type and CPU), and has options to handle every contingency; but a Gentoo user doesn’t need such a wide range of options. Instead, a Gentoo user can pick a boot loader that does the job on one system and forget about the cases that don’t matter on that system. Thus, for Gentoo, GRUB 2 is a poor choice for a boot loader, particular under EFI. (Note there’s no «IMHO» in that sentence.)

To learn what’s available, see my Web page on the subject. As a quick highlight, I agree with DONAHUE that the EFI stub loader is a good choice, particularly when paired with gummiboot or my own rEFInd. (Using the EFI stub loader directly is possible, but you’ll give up flexibility and, paradoxically, it will become harder to configure compared to use it with gummiboot, or especially with rEFInd.) ELILO, although no longer under rapid development, remains reliable and is much easier to configure than GRUB 2. ELILO is fine by itself on a Linux-only system, but you’ll need to pair it with something else if you’re installing in a dual-boot configuration. If you’re comfortable with LILO on a BIOS-based computer, you’ll find ELILO quite familiar.

Back to top

View user's profile Send private message

vaxbrat
l33t
l33t

Joined: 05 Oct 2005
Posts: 731
Location: DC Burbs

PostPosted: Wed Mar 05, 2014 4:44 am    Post subject: Partitioning scheme? Reply with quote

Check the partitioning scheme here in my wiki entry maybe? I get this to work on a mirror set with /boot formatted as btrfs. It should work for ext4 I bet:

http://wiki.gentoo.org/wiki/Btrfs_native_system_root

Back to top

View user's profile Send private message

SirRobin2318
Apprentice
Apprentice

Joined: 24 Apr 2004
Posts: 241
Location: Strasbourg, france.

PostPosted: Wed Mar 05, 2014 3:41 pm    Post subject: Reply with quote

Manually edit your /boot/grub/grub.cfg, under each line that reads

add:

Code:
set gfxpayload=keep

If that works we’ll find a way to make mkconfig generate it correctly.

Back to top

View user's profile Send private message

Display posts from previous:   

View previous topic :: View next topic  
Author Message
Tanktalus
Tux’s lil’ helper
Tux's lil' helper

Joined: 27 Apr 2005
Posts: 85

PostPosted: Mon Mar 03, 2014 4:23 am    Post subject: UEFI, Grub2, «Trying to terminate EFI services again&qu Reply with quote

I’m attempting to get Gentoo installed on my latest machine — this’ll make the fourth or so. But the first with EFI (specifically, UEFI), all the previous ones have been BIOS.

So, after fighting with the system a few different ways, I eventually got grub2 to boot. I did this by using sysrescuecd and some help on IRC.

However, I’m doing something wrong still. Because grub offers me the choice to load the kernel, and, when I select it, all I get is «Trying to terminate EFI services again.» Nothing else seems to happen.

No amount of googling has seemed to help, so I’m hoping someone here will have an idea.

Code:
root@sysresccd /boot/grub % parted /dev/sda

GNU Parted 3.1

Using /dev/sda

Welcome to GNU Parted! Type ‘help’ to view a list of commands.

(parted) print                                                           

Model: ATA Samsung SSD 840 (scsi)

Disk /dev/sda: 256GB

Sector size (logical/physical): 512B/512B

Partition Table: gpt

Disk Flags:

Number  Start   End     Size    File system  Name                 Flags

 1      1049kB  2097kB  1049kB  fat32        BIOS boot partition  bios_grub

 2      2097kB  212MB   210MB   fat32        EFI System           boot

 3      212MB   256GB   256GB   ext4         Linux filesystem

And …

Code:
root@sysresccd /boot/grub % parted /dev/sdb

GNU Parted 3.1

Using /dev/sdb

Welcome to GNU Parted! Type ‘help’ to view a list of commands.

(parted) print                                                           

Model: ATA ST2000DM001-1CH1 (scsi)

Disk /dev/sdb: 2000GB

Sector size (logical/physical): 512B/4096B

Partition Table: gpt

Disk Flags:

Number  Start   End     Size    File system     Name     Flags

 1      1049kB  34.4GB  34.4GB  linux-swap(v1)  swap

 2      34.4GB  2000GB  1966GB  ext4            disk1fs

I haven’t done anything with /dev/sda1, the EFI stuff is in /dev/sda2, which is supposed to eventually mount on /boot. Root is /dev/sda3, and /usr/portage and various other (bigger, less-frequently-accessed) things are found on /dev/sdb2.

Kernel settings:

Code:
(chroot) sysresccd linux-3.13.5-gentoo # grep EFI .config

CONFIG_EFI_PARTITION=y

CONFIG_EFI=y

# CONFIG_EFI_STUB is not set

CONFIG_FB_EFI=y

# EFI (Extensible Firmware Interface) Support

CONFIG_EFI_VARS=y

CONFIG_EFI_VARS_PSTORE=y

CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE=y

CONFIG_EFIVAR_FS=y

# CONFIG_EARLY_PRINTK_EFI is not set

Any advice would be appreciated. I’ve been beating my head against this for a while now, just to get grub to come up.

Back to top

View user's profile Send private message

SirRobin2318
Apprentice
Apprentice

Joined: 24 Apr 2004
Posts: 241
Location: Strasbourg, france.

PostPosted: Mon Mar 03, 2014 10:29 am    Post subject: Reply with quote

Not sure if it’s related, but why do you have a bios_grub partition? When booting on EFI, all of grub’s config & files should be on the EFI partition.

This is what I have:

Code:
Number  Start   End     Size    File system     Name     Flags

 1      1049kB  211MB   210MB   fat16           primary  boot

 2      211MB   4506MB  4295MB  linux-swap(v1)  primary

 3      4506MB  256GB   252GB   ext4            primary

And I mount /dev/sda1 /boot/efi on my root.

Back to top

View user's profile Send private message

Tanktalus
Tux’s lil’ helper
Tux's lil' helper

Joined: 27 Apr 2005
Posts: 85

PostPosted: Mon Mar 03, 2014 2:08 pm    Post subject: Reply with quote

The bios_grub partition was just because I had so many problems getting grub to install and boot — at one point grub said it didn’t have enough space or something, so I repartitioned it just in case. Maybe it’s not required, but it’s only an extra meg, so, unless it’s preventing me from continuing, I’d rather just leave it :)

grub2-mkconfig seems to have figured out the appropriate root partition, if I’m reading its output grub.cfg properly, I’m just not sure if I am making it that far.

The grub2 on the sysrescuecd is working, so I’m pretty sure it’s just me not doing something right.

Back to top

View user's profile Send private message

SirRobin2318
Apprentice
Apprentice

Joined: 24 Apr 2004
Posts: 241
Location: Strasbourg, france.

PostPosted: Mon Mar 03, 2014 2:19 pm    Post subject: Reply with quote

Did you this:

Code:
grub-mkimage -O x86_64-efi



To install grub?

Was /dev/sda2 mounted to /boot/efi at the time?

Back to top

View user's profile Send private message

Tanktalus
Tux’s lil’ helper
Tux's lil' helper

Joined: 27 Apr 2005
Posts: 85

PostPosted: Mon Mar 03, 2014 4:23 pm    Post subject: Reply with quote

No, I used grub2-install:

Code:
grub2-install /dev/sda —target=x86_64-efi —efi-directory=/boot —boot-directory=/boot

I had originally put in an —efi-directory of /boot/efi, but that didn’t want to work (grub wouldn’t even come up), so I switched to this and now at least grub comes up.

I’ve mounted /dev/sda2 at /boot, not /boot/efi, though I suppose I could move it down and put the rest of grub in /dev/sda3.

Back to top

View user's profile Send private message

SirRobin2318
Apprentice
Apprentice

Joined: 24 Apr 2004
Posts: 241
Location: Strasbourg, france.

PostPosted: Mon Mar 03, 2014 4:31 pm    Post subject: Reply with quote

Quote:
I’ve mounted /dev/sda2 at /boot, not /boot/efi, though I suppose I could move it down and put the rest of grub in /dev/sda3.



Give it a try. The only thing I can tell you is that’s what I’ve got, and it’s working.

This website helped me a lot setting grub up: http://www.rodsbooks.com/linux-uefi/

Back to top

View user's profile Send private message

SirRobin2318
Apprentice
Apprentice

Joined: 24 Apr 2004
Posts: 241
Location: Strasbourg, france.

PostPosted: Mon Mar 03, 2014 4:48 pm    Post subject: Reply with quote

OK, I just did something reeeally clever:

1/ log in as root, because that’s the account I used when I installed gentoo.

2/ Ctrl-r grub2 to check what command I used to install grub.

3/ Out of habit, press enter.

4/ Panic and hit ctrl-c

5/ «I wonder if it had time to squash my grub, let’s reboot and check»

… it had time to corrupt it, yeah :)

So I can confirm that on my system, with /dev/sda1 (sda2 for you) mounted on /boot/efi, the following command installs grub correctly:

Code:
 grub2-install —target=x86_64-efi /dev/sda

Try that instead of specifying efi & boot directories.

Back to top

View user's profile Send private message

Tanktalus
Tux’s lil’ helper
Tux's lil' helper

Joined: 27 Apr 2005
Posts: 85

PostPosted: Mon Mar 03, 2014 5:30 pm    Post subject: Reply with quote

grub2-mkimage seems to just create the .efi file — to stdout. So I’d have to figure out where to put it. And I think that’s what grub2-install does :) The info page for grub-install (not grub2-install, I just found out) indicates this.

As to without the extra install options?

Code:
(chroot) sysresccd linux-3.13.5-gentoo # grub2-install —target=x86_64-efi /dev/sda

EFI distributor id isn’t specified.

I put in the extra options which got rid of the warning here. I’m not sure if there’s a better way.

Is your /boot then part of your root filesystem (/dev/sda3 in your case)? And then /boot/grub is on your ext4 filesystem?

Back to top

View user's profile Send private message

SirRobin2318
Apprentice
Apprentice

Joined: 24 Apr 2004
Posts: 241
Location: Strasbourg, france.

PostPosted: Mon Mar 03, 2014 5:54 pm    Post subject: Reply with quote

Quote:
Is your /boot then part of your root filesystem (/dev/sda3 in your case)? And then /boot/grub is on your ext4 filesystem?



That is correct (colonel O’Neil). /boot/grub, /boot/kernel-… all on the root system.

And you were right about image vs install, I used install as well.

Back to top

View user's profile Send private message

ulenrich
Veteran
Veteran

Joined: 10 Oct 2010
Posts: 1480

PostPosted: Mon Mar 03, 2014 6:25 pm    Post subject: Reply with quote

SirRobin2318 wrote:
Quote:
Is your /boot then part of your root filesystem (/dev/sda3 in your case)? And then /boot/grub is on your ext4 filesystem?



That is correct (colonel O’Neil). /boot/grub, /boot/kernel-… all on the root system.



Efi specifications only guarantee loading from a EFI-fat partition.

Back to top

View user's profile Send private message

SirRobin2318
Apprentice
Apprentice

Joined: 24 Apr 2004
Posts: 241
Location: Strasbourg, france.

PostPosted: Mon Mar 03, 2014 6:41 pm    Post subject: Reply with quote

Quote:
Efi specifications only guarantee loading from a EFI-fat partition.



Yeah, for loading grub. Which installs in /dev/sda2 (on Tanktalus’ system, the fat partition). But once grub is loaded, it’ll boot your kernel from an ext partition, that’s its job.

Back to top

View user's profile Send private message

Tanktalus
Tux’s lil’ helper
Tux's lil' helper

Joined: 27 Apr 2005
Posts: 85

PostPosted: Mon Mar 03, 2014 10:29 pm    Post subject: Reply with quote

Ok, having moved things around a bit — so /dev/sda2 -> /boot/efi — I get exactly as far. Grub comes up, but just says «Trying to terminate EFI services again.» and stops (the hard disk seems to be going, but nothing shows up on the console).
Back to top

View user's profile Send private message

SirRobin2318
Apprentice
Apprentice

Joined: 24 Apr 2004
Posts: 241
Location: Strasbourg, france.

PostPosted: Tue Mar 04, 2014 8:44 am    Post subject: Reply with quote

Ok, could I see your /boot/grub.cfg? I’ll diff it with mine see if I see something strange pop up. You did run mkconfig after mkinstall?
Back to top

View user's profile Send private message

Tanktalus
Tux’s lil’ helper
Tux's lil' helper

Joined: 27 Apr 2005
Posts: 85

PostPosted: Tue Mar 04, 2014 1:54 pm    Post subject: Reply with quote

Technically, it’s /boot/grub/grub.cfg, but I get what you mean. I see a reference to grubenv — it’s effectively empty (just a bunch of #s)

Did I re-run -install and -mkconfig? Yes, since if I hadn’t, I doubt that I would have even gotten grub itself to come up with the correct choices. However, I did — it just won’t load the kernel. This could be a problem with the kernel? I don’t know, though given that the string that’s showing up is found in the grub code and not the kernel code, I would expect it’s in grub.

Code:
#

# DO NOT EDIT THIS FILE

#

# It is automatically generated by grub2-mkconfig using templates

# from /etc/grub.d and settings from /etc/default/grub

#

### BEGIN /etc/grub.d/00_header ###

if [ -s $prefix/grubenv ]; then

  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 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

}

terminal_input console

terminal_output console

if sleep —interruptible 0 ; then

  set timeout=10

fi

### END /etc/grub.d/00_header ###

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

menuentry ‘Gentoo GNU/Linux’ —class gentoo —class gnu-linux —class gnu —class os $menuentry_id_option ‘gnulinux-simple-99da9572-003e-4559-adc6-51d5b9f7c811’ {

   load_video

   insmod gzio

   insmod part_gpt

   insmod ext2

   set root=’hd0,gpt3′

   if [ x$feature_platform_search_hint = xy ]; then

     search —no-floppy —fs-uuid —set=root —hint-bios=hd0,gpt3 —hint-efi=hd0,gpt3 —hint-baremetal=ahci0,gpt3  99da9572-003e-4559-adc6-51d5b9f7c811

   else

     search —no-floppy —fs-uuid —set=root 99da9572-003e-4559-adc6-51d5b9f7c811

   fi

   echo   ‘Loading Linux 3.13.5 …’

   linux   /boot/kernel-3.13.5 root=/dev/sda3 ro 

}

submenu ‘Advanced options for Gentoo GNU/Linux’ $menuentry_id_option ‘gnulinux-advanced-99da9572-003e-4559-adc6-51d5b9f7c811’ {

   menuentry ‘Gentoo GNU/Linux, with Linux 3.13.5’ —class gentoo —class gnu-linux —class gnu —class os $menuentry_id_option ‘gnulinux-3.13.5-advanced-99da9572-003e-4559-adc6-51d5b9f7c811’ {

      load_video

      insmod gzio

      insmod part_gpt

      insmod ext2

      set root=’hd0,gpt3′

      if [ x$feature_platform_search_hint = xy ]; then

        search —no-floppy —fs-uuid —set=root —hint-bios=hd0,gpt3 —hint-efi=hd0,gpt3 —hint-baremetal=ahci0,gpt3  99da9572-003e-4559-adc6-51d5b9f7c811

      else

        search —no-floppy —fs-uuid —set=root 99da9572-003e-4559-adc6-51d5b9f7c811

      fi

      echo   ‘Loading Linux 3.13.5 …’

      linux   /boot/kernel-3.13.5 root=/dev/sda3 ro 

   }

   menuentry ‘Gentoo GNU/Linux, with Linux 3.13.5 (recovery mode)’ —class gentoo —class gnu-linux —class gnu —class os $menuentry_id_option ‘gnulinux-3.13.5-recovery-99da9572-003e-4559-adc6-51d5b9f7c811’ {

      load_video

      insmod gzio

      insmod part_gpt

      insmod ext2

      set root=’hd0,gpt3′

      if [ x$feature_platform_search_hint = xy ]; then

        search —no-floppy —fs-uuid —set=root —hint-bios=hd0,gpt3 —hint-efi=hd0,gpt3 —hint-baremetal=ahci0,gpt3  99da9572-003e-4559-adc6-51d5b9f7c811

      else

        search —no-floppy —fs-uuid —set=root 99da9572-003e-4559-adc6-51d5b9f7c811

      fi

      echo   ‘Loading Linux 3.13.5 …’

      linux   /boot/kernel-3.13.5 root=/dev/sda3 ro single

   }

}

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

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

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

### BEGIN /etc/grub.d/30_os-prober ###

### END /etc/grub.d/30_os-prober ###

### 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 ###

My build flags for grub:

Code:
[ebuild   R    ] sys-boot/grub-2.00_p5107-r2:2  USE=»efiemu multislot nls sdl truetype -custom-cflags -debug -device-mapper -doc (-libzfs) -mount -static {-test}» GRUB_PLATFORMS=»efi-64 emu pc -coreboot -efi-32 -ieee1275 -multiboot -qemu -qemu-mips -yeeloong» 0 kB

Back to top

View user's profile Send private message

DONAHUE
Watchman
Watchman

Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Tue Mar 04, 2014 3:32 pm    Post subject: Reply with quote

Have you considered avoiding using grub2?

http://wiki.gentoo.org/wiki/EFI_stub_kernel
_________________
Defund the FCC.
Back to top

View user's profile Send private message

SirRobin2318
Apprentice
Apprentice

Joined: 24 Apr 2004
Posts: 241
Location: Strasbourg, france.

PostPosted: Tue Mar 04, 2014 4:37 pm    Post subject: Reply with quote

Yeah, we have basically the same thing.

What I don’t get, is that you’re past the hardest part, getting into grub. From then on it should be easier…

What motherboard does your system have? maybe something will come up in google?

In the mean time, I checked your USE flags, I don’t have -efiemu. You could try without it.

Back to top

View user's profile Send private message

Logicien
Veteran
Veteran

Joined: 16 Sep 2005
Posts: 1529
Location: Montréal

PostPosted: Tue Mar 04, 2014 7:52 pm    Post subject: Reply with quote

This /etc/portage/make.conf variable can be the culprit even if it have what’s seem to be a normal value

Code:
GRUB_PLATFORMS=»efi-64 emu pc -coreboot -efi-32 -ieee1275 -multiboot -qemu -qemu-mips -yeeloong»



I use only

Code:
GRUB_PLATFORMS=»efi-64″



and Grub2 work perfectly in UEFI mode on my HP Pavilion g6 Notebook PC.

These are my USE flags:

Code:
equery u grub

[ Legend : U — final flag setting for installation]

[        : I — package is installed with flag     ]

[ Colors : set, unset                             ]

 * Found these USE flags for sys-boot/grub-2.00_p5107-r2:

 U I

 — — custom-cflags            : Build with user-specified CFLAGS (unsupported)

 — — debug                    : Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see http://www.gentoo.org/proj/en/qa/backtraces.xml

 — — device-mapper            : Enable support for device-mapper from sys-fs/lvm2

 — — doc                      : Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally

 — — efiemu                   : Build and install the efiemu runtimes

 — — grub_platforms_coreboot  : Coreboot platform support

 — — grub_platforms_efi-32    : EFI 32 bit platform support (Old MACs)

 + + grub_platforms_efi-64    : EFI 64 bit platform support

 — — grub_platforms_emu       : Emulation platform support

 — — grub_platforms_ieee1275  : IEEE1275 pltaform support

 — — grub_platforms_multiboot : Multiboot platform support

 — — grub_platforms_pc        : PC platform suppport

 — — grub_platforms_qemu      : QEMU platform support

 — — grub_platforms_qemu-mips : QEMU MIPS platform support

 — — grub_platforms_yeeloong  : YEEELONG MIPS platform support

 — — mount                    : Build and install the grub-mount utility

 + + multislot                : Allow concurrent installation of sys-boot/grub:0 and sys-boot/grub:2 by renaming all programs.

 + + nls                      : Add Native Language Support (using gettext — GNU locale utilities)

 + + sdl                      : Add support for Simple Direct Layer (media library)

 — — static                   : !!do not set this during bootstrap!! Causes binaries to be statically linked instead of dynamically

 — — test                     : Workaround to pull in packages needed to run with FEATURES=test. Portage-2.1.2 handles this internally, so don’t set it in make.conf/package.use anymore

 + + truetype                 : Add support for FreeType and/or FreeType2 fonts



The efiemu USE flag is off. So, give a try to reemerge Grub2 with this new make.conf GRUB_PLATFORMS value and USE flags and réinstall it with grub-install. It can change something.
_________________
Paul

Back to top

View user's profile Send private message

Tanktalus
Tux’s lil’ helper
Tux's lil' helper

Joined: 27 Apr 2005
Posts: 85

PostPosted: Tue Mar 04, 2014 9:47 pm    Post subject: Reply with quote

gah!

Ok, I’ve done the above. Still no change — still getting «Trying to terminate EFI services again.»

However I just figured something out. It *IS* booting. Darned fast, too, I might add, but that’s likely something to do with the fact that it has nothing to boot.

It just isn’t displaying anything on the screen. I can ssh in just fine.

Am I missing something video related?

Back to top

View user's profile Send private message

SirRobin2318
Apprentice
Apprentice

Joined: 24 Apr 2004
Posts: 241
Location: Strasbourg, france.

PostPosted: Tue Mar 04, 2014 10:36 pm    Post subject: Reply with quote

:D well, that was fun.

Well it seems it would be a kernel issue then. The «Trying to terminate EFI services again.» does seem to be grub related though.

Just to rule out a efi problem coming from the kernel, I have the following activated:

Code:
CONFIG_EFI_PARTITION=y

CONFIG_EFI=y

CONFIG_EFI_STUB=y

CONFIG_FB_EFI=y

# EFI (Extensible Firmware Interface) Support

CONFIG_EFI_VARS=y

CONFIG_EFIVAR_FS=y

But I’m guessing it’s more framebuffer related… Time for bed for me, I’ll see what I can find tomorrow.

Back to top

View user's profile Send private message

srs5694
Guru
Guru

Joined: 08 Mar 2004
Posts: 434
Location: Woonsocket, RI

PostPosted: Wed Mar 05, 2014 1:03 am    Post subject: Reply with quote

DONAHUE wrote:
Have you considered avoiding using grub2?

http://wiki.gentoo.org/wiki/EFI_stub_kernel

I’d phrase this as a recommendation, not a question. I’ve tried every EFI boot loader for Linux in existence (or at least, all of them that I know of), and in my experience, GRUB 2 is the most difficult to configure by hand and the least reliable. It’s not all that bad on Fedora, Ubuntu, OpenSUSE, and other distributions that provide pre-built binaries and a mound of well-tested scripts to configure everything so that it works; but Gentoo expects end users to build the binaries and do more in the way of manual configuration. These tasks are where GRUB 2 falls flat on its face, taking you down with it. Those other distributions typically use GRUB because it supports a wide variety of platforms (both firmware type and CPU), and has options to handle every contingency; but a Gentoo user doesn’t need such a wide range of options. Instead, a Gentoo user can pick a boot loader that does the job on one system and forget about the cases that don’t matter on that system. Thus, for Gentoo, GRUB 2 is a poor choice for a boot loader, particular under EFI. (Note there’s no «IMHO» in that sentence.)

To learn what’s available, see my Web page on the subject. As a quick highlight, I agree with DONAHUE that the EFI stub loader is a good choice, particularly when paired with gummiboot or my own rEFInd. (Using the EFI stub loader directly is possible, but you’ll give up flexibility and, paradoxically, it will become harder to configure compared to use it with gummiboot, or especially with rEFInd.) ELILO, although no longer under rapid development, remains reliable and is much easier to configure than GRUB 2. ELILO is fine by itself on a Linux-only system, but you’ll need to pair it with something else if you’re installing in a dual-boot configuration. If you’re comfortable with LILO on a BIOS-based computer, you’ll find ELILO quite familiar.

Back to top

View user's profile Send private message

vaxbrat
l33t
l33t

Joined: 05 Oct 2005
Posts: 731
Location: DC Burbs

PostPosted: Wed Mar 05, 2014 4:44 am    Post subject: Partitioning scheme? Reply with quote

Check the partitioning scheme here in my wiki entry maybe? I get this to work on a mirror set with /boot formatted as btrfs. It should work for ext4 I bet:

http://wiki.gentoo.org/wiki/Btrfs_native_system_root

Back to top

View user's profile Send private message

SirRobin2318
Apprentice
Apprentice

Joined: 24 Apr 2004
Posts: 241
Location: Strasbourg, france.

PostPosted: Wed Mar 05, 2014 3:41 pm    Post subject: Reply with quote

Manually edit your /boot/grub/grub.cfg, under each line that reads

Code:
load_video



add:

Code:
set gfxpayload=keep

If that works we’ll find a way to make mkconfig generate it correctly.

Back to top

View user's profile Send private message

Display posts from previous:   

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Hello, forum users!

I’ve recently tried to install Arch on Asus VivoTab Smart ME400C (UEFI without CSM, 32-bit Bay Trail (if I remember correctly)), and it won’t even boot the installation USB without some modifications.
But even these modifications, such as adding Grub2 as $USB/boot/EFI/bootia32.efi (standard path for 32-bit UEFI) I cannot boot Linux properly.

Each time I try to bootstrap kernel as usual, for example:

grub> linux /boot/arch/i686/vmlinuz # some kernel params taken from syslinux archiso config
grub> initrd /boot/arch/i686/archiso.img
grub> boot

This error pops up, and all suddenly stops:

Tried to terminate EFI services again

I experimented, and found that using linux16 doesn’t produce any errors. It produces literally nothing. No kernel, no disk activity, no errors. Nothing.

Attempt to load EFI shell caused black screen and nothing else. Maybe I was impatient, bu I am not sure.
Tails and Ubuntu also weren’t booting when I tried to boot them.

A few days ago my ubuntu 17.04 software updater on a dual boot system with windows 10 ran some automatic updates and prompted a reboot. Ever since, after I select my boot option in GRUB there’s a black pop-up window with the text «trying to terminate EFI services again».

Except for the visual hindrance and taking a few more seconde, booting works fine. However, I’m very curious as to what causes this error and I’d like to fix it. Help or an explanation is very much appreciated.

asked Mar 5, 2018 at 12:43

Pudding's user avatar

2

You must log in to answer this question.

Browse other questions tagged

.

Adam Kearn

unread,

Jul 1, 2018, 11:32:06 PM7/1/18

to Chromium OS Development

Whenever I try to boot my image I always get this screen

«Trying to terminate EFI services again»

What do you think is happing??

Thanks

-Adam 

Carmelo Carbonara

unread,

Aug 14, 2018, 9:36:16 AM8/14/18

to Chromium OS Development

assuming everything is correct…

..if you’re booting unverified UEFI image A try adding 

earlyprintk=efi

to your bootparam kernel commandline

this probably won’t work with grub without updating grub.

…or whatever kernel version you’re using

Adam Kearn

unread,

Aug 15, 2018, 1:12:02 AM8/15/18

to Chromium OS Development

Hey, Carmelo

Thanks for your reply.  I’m just waiting for my VM to finish building.

But I will try out your suggestion as soon as it has done.

It looks like it’s building an image using the 4_4 kernel (top line)  will those bootparam’s still work? 

Captureadfadf.PNG

Carmelo Carbonara

unread,

Aug 15, 2018, 2:51:05 AM8/15/18

to Chromium OS Development

I don’t think it will.. regardless of the kernel version but you can try it and see. I had to go right to 4.14 because of my hardware but I also had to modify the kernel config and some other stuff

I just tried on a plain vanilla stick and (kernel 4.4.6X) and it hangs…with the additional bootparams.

This is strictly for UEFI not legacy BIOS, legacy BIOS boots no problem on all my class 0 machines

If you can, update grub after modifying grub.cfg in the /efi/boot directory, and try again

Also that laptop might need to have the OS selected in the BIOS  as non-Windows or Other…and there may be other acpi_xx boot params that might help you

Maybe this needs a bug report about build’s default kernel config (re CONFIG_EFI_xxx) or there is some way of setting this at build time…, i’m not sure

Once you get it to work, it’s nice!

Adam Kearn

unread,

Aug 15, 2018, 9:08:08 PM8/15/18

to Chromium OS Development

Hey,  My VM has been running since 5pm (yesterday) to 7pm (today) and it’s still building…  It doesn’t normally take this long.  I am running:  ./build_packages —board=${BOARD}

Has something gone wrong or is it just being slow?

I gave it 8GB of RAM.  

Capture123.PNG

Should I try using the «4.14» if this doesn’t work? and are these the correct commands to do so?

export BOARD=amd64-generic

cros_workon —board=${BOARD} start chromeos-kernel-4_14

./setup_board —board=${BOARD}
./build_packages —board=${BOARD}
./build_image —board=${BOARD} —noenable_rootfs_verification test

Carmelo Carbonara

unread,

Aug 15, 2018, 11:16:28 PM8/15/18

to adam kearn, Chromium OS dev

yeah not just the ram it’s the cores too but, ./build_packages takes quite a while now…looks like it’s doing more local compilation.

I think ./setup_board is included in ./build_packages but run it by itself anyway; they don’t mention this in the new documentation

the kernel for the latest stable release is still chromeos-kernel-4_4…without changing the build source tree files etc for other kernel versions.

I would stick with the stable version for now…you just want to get it to boot…maybe some hardware might not work and it may not boot with the stock kernel config.

build the image and try it, use the bootparams previously mentioned; if you have to modify the kernel config, it’ll be easier with 4_4.

If some of your devices don’t work and you have all the firmware and modules, consider kernel 4_14

to modify the kernel config for 4.4 as user, cd /build/amd64-generic/var/cache/portage/..the kernel directory

type make —help; you just want to make bzImage….. copy it to your USB and replace vmlinuz.A with it or change the grub.cfg file to test booting with bzImage

Adam Kearn

unread,

Aug 19, 2018, 1:38:55 AM8/19/18

to Chromium OS Development, adamk…@gmail.com

Sorry that I took a couple of days to get back to you.  But I ran the repo init and repo sync and while I was waiting for those commands to finish I sore this.

I think having all those files was causing it to be soooo slow.

How did I get them in the first place? 

Fetching projects: 100% (16/16), done.  
Deleting obsolete path /home/chromiumos-sbc/chromiumos/chromium/src/third_party/Python-Markdown
Deleting obsolete path /home/chromiumos-sbc/chromiumos/chromium/src/third_party/libmtp
Deleting obsolete path /home/chromiumos-sbc/chromiumos/chromium/src/tools/md_browser
Deleting obsolete path /home/chromiumos-sbc/chromiumos/docs
Deleting obsolete path /home/chromiumos-sbc/chromiumos/infra/bad_cl_detector
Deleting obsolete path /home/chromiumos-sbc/chromiumos/infra/ci_results_archiver
Deleting obsolete path /home/chromiumos-sbc/chromiumos/infra/cl_exonerator
Deleting obsolete path /home/chromiumos-sbc/chromiumos/infra/cl_status_viewer
Deleting obsolete path /home/chromiumos-sbc/chromiumos/infra/distfiles_updater
Deleting obsolete path /home/chromiumos-sbc/chromiumos/infra/dummies/general-sandbox
Deleting obsolete path /home/chromiumos-sbc/chromiumos/infra/dummies/merge-sandbox
Deleting obsolete path /home/chromiumos-sbc/chromiumos/infra/lucifer
Deleting obsolete path /home/chromiumos-sbc/chromiumos/infra/skylab_inventory
Deleting obsolete path /home/chromiumos-sbc/chromiumos/infra/suite_scheduler
Deleting obsolete path /home/chromiumos-sbc/chromiumos/infra/test_analyzer
Deleting obsolete path /home/chromiumos-sbc/chromiumos/manifest
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/aosp/external/bsdiff
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/aosp/external/libbrillo
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/aosp/external/libchrome
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/aosp/external/libcxx
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/aosp/external/libcxxabi
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/aosp/external/libmojo
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/aosp/external/libunwind_llvm
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/aosp/external/minijail
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/aosp/external/puffin
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/aosp/system/connectivity/shill
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/aosp/system/libsync
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/aosp/system/update_engine
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/aosp/toolchain/binutils
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/aosp/toolchain/gcc
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/arc-camera
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/assets
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/audiotest
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/battery_updater
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/bisect-kit
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/bmpblk
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/bootcache
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/btsocket
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/cfm-device-monitor
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/chameleon
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/chromiumos-assets
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/cobble
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/crosvm
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/depthcharge
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/drm-tests
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/ec
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/experimental
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/factory
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/factory_installer
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/firmware
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/frecon
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/gestures
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/go-seccomp
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/graphyte
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/initramfs
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/inputcontrol
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/jabra_vold
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/libevdev
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/microbenchmarks
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/minigbm
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/moblab
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/mosys
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/mttools
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/newblue
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/punybench
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/system_api
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/tast
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/tast-tests
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/touch_firmware_test
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/touch_noise_filter
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/touch_updater
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/touchbot
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/touchpad-tests
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/tpm_lite
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/tremplin
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/uboot-env
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/vboot_reference
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/verity
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/vpd
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/webplot
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform/xorg-conf
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/platform2
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/adhd
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/android_mtdutils
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/arc-mesa
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/arm-trusted-firmware
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/atheros
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/atrusctl
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/autotest/files
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/aver-updater
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/bluez
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/bootstub
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/breakpad
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/breakpad/src/third_party/lss
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/broadcom
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/cbootimage
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/coreboot
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/coreboot/3rdparty/blobs
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/cros-adapta
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/cryptoc
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/cups
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/cypress-tools
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/daisydog
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/dbus-c++
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/dbus-spy
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/displaylink-updater
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/edk2
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/em100
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/flashmap
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/flashrom
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/fsp/cnl/edk2
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/fsp/glk/edk2
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/fsp/icl/edk2
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/fwupd
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/gcc
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/gdmwimax
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/gobi3k-sdk
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/hdctools
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/huddly-updater
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/kernel/experimental
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/kernel/v3.10
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/kernel/v3.14
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/kernel/v3.18
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/kernel/v3.8
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/kernel/v4.14
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/kernel/v4.14-mistral
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/kernel/v4.4
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/khronos
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/kvmtool
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/libapps
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/libc-bench
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/libdrm
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/libmbim
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/libqmi
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/libqrtr
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/libscrypt
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/libsigrok
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/libsigrokdecode
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/libv4lplugins
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/linux-firmware
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/logitech-updater
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/ltp
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/marvell
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/mesa
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/mesa-img
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/mimo-updater
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/mmc-utils
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/modemmanager-next
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/modp_b64
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/nfs-ganesha
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/ntirpc
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/portage_tool
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/realtek-updater
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/rootdev
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/seabios
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/sigrok-cli
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/sis-updater
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/sound-open-firmware
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/sysbios
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/tlsdate
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/toolchain-utils
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/tpm
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/tpm-emulator
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/tpm2
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/trousers
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/u-boot/files
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/webrtc-apm
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/whining
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/wpa_supplicant
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/wpa_supplicant-2.6
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/third_party/xfstests
Deleting obsolete path /home/chromiumos-sbc/chromiumos/src/weave/libweave
Syncing work tree: 100% (15/15), done.  

Your sources have been sync’d successfully.

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Pick a username
Email Address
Password

By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.

Already on GitHub?
Sign in
to your account


GRUB shows «Trying to terminate EFI services again» and blocks boot for a while

Bug #1642183 reported by
Robert Liu
on 2016-11-16

This bug affects 3 people

Affects Status Importance Assigned to Milestone


snapd

Triaged

Medium


Unassigned

Bug Description

When booting, GRUB prints «Trying to terminate EFI services again» and blocks the boot process more than 20 seconds.

With Ubuntu Desktop, I have never seen this message. I guess that GRUB have different configurations.

Adding «insmod efi_gop» and «insmod efi_uga» in grub.cfg (in EFI partition) solves the issue. In fact, any one of the commands helps.

To verify the fix won’t affect other devices, I tested the fix on a headless device which does not have video ports. the headless device boots correctly and did not show any warnings or errors.

[Details]
HW: Inte NUC DE3815TYKE
image: ubuntu-core-16-amd64.img.xz
BIOS: TYBYT10H.86A.0049.2016.0413.1649

Понравилась статья? Поделить с друзьями:
  • Try except python код ошибки
  • Try except python как вывести строку ошибки
  • Try except python вывод ошибки
  • Try except python все ошибки
  • Try catch php обработка ошибок