Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Fresh installation kernel stuck after GRUB
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
DevOne
Guru
Guru


Joined: 13 Jul 2005
Posts: 419

PostPosted: Tue Jan 31, 2017 10:04 am    Post subject: Reply with quote

Hello guys...
I am starting the procedure of the stub kernel.
_________________
Real-time cooperative softair: http://www.softairrealfight.net
Qt generic-compass contribution: https://codereview.qt-project.org/#/c/92017
Open-source Virtual Keyboard QT widget: https://www.linux-apps.com/p/1132203/
Back to top
View user's profile Send private message
DevOne
Guru
Guru


Joined: 13 Jul 2005
Posts: 419

PostPosted: Tue Jan 31, 2017 10:18 am    Post subject: Reply with quote

DONAHUE wrote:
The most recent links I see:
https://paste.pound-python.org/show/eB3LN7FKZaHs5EjjDG8r
https://paste.pound-python.org/show/8oftbYzK5xVCLxBYe10h
make && make modules_install && make install did not place a kernel in the /boot directory on /dev/sdb6
however grub-install did put an EFI directory in the /boot/efi directory on /dev/sdb6
both these errors were caused by mounting errors resulting from my typos, both these errors need correction.

modified modified guide: hope the comments help your comfort (frustration) level
please be literal except for my typos :oops: If you get an error message please stop and tell me.
boot the sysresccd in UEFI mode.
Code:
mount /dev/sdb6 /mnt/gentoo
mount --rbind /dev /mnt/gentoo/dev
mount --make-rslave /mnt/gentoo/dev
mount -t proc /proc /mnt/gentoo/proc
mount --rbind /sys /mnt/gentoo/sys
mount --make-rslave /mnt/gentoo/sys
mount --rbind /tmp /mnt/gentoo/tmp
chroot /mnt/gentoo /bin/bash
/usr/sbin/env-update
source /etc/profile
export PS1="(chroot) $PS1"
#note that /dev/sdb2 is NOT to be mounted as yet
mount /dev/sda3 /var
mount /dev/sda5 /home
#remove grub
emerge -C grub
#remove /boot/efi and all contents from /dev/sda6
rm -rf /boot/efi
#recreate /boot/efi as empty mount point
mkdir /boot/efi
#configure an efi stub kernel as before
cd /usr/src/linux;make menuconfig
#build and install efi stub kernel
make && make modules_install && make install
#verify kernel, config, and system map are present and created near present time
ls -l /boot
#verify /boot/efi is empty
ls /boot/efi
# now mount the ESP at /boot/efi and no where else
mount /dev/sdb2 /boot/efi
#verify that /dev/sdb2 is mounted at /boot/efi by looking for /boot/efi/EFI
ls /boot/efi
#install a stub kernel at the fallback location on the ESP
cp /boot/vmlinuz-3.4.39-gentoo /boot/efi/EFI/Boot/bootx64.efi
#verify it is present and was built near current time
ls -l /boot/efi/EFI/Boot/bootx64.efi
#redo grub
emerge -av grub
grub-install --target=x86_64-efi --efi-directory=/boot/efi
grub-mkconfig -o /boot/grub/grub.cfg
wgetpaste -t /boot/grub/grub.cfg
#have i done any good? please run & post url's
ls -alR /boot | wgetpaste -t
efibootmgr -v | wgetpaste -t
exit
reboot

try rEFInd , should have stub kernel on ESP/sdb2, stub kernel on sdb6, and grub on sdb2, try both or all 3 or more or less

@Tony currently using a rEFInd cd/usb for trouble shooting. Your point is very well taken but changing the cd/usb :D Problem started with a dual boot windows and ubuntu complicated during gentoo install by conflicting directory structures recommended by handbook and grub wikis. multiple ESP's. Compoundedby some typos by yours truly.


Code:

cp /boot/vmlinuz-3.4.39-gentoo /boot/efi/EFI/Boot/bootx64.efi

Do you mean without "Boot" directory and gentoo instead?
_________________
Real-time cooperative softair: http://www.softairrealfight.net
Qt generic-compass contribution: https://codereview.qt-project.org/#/c/92017
Open-source Virtual Keyboard QT widget: https://www.linux-apps.com/p/1132203/
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Tue Jan 31, 2017 10:44 am    Post subject: Reply with quote

DevOne wrote:


Code:

cp /boot/vmlinuz-3.4.39-gentoo /boot/efi/EFI/Boot/bootx64.efi



Can you explain me why you want to replace your grub2 related file (/boot/efi/EFI/Boot/bootx64.efi) with a kernel one?

Thats obvious that that box won't boot without reading the other posts above!

Code:
roman@ASUS-G75VW /boot/EFI/EFI/gentoo $ pwd
/boot/EFI/EFI/gentoo
roman@ASUS-G75VW /boot/EFI/EFI/gentoo $ ls -alh
total 118K
drwxr-xr-x 2 root root 2,0K Nov 11  2015 .
drwxr-xr-x 5 root root 2,0K Sep 12 03:01 ..
-rwxr-xr-x 1 root root 113K Dez 23 21:51 grubx64.efi
roman@ASUS-G75VW /boot/EFI/EFI/gentoo $


That file is usually generated by grub2

I suspect => grub2-install --efi-cirectory=/boot/EFI

which explains why you have efi in small letters and i have EFI in big letters. You probably used the first time /boot/efi (everything in small letters).

--

reinstall your bootloader please => e.g. grub2-install

redo your boot config => grub.cfg or what it is called.


--

I'm not fond of exotic bootloaders (refind for example)

grub2 works very well. When the user do not understand basic principles. it is the time very well spend on reading about how it works.

Without taking your time to read the documentations a failure is quite likely to happen.


How a kernel boots is the same since kernels 2.x.x
how a bootloader works, also the same, regardless if its lilo, grub1, grub2
how to access root, boot, is also basically the same principle

Sometimes I have read in the past for one or two weeks until i had understood new principles. E.g. lvm2 / luks.

--

The handbook is quite easy to follow. I did that at least 5 times on fresh disks in past 15 months. The information provides is correct and is just a copy and paste action.

--

You really should start from scratch. REading about how things are working, read hte docs. It takes some time.

I also see that you are ignoring posts. This is not windows, you have to do a bit of your homework. read the answers, read the docs, than you will solve things. We are here to guide you, but the work has to be done by you in the first place!

When you want an easier approach, you may try linux mint. Gentoo will get much more complicated after this. more about reading the docs and such... more time spend on configuring hte box. ...
Back to top
View user's profile Send private message
DevOne
Guru
Guru


Joined: 13 Jul 2005
Posts: 419

PostPosted: Tue Jan 31, 2017 12:06 pm    Post subject: Reply with quote

Roman_Gruber wrote:
DevOne wrote:


Code:

cp /boot/vmlinuz-3.4.39-gentoo /boot/efi/EFI/Boot/bootx64.efi



Can you explain me why you want to replace your grub2 related file (/boot/efi/EFI/Boot/bootx64.efi) with a kernel one?

Thats obvious that that box won't boot without reading the other posts above!


I am just following the guide the other guy suggested.
I always use grub without problem, this is my first hard stop on this
and sorry, I have been installing gentoo since 2003 and also having mail server and firewall/nat besides desktop gentoo's.
_________________
Real-time cooperative softair: http://www.softairrealfight.net
Qt generic-compass contribution: https://codereview.qt-project.org/#/c/92017
Open-source Virtual Keyboard QT widget: https://www.linux-apps.com/p/1132203/
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Tue Jan 31, 2017 12:37 pm    Post subject: Reply with quote

cp /boot/vmlinuz-3.4.39-gentoo /boot/efi/EFI/Boot/bootx64.efi copies a renamed kernel to the fallback location on the ESP
grub-mkconfig installs grub in its own path /boot/efi/EFI/gentoo/grubx64.efi
rEFInd should provide a boot choice for bootx64.efi, grubx64.efi, and vmlinuz-4.3.39-gentoo if they are in the proper locations
_________________
Defund the FCC.
Back to top
View user's profile Send private message
DevOne
Guru
Guru


Joined: 13 Jul 2005
Posts: 419

PostPosted: Tue Jan 31, 2017 12:42 pm    Post subject: Reply with quote

DONAHUE wrote:
cp /boot/vmlinuz-3.4.39-gentoo /boot/efi/EFI/Boot/bootx64.efi copies a renamed kernel to the fallback location on the ESP
grub-mkconfig installs grub in its own path /boot/efi/EFI/gentoo/grubx64.efi
rEFInd should provide a boot choice for bootx64.efi, grubx64.efi, and vmlinuz-4.3.39-gentoo if they are in the proper locations


Ok so in the Boot directory (that is not exsisting)?
_________________
Real-time cooperative softair: http://www.softairrealfight.net
Qt generic-compass contribution: https://codereview.qt-project.org/#/c/92017
Open-source Virtual Keyboard QT widget: https://www.linux-apps.com/p/1132203/
Back to top
View user's profile Send private message
DevOne
Guru
Guru


Joined: 13 Jul 2005
Posts: 419

PostPosted: Tue Jan 31, 2017 12:56 pm    Post subject: Reply with quote

DONAHUE wrote:

wgetpaste -t /boot/grub/grub.cfg
#have i done any good? please run & post url's
ls -alR /boot | wgetpaste -t
efibootmgr -v | wgetpaste -t


https://paste.pound-python.org/show/4IEl9n99Lp7OFrTuKC8T
https://paste.pound-python.org/show/dGG2cLfcIVr74Jsy1tia
https://paste.pound-python.org/show/fE8NpSCIvxpX6NuZP8LC

I will perform reboot when I go home.

thanks
_________________
Real-time cooperative softair: http://www.softairrealfight.net
Qt generic-compass contribution: https://codereview.qt-project.org/#/c/92017
Open-source Virtual Keyboard QT widget: https://www.linux-apps.com/p/1132203/
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Tue Jan 31, 2017 12:57 pm    Post subject: Reply with quote

if ls /boot/efi/EFI/Boot run with /dev/sdb2 mounted at /boot/efi shows that /boot/efi/EFI/Boot does not exist you will need to make it.
This will mean that the ESP is really blitzed.
an efi stub kernel is its own boot loader. With a built in command line it does not need parameters passed to it, only control.
rEFInd is a boot manager.
grub is a combination of boot manager and boot loader.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
DevOne
Guru
Guru


Joined: 13 Jul 2005
Posts: 419

PostPosted: Tue Jan 31, 2017 1:06 pm    Post subject: Reply with quote

DONAHUE wrote:
if ls /boot/efi/EFI/Boot run with /dev/sdb2 mounted at /boot/efi shows that /boot/efi/EFI/Boot does not exist you will need to make it.
This will mean that the ESP is really blitzed.


only the "Boot" directory didn't exist and so I created it.
_________________
Real-time cooperative softair: http://www.softairrealfight.net
Qt generic-compass contribution: https://codereview.qt-project.org/#/c/92017
Open-source Virtual Keyboard QT widget: https://www.linux-apps.com/p/1132203/
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Tue Jan 31, 2017 1:28 pm    Post subject: Reply with quote

Only the efibootmgr data looks glitchy; the windows references are not supported by files on the ESP.
The /boot structure and ESP (for linux) now look good as does the grub.cfg.
I will be out from 0900 EST until about 1100 EST (1500-1800 your time?) Good luck on the reboot.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
DevOne
Guru
Guru


Joined: 13 Jul 2005
Posts: 419

PostPosted: Tue Jan 31, 2017 1:33 pm    Post subject: Reply with quote

DONAHUE wrote:
Only the efibootmgr data looks glitchy; the windows references are not supported by files on the ESP.
The /boot structure and ESP (for linux) now look good as does the grub.cfg.
I will be out from 0900 EST until about 1100 EST (1500-1800 your time?) Good luck on the reboot.


Ok... that sounds promising...
_________________
Real-time cooperative softair: http://www.softairrealfight.net
Qt generic-compass contribution: https://codereview.qt-project.org/#/c/92017
Open-source Virtual Keyboard QT widget: https://www.linux-apps.com/p/1132203/
Back to top
View user's profile Send private message
DevOne
Guru
Guru


Joined: 13 Jul 2005
Posts: 419

PostPosted: Tue Jan 31, 2017 7:36 pm    Post subject: Reply with quote

:cry: :cry: :cry:

Nothing to do....same behaviour and the pendrive start to blink and numlock twice and then it stops
_________________
Real-time cooperative softair: http://www.softairrealfight.net
Qt generic-compass contribution: https://codereview.qt-project.org/#/c/92017
Open-source Virtual Keyboard QT widget: https://www.linux-apps.com/p/1132203/
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Tue Jan 31, 2017 7:40 pm    Post subject: Reply with quote

how many icons did refind show and how were they described?
_________________
Defund the FCC.
Back to top
View user's profile Send private message
DevOne
Guru
Guru


Joined: 13 Jul 2005
Posts: 419

PostPosted: Thu Feb 02, 2017 6:41 pm    Post subject: Reply with quote

DONAHUE wrote:
how many icons did refind show and how were they described?


Hello sorry for the delay...
I had to install windows 10 at least to have an operating system on this asus.
Now I have grub with 2 entries, Windows and Linux...Windows is booting regularly and linux as usual gets stuck after hitting return key.
_________________
Real-time cooperative softair: http://www.softairrealfight.net
Qt generic-compass contribution: https://codereview.qt-project.org/#/c/92017
Open-source Virtual Keyboard QT widget: https://www.linux-apps.com/p/1132203/
Back to top
View user's profile Send private message
DevOne
Guru
Guru


Joined: 13 Jul 2005
Posts: 419

PostPosted: Fri Feb 03, 2017 12:51 pm    Post subject: Reply with quote

Running refind, is giving me 3 entries for gentoo:

1. from my boot partition (stuck loading the kernel)
2. from EFI\gentoo\grub.cfg (stuck loading kernel)
3. just lead to the grub menu (stuck when I select the gentoo entry)


This is exactly the problem I am facing:
http://unix.stackexchange.com/questions/336494/grub-stuck-loading-kernel
_________________
Real-time cooperative softair: http://www.softairrealfight.net
Qt generic-compass contribution: https://codereview.qt-project.org/#/c/92017
Open-source Virtual Keyboard QT widget: https://www.linux-apps.com/p/1132203/
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Fri Feb 03, 2017 4:42 pm    Post subject: Reply with quote

Roman_Gruber wrote:
DevOne wrote:
Code:
cp /boot/vmlinuz-3.4.39-gentoo /boot/efi/EFI/Boot/bootx64.efi

Can you explain me why you want to replace your grub2 related file (/boot/efi/EFI/Boot/bootx64.efi) with a kernel one?

Roman_Gruber ... perhaps you should explain why you're asking this when that is the default location, and name, specified in the UEFI standard for a "fallback" (64bit) efi executable. Also, grub2 is not located there (unless you happened to have placed it there in order to take advantage of that fallback) grub2 would be under {ESP}/efi/grub2 ... and note, it's "bootx64.efi" not "grubx64.efi".

Roman_Gruber wrote:
Thats obvious that that box won't boot without reading the other posts above!

No, that (vague, and disconnected sentence) is incorrect (again, it is the fallback stipulated in the UEFI standard). What is obvious is that you're derailing this thread by posting incorrect, and/or irrelevant, suggestions.

Roman_Gruber wrote:
[...] which explains why you have efi in small letters and i have EFI in big letters. You probably used the first time /boot/efi (everything in small letters).

No, it's a fat32 filesystem, and fat32 is case insensitive.

Roman_Gruber wrote:
Without taking your time to read the documentations a failure is quite likely to happen.

In your case that can only be read as ironic, and I say that having just read the entire thread.

Roman_Gruber wrote:
How a kernel boots is the same since kernels 2.x.x

No, that is incorrect on a number of levels, not least of which is that efistub didn't enter the tree until >=3.3.x

Roman_Gruber wrote:
how a bootloader works, also the same, regardless if its lilo, grub1, grub2

If you happen to discount how that bootloader functions (ie, MBR, EFI), and what the bootloader is doing (ie, the firmware is loading an executable, as opposed to reading from the master boot record).

Roman_Gruber wrote:
how to access root, boot, is also basically the same principle

Not if you consider that the bootloader defines these in different ways. If this were the case then grub.cfg, grub.conf, refind.conf, etc, etc, would all be interchangeable.

Roman_Gruber wrote:
You really should start from scratch. REading about how things are working, read hte docs. It takes some time. I also see that you are ignoring posts. This is not windows, you have to do a bit of your homework. read the answers, read the docs, than you will solve things. We are here to guide you, but the work has to be done by you in the first place!

Alternately, you shouldn't be attempting to "guide" people in such a muddled, and disruptive, manner ... and then ask they RTFM when that guidance fails.

@DevOne ... sorry for that digression. As to your problem, is there a reason you want to keep grub2 in the mix? It seems you are over the efi hurdle, as rEFInd is doing what you've configured it to do, so that situates the issue you're seeing with either grub2, kernel parameters, or the kernel. You might test excluding grub2 and booting the efistub kernel (which, assuming you haven't modified the 'scanfor' parameter, rEFInd should also present as a boot option). If that is not the case are these kernel's suffixed with "*.efi"?

I may have missed in the above your kernel configuration, you should check the following:

Code:
# egrep '(EFI|RELOCATABLE)' /usr/src/linux-$(uname -r)/.config

You should see =y for CONFIG_EFI_PARTITION, CONFIG_EFI, CONFIG_EFI_STUB, and CONFIG_RELOCATABLE (additionally CONFIG_EFI_VARS should be y or m, and CONFIG_EFIVAR_FS is optional dependent on the version of efibootmgr in use).

You asked previously how to delete an entry from efivars:

Code:
# efibootmgr --bootnum <NNNN> --delete-bootnum

... where '<NNNN>' is the number of the entry seen in 'efibootmgr -v'. Note that with a 'fallback' in {ESP}/efi/boot this should be selected if no other efi executable is found (often people use this to avoid having to do anything with efivars, ie, if say booting an install disk that doesn't support efivars).

I can't say why the kernel seems to be crashing as it does, it may be a grub2 issue, some parameter passed to the kernel, or the kernel itself (often people miss enabling CONFIG_RELOCATABLE which can cause efistub to fail in a similar manner) but if you have further problems I'll try and help figure them out (if DONAHUE doesn't get there first ;).

best ... khay
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3081
Location: Illinois, USA

PostPosted: Fri Feb 03, 2017 5:48 pm    Post subject: Reply with quote

khayyam wrote:
Code:
# egrep '(EFI|RELOCATABLE)' /usr/src/linux-$(uname -r)/.config

For a more readable output:
Code:
 egrep '(EFI|RELOCATABLE)' /usr/src/linux-$(uname -r)/.config|grep -v "is not set"


Sample output from a UEFI booting refind gentoo system:
Code:
CONFIG_EFI_PARTITION=y
CONFIG_EFI=y
CONFIG_EFI_STUB=y
CONFIG_RELOCATABLE=y
CONFIG_FB_EFI=y
CONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK=y
# EFI (Extensible Firmware Interface) Support
CONFIG_EFI_VARS=y
CONFIG_EFI_ESRT=y
CONFIG_EFI_VARS_PSTORE=y
CONFIG_EFI_RUNTIME_MAP=y
CONFIG_EFI_RUNTIME_WRAPPERS=y
CONFIG_EFI_BOOTLOADER_CONTROL=y
CONFIG_UEFI_CPER=y
Some of these may not be required, but they won't hurt.
Back to top
View user's profile Send private message
DevOne
Guru
Guru


Joined: 13 Jul 2005
Posts: 419

PostPosted: Fri Feb 03, 2017 6:06 pm    Post subject: Reply with quote

Hi guys,
I am glad the supporting group is getting bigger...

This is the result:
Code:

CONFIG_EFI_PARTITION=y
CONFIG_EFI=y
CONFIG_EFI_STUB=y
# CONFIG_EFI_MIXED is not set
CONFIG_RELOCATABLE=y
CONFIG_FB_EFI=y
CONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK=y
# EFI (Extensible Firmware Interface) Support
CONFIG_EFI_VARS=y
CONFIG_EFI_ESRT=y
# CONFIG_EFI_FAKE_MEMMAP is not set
CONFIG_EFI_RUNTIME_WRAPPERS=y
# CONFIG_CACHEFILES is not set
CONFIG_EFIVAR_FS=m
# CONFIG_EARLY_PRINTK_EFI is no


I rechecked this guide: https://wiki.gentoo.org/wiki/GRUB2#UEFI_with_GPT
and stuck as much as possible to its suggestions: so I have tried to use just the boot directory created in / (so no mount on dedicated partition) and the efi one as vfat, but the result is the same.
On the next reboot, I will try "Alternative: using the default UEFI firmware location".

Moreover, I rebooted the pc with sysrescue and executed the entry "run the kernel saved in your hard disk" (or similar) and I have an image of the result (it doesn't seems good though):
https://drive.google.com/file/d/0B6nat4h3zI16UVFmUGYyaGFLUkk/view?usp=drivesdk
_________________
Real-time cooperative softair: http://www.softairrealfight.net
Qt generic-compass contribution: https://codereview.qt-project.org/#/c/92017
Open-source Virtual Keyboard QT widget: https://www.linux-apps.com/p/1132203/
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Fri Feb 03, 2017 8:07 pm    Post subject: Reply with quote

If you have an efi stub kernel at /boot/vmlinuz-whatever rEFInd should find and boot it. If you have copied an efi stub kernel to /EFI/Boot/bootx64.efi on the ESP rEFInd should find and boot it. Below is stuff from my working UEFI Gentoo on a z170 motherboard (asrock). Other uefi gentoos are on amd boards from asus, asrock, and gigabyte.
Photos of my UEFI boot list and rEFIND icoography:
UEFI/BIOS boot list
Windows
grub
kernel at /EFI/gentoo on the ESP
efi stub at ESP fallback location
most recent vmlinuz at /boot,pressing insert will show all in a submenu
sysresccd
Pastebins:
My efi stub kernel config
ls -alR /boot with my ESP mounted at /boot/efi
efibootmgr -v
I do not have a separate boot partition, I use the ESP created by win 10 as sole and only ESP, I run testing branch gentoo. Grub is present for troubleshooting grub only. I prefer rEFInd and efi stub.

Photos above are with rEFInd installed on the hard drive, using rEFInd cd is similar with an added blue Q icon and one 3 circle icon changed to blue Q
_________________
Defund the FCC.


Last edited by DONAHUE on Sat Feb 04, 2017 11:54 am; edited 1 time in total
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Fri Feb 03, 2017 9:54 pm    Post subject: Reply with quote

Tony0945 wrote:
khayyam wrote:
Code:
# egrep '(EFI|RELOCATABLE)' /usr/src/linux-$(uname -r)/.config

For a more readable output:
Code:
 egrep '(EFI|RELOCATABLE)' /usr/src/linux-$(uname -r)/.config|grep -v "is not set"

Tony0945 ... had I wanted that I would have provided the following (and so avoided an additional grep):

Code:
# egrep '^CONFIG.*(EFI|RELOCATABLE)' /usr/src/linux-$(uname -r)/.config

In this case it was useful to know both what was enabled ... and disabled.

@DevOne ... I'm still using 3.12.x and so I'm not sure what those additional config entries do, but otherwise those that should be enabled are.

DevOne wrote:
I rechecked this guide: https://wiki.gentoo.org/wiki/GRUB2#UEFI_with_GPT and stuck as much as possible to its suggestions: so I have tried to use just the boot directory created in / (so no mount on dedicated partition) and the efi one as vfat, but the result is the same.

If you do that then you need to mount the ESP to /boot/efi and that will then change the path (it will become /boot/efi/efi/{boot,grub2,refind}), and you need to bear this in mind if/when installing grub2 ... it will expect that /boot/efi/ is the ESP. Also, I'm not sure this has been mentioned, but as you have two ESP's you should be passing '-d,--disk' to efibootmgr so that the entry is created for the ESP you intend (otherwise it defaults to /dev/sda).

DevOne wrote:
On the next reboot, I will try "Alternative: using the default UEFI firmware location".

Note that you will need to delete other entries for this to become the one selected (as I said it is a 'fallback'). At this stage I wouldn't take that route, rEFInd seems to be working (the issues come after that).

DevOne wrote:
Moreover, I rebooted the pc with sysrescue and executed the entry "run the kernel saved in your hard disk" (or similar) and I have an image of the result (it doesn't seems good though):
https://drive.google.com/file/d/0B6nat4h3zI16UVFmUGYyaGFLUkk/view?usp=drivesdk

It doesn't find init, which seems to be the result of the initramfs not knowing what it should look to for root=/dev/sdX ... anyhow, I don't think it helps us narrow down the cause of the problem because as has been said that same kernel should show in rEFInd (assuming, as I'd asked, this/these are suffixed "*.efi"). Is that in fact happening?

best ... khay
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3081
Location: Illinois, USA

PostPosted: Sat Feb 04, 2017 1:29 am    Post subject: Reply with quote

khayyam wrote:
Tony0945 ... had I wanted that I would have provided the following (and so avoided an additional grep):
https://drive.google.com/file/d/0B6nat4h3zI16UVFmUGYyaGFLUkk/view?usp=drivesdk
[/quote] I ran your first verson and the unused entries made the list run off the screen. I just added a quick and dirty fix. I don't have anywhere near the skill you do. Sorry if I implied otherwise.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Sat Feb 04, 2017 9:56 am    Post subject: Reply with quote

Tony0945 wrote:
khayyam wrote:
Tony0945 ... had I wanted that I would have provided the following (and so avoided an additional grep):

I ran your first verson and the unused entries made the list run off the screen. I just added a quick and dirty fix. I don't have anywhere near the skill you do. Sorry if I implied otherwise.

Tony0945 ... no problem, sorry if it seemed I was doing anything other the supplying my reasoning. Not sure why the regex matched more than the string(s), or, if thats not the case, why your .config has more that matches (it is only 8 lines here).

best ... khay
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Sat Feb 04, 2017 12:58 pm    Post subject: Reply with quote

Adding to my post: Posted: Fri Feb 03, 2017 3:07 pm

Photo of the slightly different rEFInd cd iconography
_________________
Defund the FCC.
Back to top
View user's profile Send private message
DevOne
Guru
Guru


Joined: 13 Jul 2005
Posts: 419

PostPosted: Sat Feb 04, 2017 7:02 pm    Post subject: Reply with quote

What is not clear to me is if this is a problem that kernel is not found or the kernel that has a lack of something inside.

What's your opinion?
_________________
Real-time cooperative softair: http://www.softairrealfight.net
Qt generic-compass contribution: https://codereview.qt-project.org/#/c/92017
Open-source Virtual Keyboard QT widget: https://www.linux-apps.com/p/1132203/
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Sat Feb 04, 2017 7:50 pm    Post subject: Reply with quote

Perhaps a visit to https://www.linux.com/learn/how-rescue-non-booting-grub-2-linux, print a copy for reference, set UEFI/BIOS boot list for rEFInd cd or grub on hard drive as first to boot, in either case boot via grub, press C as soon as grub menu appears, at grub> prompt enter
Code:
set pager=1
ls
ls (hd1,gpt6)/
ls (hd1,gpt6)/boot/
ls (hd1,gpt2)/EFI/Boot/

My guesses as to what first command should return is incorporated into second, third, and fourth commands. Feel free to poke around.
first: list of disks that UEFI/BIOS passed to grub, guessing /dev/sda is (hd0) and /dev/sdb is (hd1)
second: list of directories on what we think of as /dev/sdb6
third: list of files in directory /boot, should include vmlinuz-4.4.39-gentoo
fourth: should show bootx64.efi

should answer the question of whether grub can see the kernel(s)
most likely the kernel fails to load or loads but fails immediately before having the ability to print status messages
_________________
Defund the FCC.


Last edited by DONAHUE on Sat Feb 04, 2017 8:06 pm; edited 1 time in total
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
Goto page Previous  1, 2, 3, 4, 5  Next
Page 4 of 5

 
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