Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Grub 2 not installing entry on EFI
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
dman777
l33t
l33t


Joined: 10 Jan 2007
Posts: 976

PostPosted: Mon Dec 18, 2017 12:47 am    Post subject: Grub 2 not installing entry on EFI Reply with quote

I have a new Alienware R3 13 inch laptop with Windows 10 on a NVMe ssd drive.

I have secure mode off in bios, along with UEFI activated.


Following the AMD64 handbook, I mounted /dev/nvmeo0n1p1 mounted to /boot.

I ran echo 'GRUB_PLATFORMS="efi-64"' >> /etc/portage/make.conf.

I also ran grub-install --target=x86_64-efi --efi-directory=/boot

I see a gentoo directory in /boot/EFI/ along with windows directory.

The issue is that grub is not truly installing a partition in EFI. I say this because efibootmgr does not show the linux partition. What is strange, though, I see a 002 partition missing in the photo of my screen shot. I see a 000 windows partition and a 003 nic partition, but it looks like there is a missing 002 partition.

Any ideas what is wrong? I'm pretty stuck.

https://imgur.com/a/sAcqb
https://imgur.com/a/OzsHm
_________________
<h5>Checkout <em>#grandmasboy</em> on <em>freenode</em>...chat with jayP bot from the movie!</h5>
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Mon Dec 18, 2017 1:14 pm    Post subject: Reply with quote

does windows still boot?
do you want to keep windows and dual boot?
what livecd/liveusb did you use to do your install?
are you sure the livecd/usb was booted in uefi mode when you entered the chroot?
recommend using wgetpaste instead of pictures to provide file content and and command output. more data and more readability.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
dman777
l33t
l33t


Joined: 10 Jan 2007
Posts: 976

PostPosted: Mon Dec 18, 2017 2:17 pm    Post subject: Reply with quote

Yes, windows 10 still boots with no issues.
Yes, this is my gaming laptop so I want to keep windows 10
Using systemrescueCD for troubleshooting. Originally used gentoo minimal install cd to do the installation.
Yes, efi is mode is on or else efibootmgr would not show entries

Code:
sysresccd / # df
Filesystem         1K-blocks    Used Available Use% Mounted on
/dev/mapper/rootfs 100154472 4584904  90458888   5% /
udev                   10240      64     10176   1% /dev
shm                  4020272   32280   3987992   1% /dev/shm
/dev/nvme0n1p1        507904   87656    420248  18% /boot



Code:
sysresccd / # fdisk -l
Disk /dev/loop0: 426.5 MiB, 447172608 bytes, 873384 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


Disk /dev/sda: 1.9 GiB, 2004877312 bytes, 3915776 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


Disk /dev/nvme0n1: 238.5 GiB, 256060514304 bytes, 500118192 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: 60C29D84-D6BD-4925-84CD-F12B2740AAE5

Device             Start       End   Sectors   Size Type
/dev/nvme0n1p1      2048   1026047   1024000   500M EFI System
/dev/nvme0n1p2   1026048   1288191    262144   128M Microsoft reserved
/dev/nvme0n1p3   1288192 264624127 263335936 125.6G Microsoft basic data
/dev/nvme0n1p4 469424128 470345727    921600   450M Windows recovery environment
/dev/nvme0n1p5 470345728 497905663  27559936  13.1G Windows recovery environment
/dev/nvme0n1p6 497907712 500084735   2177024     1G Windows recovery environment
/dev/nvme0n1p7 264624128 265648127   1024000   500M Linux filesystem
/dev/nvme0n1p8 265648128 469424127 203776000  97.2G Linux filesystem

Partition table entries are not in disk order.


Disk /dev/mapper/rootfs: 97.2 GiB, 104331214848 bytes, 203771904 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
sysresccd /




Code:
sysresccd / # efibootmgr
BootCurrent: 1005
Timeout: 0 seconds
BootOrder: 0000,0003,0004
Boot0000* Windows Boot Manager
Boot0003* Onboard NIC (IPV4)
Boot0004* Onboard NIC (IPV6)
sysresccd / #


sysresccd / # ls -al /boot/EFI/gentoo/
total 128
drwxr-xr-x 2 root root   4096 Dec 16 12:44 .
drwxr-xr-x 6 root root   4096 Dec 16 07:35 ..
-rwxr-xr-x 1 root root 121344 Dec 17 11:39 grubx64.efi

sysresccd / # ls -al /boot/EFI
total 24
drwxr-xr-x 6 root root 4096 Dec 16 07:35 .
drwxr-xr-x 4 root root 4096 Dec 31  1969 ..
drwxr-xr-x 2 root root 4096 Dec  5 06:58 Boot
drwxr-xr-x 5 root root 4096 Dec 13 17:54 dell
drwxr-xr-x 2 root root 4096 Dec 16 12:44 gentoo
drwxr-xr-x 4 root root 4096 Dec  5 06:58 Microsoft
sysresccd / #


Code:

sysresccd / # emerge --info
Portage 2.3.13 (python 3.5.4-final-0, default/linux/amd64/13.0, gcc-6.4.0, glibc-2.25-r9, 4.9.60-std512-amd64 x86_64)
=================================================================
System uname: Linux-4.9.60-std512-amd64-x86_64-Intel-R-_Core-TM-_i7-7700HQ_CPU_@_2.80GHz-with-gentoo-2.4.1
KiB Mem:     8040548 total,   7017264 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Fri, 15 Dec 2017 03:00:01 +0000
Head commit of repository gentoo: 956926f714924b64037f7bbf2fc6e69d2acb6482
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.29.1 p3) 2.29.1
app-shells/bash:          4.3_p48-r1::gentoo
dev-lang/perl:            5.24.3::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.5.4-r1::gentoo
dev-util/cmake:           3.8.2::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.11::gentoo
sys-apps/sandbox:         2.10-r4::gentoo
sys-devel/autoconf:       2.69::gentoo
sys-devel/automake:       1.15.1-r1::gentoo
sys-devel/binutils:       2.29.1-r1::gentoo
sys-devel/gcc:            6.4.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.25-r9::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts:

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X acl acpi alsa amd64 berkdb bzip2 cli cracklib crypt cxx dri flac fortran fuse gdbm git gtk iconv ipv6 jpeg2k lame mms modules mp3 mpeg multilib ncurses nls nptl nvidia ogg opengl openmp pam pcre png qt3suppport qt4 readline seccomp session ssl svg tcpd tiff truetype unicode usb wavpack xattr zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby22" USERLAND="GNU" VIDEO_CARDS="intel i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

_________________
<h5>Checkout <em>#grandmasboy</em> on <em>freenode</em>...chat with jayP bot from the movie!</h5>
Back to top
View user's profile Send private message
v_andal
Guru
Guru


Joined: 26 Aug 2008
Posts: 523
Location: Germany

PostPosted: Mon Dec 18, 2017 3:08 pm    Post subject: Reply with quote

Have you tried to add the boot-entry manually with the help of efibootmgr?
Back to top
View user's profile Send private message
dman777
l33t
l33t


Joined: 10 Jan 2007
Posts: 976

PostPosted: Mon Dec 18, 2017 4:02 pm    Post subject: Reply with quote

I'm actually going to have to do that.

But before I do, I wanted to try and figure out why the normal way isn't working. It may be a sign that something is wrong in my environment/install that I need to fix rather than do a work around.


I really bothers be that there is a missing 002 partition entry, where it jumps from 000 to 003. I wonder if that is signal of a root cause.
_________________
<h5>Checkout <em>#grandmasboy</em> on <em>freenode</em>...chat with jayP bot from the movie!</h5>
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Mon Dec 18, 2017 4:15 pm    Post subject: Reply with quote

an experiment:
boot the sysresccd/usb, run:
Code:
mkdir /mnt/efi
mount /dev/nvme0n1p1 /mnt/efi
ls -alR /mnt/efi | wgetpaste -t

post the url returned
_________________
Defund the FCC.
Back to top
View user's profile Send private message
v_andal
Guru
Guru


Joined: 26 Aug 2008
Posts: 523
Location: Germany

PostPosted: Mon Dec 18, 2017 4:15 pm    Post subject: Reply with quote

I'm asking because my UEFI simply removes entries created by efibootmgr. At best the entry stays, but boot order is not preserved, so the entry is not used for booting.
Back to top
View user's profile Send private message
dman777
l33t
l33t


Joined: 10 Jan 2007
Posts: 976

PostPosted: Mon Dec 18, 2017 8:49 pm    Post subject: Reply with quote

v_andal wrote:
I'm asking because my UEFI simply removes entries created by efibootmgr. At best the entry stays, but boot order is not preserved, so the entry is not used for booting.


I will have to trouble shoot this tonight when I get home from work. If my UEFI is doing the same thing as yours, how did you overcome this? If I add the boot-entry manually with the help of efibootmgr, wouldn't it still get removed by the UEFI?
_________________
<h5>Checkout <em>#grandmasboy</em> on <em>freenode</em>...chat with jayP bot from the movie!</h5>
Back to top
View user's profile Send private message
dman777
l33t
l33t


Joined: 10 Jan 2007
Posts: 976

PostPosted: Tue Dec 19, 2017 1:38 am    Post subject: Reply with quote

Good news! I got it working!!! In systemrescuecd, I had to do the following:

https://wiki.gentoo.org/wiki/Efibootmgr#Creating_a_boot_entry
Code:

mount -o remount,rw -t efivarfs efivarfs /sys/firmware/efi/efivars



Then I did the usual grub-install command. This time, efibootmgr showed the entry successfully!

They should put this in the Gentoo Handbook. Who can I contact to suggest this?
_________________
<h5>Checkout <em>#grandmasboy</em> on <em>freenode</em>...chat with jayP bot from the movie!</h5>
Back to top
View user's profile Send private message
v_andal
Guru
Guru


Joined: 26 Aug 2008
Posts: 523
Location: Germany

PostPosted: Tue Dec 19, 2017 12:25 pm    Post subject: Reply with quote

dman777 wrote:
how did you overcome this? If I add the boot-entry manually with the help of efibootmgr, wouldn't it still get removed by the UEFI?


I’ve copied grub loader in place of microsoft loader which is activated by UEFI :) Well, Microsoft recovers it periodically, but it doesn't happen very often.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
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