Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]Installed gentoo but can't boot -- grub2
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
Xploderman90
n00b
n00b


Joined: 27 Aug 2012
Posts: 57

PostPosted: Fri Jun 19, 2015 9:47 pm    Post subject: [SOLVED]Installed gentoo but can't boot -- grub2 Reply with quote

Hi all, I have installed gentoo following this guide :
Code:
https://wiki.gentoo.org/wiki/Handbook:AMD64/Full/Installation


but when i reboot, grub2 cannot load, resulting in an endless black screen (i have to turn off pc).

I have installed grub2 doing
Code:

grub2-install /dev/sda
grub2-mkconfig

and it was ok (no errors, outputting right conf from what i can see, but i can't say it for sure obviously)

In this image you can see my hdd partitions:

http://s12.postimg.org/64k1mq8vg/20150619_230525.jpg

While in this image you can see my boot [sub]directories (maybe i did something wrong?)

http://s17.postimg.org/9pp0s62dq/20150619_230858.jpg

This is my bios boot section with all possible boots

http://s30.postimg.org/5qvpuetcw/20150619_230950.jpg

The last one is supposedly GRUB2

In this pc i have previously installed Windows 7, so there is its windows boot manager.
This SSD is partitioned through GPT.
Motherboard is Z87Pro.
I have disabled secure boot but cannot disable CSM because when i disable it, bios/uefi says video driver is not supported.

What i can do to boot gentoo? I need it for last exam in university :D (sorry if i gave redundant informations but i hope i gave every information possible to solve this problem)
Thanks in advance


Last edited by Xploderman90 on Mon Jun 29, 2015 8:32 am; edited 1 time in total
Back to top
View user's profile Send private message
Xploderman90
n00b
n00b


Joined: 27 Aug 2012
Posts: 57

PostPosted: Fri Jun 19, 2015 11:11 pm    Post subject: Reply with quote

Now i have GRUB_PLATFORMS="efi-64" in make.conf.
I have reinstalled grub and now, when giving

Code:
grub2-install --target=x86_64-efi"


it says that it cannot find efi directory.

Tried to move .efi in efi/EFI, in efi/EFI/gentoo but nothing changed.

I really don't know what to do, I'm in your hands
Back to top
View user's profile Send private message
ian.au
Guru
Guru


Joined: 07 Apr 2011
Posts: 434
Location: Australia

PostPosted: Sat Jun 20, 2015 7:19 am    Post subject: Reply with quote

Xploderman90 wrote:
Now i have GRUB_PLATFORMS="efi-64" in make.conf.
I have reinstalled grub and now, when giving

Code:
grub2-install --target=x86_64-efi"


it says that it cannot find efi directory.

Tried to move .efi in efi/EFI, in efi/EFI/gentoo but nothing changed.

I really don't know what to do, I'm in your hands


I haven't set up any of my gentoo machines to efi boot yet, so I'm not sure of the gentoo way on this, but I did a Debian install via efi the other day - if you are setting up an efi boot environment you need a file in /boot/efi pointing to the boot file for the kernel. I wouldn't do things like making .files under /boot, that won't help.

You don't say what happens when you try to boot from efi. Still a blank screen or are you in an efi shell listing some filesystems and block devices?

Assuming you have an efi shell and at least one filesystem (fs0, fs1 etc.. and some bl(x) devices) visible you should be able to boot by telling the bootloader where to find the kernel ie. /boot/efi/<bootfile>.nsh where <bootfile> will contain something like

\EFI\<distro>\bootx64.efi # yes '\' I guess due to the fat32 efi partition

I just looked at https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Bootloader#Alternative:_Using_efibootmgr

and it appears that this tool will link the startup script for you automatically, so I'm not going to suggest you do it manually. Did you install it?

If not

Do you have an efi shell and visible filesystem? If so, can you <exit> the shell and boot into EFI/gentoo/boot64.efi from the subsequent menu? If so, boot in and install the efibootmgr per above link and you should be good.

If you have a shell but no filesystems showing, or no efi shell loads the problem is elsewhere.

Ian
Back to top
View user's profile Send private message
Xploderman90
n00b
n00b


Joined: 27 Aug 2012
Posts: 57

PostPosted: Sat Jun 20, 2015 11:26 am    Post subject: Reply with quote

ian.au wrote:
Xploderman90 wrote:
Now i have GRUB_PLATFORMS="efi-64" in make.conf.
I have reinstalled grub and now, when giving

Code:
grub2-install --target=x86_64-efi"


it says that it cannot find efi directory.

Tried to move .efi in efi/EFI, in efi/EFI/gentoo but nothing changed.

I really don't know what to do, I'm in your hands


I haven't set up any of my gentoo machines to efi boot yet, so I'm not sure of the gentoo way on this, but I did a Debian install via efi the other day - if you are setting up an efi boot environment you need a file in /boot/efi pointing to the boot file for the kernel. I wouldn't do things like making .files under /boot, that won't help.

You don't say what happens when you try to boot from efi. Still a blank screen or are you in an efi shell listing some filesystems and block devices?

Assuming you have an efi shell and at least one filesystem (fs0, fs1 etc.. and some bl(x) devices) visible you should be able to boot by telling the bootloader where to find the kernel ie. /boot/efi/<bootfile>.nsh where <bootfile> will contain something like

\EFI\<distro>\bootx64.efi # yes '\' I guess due to the fat32 efi partition

I just looked at https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Bootloader#Alternative:_Using_efibootmgr

and it appears that this tool will link the startup script for you automatically, so I'm not going to suggest you do it manually. Did you install it?

If not

Do you have an efi shell and visible filesystem? If so, can you <exit> the shell and boot into EFI/gentoo/boot64.efi from the subsequent menu? If so, boot in and install the efibootmgr per above link and you should be good.

If you have a shell but no filesystems showing, or no efi shell loads the problem is elsewhere.

Ian


When i try to boot from EFI it goes on black screen, so i think i don't have an efi shell. I can boot directly from the bios btw, like showed in this image

http://s30.postimg.org/5qvpuetcw/20150619_230950.jpg

but i don't think this is an efi shell, it's the usual BIOS screen activated by pressing canc while booting (it says UEFI/BIOS).
I can't even use efibootmgr because it says I don't have EFI variables. I tried to modprobe efivars while chrooted in my system but it didnt work.
The problem is efivars is in live cd install (gentoo) but vanishes when I chroot in my system.

Thanks
Back to top
View user's profile Send private message
ian.au
Guru
Guru


Joined: 07 Apr 2011
Posts: 434
Location: Australia

PostPosted: Sat Jun 20, 2015 1:01 pm    Post subject: Reply with quote

No, that isn't an efi shell.

Did you work through the efi page on the wiki? You'll see that to get the efivars installed requires a very specific procedure.

Upon review of this topic, It appears you have introduced efi to overcome a problem of a new install not booting. It's not a good way forward.

Let's not discuss efi when the problem is a non-boot install. Something went wrong with the original install; that should be fixed and a standard handbook install followed until you get a system up
.
The handbook-recommended method is Grub2 so focus on getting that to boot first; you can always move to efi if you have a need or desire to later.

From where you are now I'd mount up the partitions again, look around eg.
Code:
ls -la /mnt/gentoo/boot/*
Code:
ls-la /mnt/gentoo/usr/src
and see what is there, post back the results if you like.

Depending upon what you find, it should be reasonably easy to pick up where you've deviated from the install guide first time around, and chroot back in to set up a booting system. See how you go, post back if you need help.

Cheers
Back to top
View user's profile Send private message
Xploderman90
n00b
n00b


Joined: 27 Aug 2012
Posts: 57

PostPosted: Sat Jun 20, 2015 9:02 pm    Post subject: Reply with quote

ian.au wrote:
No, that isn't an efi shell.

Did you work through the efi page on the wiki? You'll see that to get the efivars installed requires a very specific procedure.

Upon review of this topic, It appears you have introduced efi to overcome a problem of a new install not booting. It's not a good way forward.

Let's not discuss efi when the problem is a non-boot install. Something went wrong with the original install; that should be fixed and a standard handbook install followed until you get a system up
.
The handbook-recommended method is Grub2 so focus on getting that to boot first; you can always move to efi if you have a need or desire to later.

From where you are now I'd mount up the partitions again, look around eg.
Code:
ls -la /mnt/gentoo/boot/*
Code:
ls-la /mnt/gentoo/usr/src
and see what is there, post back the results if you like.

Depending upon what you find, it should be reasonably easy to pick up where you've deviated from the install guide first time around, and chroot back in to set up a booting system. See how you go, post back if you need help.

Cheers


I'm a little noob about EFI and new mobos...btw i have understood what you have said so I followed grub2 install wiki :D

I reformatted boot partition with ext2, disabled efi flags in kernel, and moved it with make install after compiling kernel.

Then i removed GRUB_PLATFORMS from make.conf, so now it installs grub2 with i386 and there isn't a problem. I gave
Code:
grub2-mkconfig -o /boot/grub/grub.cfg

so now i have configuration file in that directory. That command said that it found gentoo-4.0.5 kernel so i think config is ok.

But when i try to boot from the hdd, it simply does nothing, then goes to windows boot loader and windows starts.
If i try to force boot from hdd by bios, it simply return to bios.

These are the results for

Code:
ls -la /mnt/gentoo/boot/*


http://s16.postimg.org/6we66708k/20150620_225042.jpg

Code:
ls-la /mnt/gentoo/usr/src


http://s7.postimg.org/z42a5ctl6/20150620_225111.jpg

And this is how my hdd partitions look like now

http://s4.postimg.org/xtb5lm7x8/20150620_223636.jpg

I think i did a step forward into fixing this problem
Thanks
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


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

PostPosted: Sat Jun 20, 2015 10:15 pm    Post subject: Reply with quote

boot legacy had a /boot/boot symlink. Don't know if this is needed by grub2.

Example:
gentoo ~ # ls -l /boot
total 11812
-rw-r--r-- 1 root portage 2375476 May 24 12:01 System.map-genkernel-x86_64-3.18.12-gentoo
lrwxrwxrwx 1 root root 1 Dec 25 2010 boot -> .
drwxr-xr-x 2 root root 4096 May 24 12:13 grub
-rw-r--r-- 1 root portage 5631248 May 24 12:13 initramfs-genkernel-x86_64-3.18.12-gentoo
-rw-r--r-- 1 root portage 4044592 May 24 12:01 kernel-genkernel-x86_64-3.18.12-gentoo
drwx------ 2 root root 16384 Dec 25 2010 lost+found
Back to top
View user's profile Send private message
ian.au
Guru
Guru


Joined: 07 Apr 2011
Posts: 434
Location: Australia

PostPosted: Sat Jun 20, 2015 11:38 pm    Post subject: Reply with quote

Xploderman90 wrote:


I'm a little noob about EFI and new mobos...btw i have understood what you have said so I followed grub2 install wiki :D

I reformatted boot partition with ext2, disabled efi flags in kernel, and moved it with make install after compiling kernel.

Then i removed GRUB_PLATFORMS from make.conf, so now it installs grub2 with i386 and there isn't a problem. I gave
Code:
grub2-mkconfig -o /boot/grub/grub.cfg

so now i have configuration file in that directory. That command said that it found gentoo-4.0.5 kernel so i think config is ok.



[Edit: Oops should have updated world, didn't know that 4.0.5 had gone stable, sorry]

paste your /etc/portage/make.conf

My advice remains to return and work the broken install, retracing every step until you found out what you did wrong.

I can assure you that
a) You missed something
b) if you take the time to find what, it will be much faster than starting from scratch again, which is likely in your future if you keep going this way.
c) if you follow the handbook to configure a stable system, it will boot.

The handbook has all the answers to your issues here.
Tony0945 wrote:
boot legacy had a /boot/boot symlink. Don't know if this is needed by grub2.

Grub2 doesn't require this.
Back to top
View user's profile Send private message
Xploderman90
n00b
n00b


Joined: 27 Aug 2012
Posts: 57

PostPosted: Sun Jun 21, 2015 10:46 pm    Post subject: Reply with quote

ian.au wrote:
Xploderman90 wrote:


I'm a little noob about EFI and new mobos...btw i have understood what you have said so I followed grub2 install wiki :D

I reformatted boot partition with ext2, disabled efi flags in kernel, and moved it with make install after compiling kernel.

Then i removed GRUB_PLATFORMS from make.conf, so now it installs grub2 with i386 and there isn't a problem. I gave
Code:
grub2-mkconfig -o /boot/grub/grub.cfg

so now i have configuration file in that directory. That command said that it found gentoo-4.0.5 kernel so i think config is ok.



[Edit: Oops should have updated world, didn't know that 4.0.5 had gone stable, sorry]

paste your /etc/portage/make.conf

My advice remains to return and work the broken install, retracing every step until you found out what you did wrong.

I can assure you that
a) You missed something
b) if you take the time to find what, it will be much faster than starting from scratch again, which is likely in your future if you keep going this way.
c) if you follow the handbook to configure a stable system, it will boot.

The handbook has all the answers to your issues here.
Tony0945 wrote:
boot legacy had a /boot/boot symlink. Don't know if this is needed by grub2.

Grub2 doesn't require this.


I don't have any other installs, I'm trying to make this work (it's a new SSD hard disk :D)
I have read and re-read the wiki but it seems that it's all right according to the handbook.
The problem is I've installed gentoo a million times, but always via MBR and with legacy-grub. Now i have to install it via GPT because windows 7 partitioned my ssd with GPT and i want to stick with it...

In this photo there is my make.conf

http://s4.postimg.org/6gizycbdo/20150622_003549.jpg

The problem is grub2 doesn't load, only black screen..so it's not a kernel problem, grub2-install says it's installed but there is no trace of it when trying to boot from ssd (and not windows boot loader).
Maybe the problem is because Windows 7 have it's own EFI partition with boot loader? In my hard disk there are 2 partitions flagged as bootable like shown in this image (win AND boot partition)

http://s4.postimg.org/xtb5lm7x8/20150620_223636.jpg

Thanks for your time
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


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

PostPosted: Sun Jun 21, 2015 11:00 pm    Post subject: Reply with quote

Does this link help?: http://superuser.com/questions/187476/can-i-dual-boot-linux-and-windows-7-but-use-the-windows-bootloader-instead-of-gr

I use grub lagacy and XP, using the XP bootloader to launch grub. According to what I've read, it's different with Win 7. However, since Windows is booting, it makes sense to use that bootloader. I could tell you exactly how with XP, but 7 is different. The manual probably assumes grub2 as the primary bootloader with Windows chainloading, but it may be simpler the otherway around. Read that link and also google "windows 7 bootloader linux" for other links.
Back to top
View user's profile Send private message
ian.au
Guru
Guru


Joined: 07 Apr 2011
Posts: 434
Location: Australia

PostPosted: Sun Jun 21, 2015 11:32 pm    Post subject: Reply with quote

Quote:
The problem is grub2 doesn't load, only black screen..so it's not a kernel problem, grub2-install says it's installed but there is no trace of it when trying to boot from ssd (and not windows boot loader).
Maybe the problem is because Windows 7 have it's own EFI partition with boot loader? In my hard disk there are 2 partitions flagged as bootable like shown in this image (win AND boot partition)


Okay,

[caveat]I can't help much with windows dual boot scenarios, I haven't had win outside of an old vm install of my 2006 xp machine for years.[/caveat]

It really seems like grub can't find the partition where the kernel is installed. I haven't had any problems with my Grub2 installs so not all that sure where to start, but I'd start with finding out if we told it to look in the right place:

Mount up your partitions again post the output of:
Code:
grep vmlinuz /mnt/gentoo/boot/grub/grub.cfg

Code:
cat /mnt/gentoo/etc/fstab


[Edits to add mountpoint to path]
Back to top
View user's profile Send private message
Xploderman90
n00b
n00b


Joined: 27 Aug 2012
Posts: 57

PostPosted: Wed Jun 24, 2015 11:13 am    Post subject: Reply with quote

Hi all :)

I was trying all the things to make boot this install. Talking with co-workers, it appears that if i have a EFI partition (used by windows) I have to install grub2 in efi mode and not standard.
So i figured out that i wasn't installing correctly grub because liveCD doesn't boot in UEFI so doesn't have efivars module.
I downloaded SysrescueCD, booted in UEFI mode and installed grub2 and...now it loads!

BUT i have another problem...it blocks when loading kernel. It writes "loading kernel 4.0.5 gentoo.." and it blocks.
The strange thing is that i hear hdd rumors in my pc for a while, but nothing happens! If I press CTRL+ALT+CANC, after 3 seconds it reboots!
So i tried to install directly as a UEFI entry by efibootmgr but same thing happens...when loading, black screen...if pressing CTRL+ALT+CANC, it reboots after 3 seconds!
Maybe it's some setting in kernel that make OS not display anything? I don't know...

This is my .config

http://pastebin.com/BuxtAcPq

This is
Code:
 grep vmlinuz /boot/grub/grub.cfg


Code:

   linux   /boot/vmlinuz-4.0.5-gentoo root=/dev/sda5 ro 
   linux   /boot/vmlinuz-4.0.5-gentoo root=/dev/sda5 ro 
   linux   /boot/vmlinuz-4.0.5-gentoo root=/dev/sda5 ro single


This is

Code:
cat /etc/fstab


Code:

# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed); notail increases performance of ReiserFS (at the expense of storage
# efficiency).  It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#

# <fs>         <mountpoint>   <type>      <opts>      <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.

/dev/sda5               /               ext4            noatime         0 1
/dev/sda1      /boot/efi   vfat      noatime      1 2
#/dev/sdb2      /mnt/hdd   ext4      noatime      0 1

#/dev/SWAP      none      swap      sw      0 0
#/dev/cdrom      /mnt/cdrom   auto      noauto,ro   0 0
#/dev/fd0      /mnt/floppy   auto      noauto      0 0


This is all grub.cfg

http://pastebin.com/mwvLFDe8
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


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

PostPosted: Wed Jun 24, 2015 1:26 pm    Post subject: Reply with quote

no swap partition? How much memory do you have?
Back to top
View user's profile Send private message
Xploderman90
n00b
n00b


Joined: 27 Aug 2012
Posts: 57

PostPosted: Wed Jun 24, 2015 1:31 pm    Post subject: Reply with quote

Tony0945 wrote:
no swap partition? How much memory do you have?

8 GB RAM

I have SSD so i will symlink swap in another HDD, but i have to finish this install (then move significant files and reformat other hdd)

I'm 100% sure problem is in kernel (or maybe because i don't have swap?) because i tried the conf below (in /etc/grub.d/40_custom), trying every hdd and every partition, then i finally found it
So grub2 loads kernel but then i can't see anything...

Code:

menuentry "Gentoo" {
set root=(hd2,5)
linux /boot/vmlinuz26 root=/dev/disk/by-uuid/{idontrememberthis} ro
}


this is my .config

http://pastebin.com/BuxtAcPq


It the problem is because i don't have a swap partition, i'll hide myself because of the shame :D
Back to top
View user's profile Send private message
ian.au
Guru
Guru


Joined: 07 Apr 2011
Posts: 434
Location: Australia

PostPosted: Wed Jun 24, 2015 2:01 pm    Post subject: Reply with quote

Do you have a Kernel entry defined in /etc/default/grub?

You've made it to the bootloader, so this is pretty good progress.
Back to top
View user's profile Send private message
Xploderman90
n00b
n00b


Joined: 27 Aug 2012
Posts: 57

PostPosted: Wed Jun 24, 2015 2:10 pm    Post subject: Reply with quote

@Tony0945

I tried mounting swap too (8 GB) but nothing changed

ian.au wrote:
Do you have a Kernel entry defined in /etc/default/grub?

You've made it to the bootloader, so this is pretty good progress.


This is my /etc/default/grub

Code:

# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/files/grub.default-3,v 1.5 2015/03/25 01:58:00 floppym Exp $
#
# To populate all changes in this file you need to regenerate your
# grub configuration file afterwards:
#     'grub2-mkconfig -o /boot/grub/grub.cfg'
#
# See the grub info page for documentation on possible variables and
# their associated values.

GRUB_DISTRIBUTOR="Gentoo"

# Default menu entry
#GRUB_DEFAULT=0

# Boot the default entry this many seconds after the menu is displayed
#GRUB_TIMEOUT=5
#GRUB_TIMEOUT_STYLE=menu

# Append parameters to the linux kernel command line
#GRUB_CMDLINE_LINUX=""
#
# Examples:
#
# Boot with network interface renaming disabled
# GRUB_CMDLINE_LINUX="net.ifnames=0"
#
# Boot with systemd instead of sysvinit (openrc)
# GRUB_CMDLINE_LINUX="init=/usr/lib/systemd/systemd"

# Append parameters to the linux kernel command line for non-recovery entries
#GRUB_CMDLINE_LINUX_DEFAULT=""

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal.
# Note that you can use only modes which your graphic card supports via VBE.
# You can see them in real GRUB with the command `vbeinfo'.
#GRUB_GFXMODE=640x480

# Set to 'text' to force the Linux kernel to boot in normal text
# mode, 'keep' to preserve the graphics mode set using
# 'GRUB_GFXMODE', 'WIDTHxHEIGHT'['xDEPTH'] to set a particular
# graphics mode, or a sequence of these separated by commas or
# semicolons to try several modes in sequence.
#GRUB_GFXPAYLOAD_LINUX=

# Path to theme spec txt file.
# The starfield is by default provided with use truetype.
# NOTE: when enabling custom theme, ensure you have required font/etc.
#GRUB_THEME="/boot/grub/themes/starfield/theme.txt"

# Background image used on graphical terminal.
# Can be in various bitmap formats.
#GRUB_BACKGROUND="/boot/grub/mybackground.png"

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to kernel
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY=true

# Uncomment to disable generation of the submenu and put all choices on
# the top-level menu.
# Besides the visual affect of no sub menu, this makes navigation of the
# menu easier for a user who can't see the screen.
#GRUB_DISABLE_SUBMENU=y

# Uncomment to play a tone when the main menu is displayed.
# This is useful, for example, to allow users who can't see the screen
# to know when they can make a choice on the menu.
#GRUB_INIT_TUNE="60 800 1"


But the problem happens not only using bootloader (GRUB2) but also using uefi entry too (by efibootmgr). When loading kernel, it freezes. I can't see anything...I'm sure i have some error in flags for kernel. I followed all documentations still this problem happens, maybe i need some flag for graphical rendering? I really don't know...
Back to top
View user's profile Send private message
ian.au
Guru
Guru


Joined: 07 Apr 2011
Posts: 434
Location: Australia

PostPosted: Wed Jun 24, 2015 2:41 pm    Post subject: Reply with quote

I'm guessing that ...loading kernel-... message indicates that the system uefi knows it's looking for grub's efi file for a 4.0.5 kernel, but doesnt find it.

Did you try

from https://wiki.gentoo.org/wiki/GRUB2

Quote:

Alternative: using the default UEFI firmware location

If the system's UEFI firmware fails to find GRUB2's EFI bootloader file, using the default boot loader location should provide a working solution. This circumvents the boot menu managed by efibootmgr and thus offers reduced functionality, but is less error prone. To do this, verify the EFI partition is mounted at /boot/efi then copy the file grubx64.efi located at /boot/efi/EFI/gentoo/grubx64.efi to /boot/efi/EFI/BOOT/BOOTX64.EFI. This example assumes a 64-bit EFI system, adjust accordingly for 32-bit EFI systems.
Back to top
View user's profile Send private message
Xploderman90
n00b
n00b


Joined: 27 Aug 2012
Posts: 57

PostPosted: Wed Jun 24, 2015 2:50 pm    Post subject: Reply with quote

ian.au wrote:
I'm guessing that ...loading kernel-... message indicates that the system uefi knows it's looking for grub's efi file for a 4.0.5 kernel, but doesnt find it.

Did you try

from https://wiki.gentoo.org/wiki/GRUB2

Quote:

Alternative: using the default UEFI firmware location

If the system's UEFI firmware fails to find GRUB2's EFI bootloader file, using the default boot loader location should provide a working solution. This circumvents the boot menu managed by efibootmgr and thus offers reduced functionality, but is less error prone. To do this, verify the EFI partition is mounted at /boot/efi then copy the file grubx64.efi located at /boot/efi/EFI/gentoo/grubx64.efi to /boot/efi/EFI/BOOT/BOOTX64.EFI. This example assumes a 64-bit EFI system, adjust accordingly for 32-bit EFI systems.


Tried, didn't change anything...

BTW I'm sure it finds the kernel, because when it don't find it, it says that it can't find kernel...
And i have a new clue..

Code:
/var/log/rc.log

actually logs when i'm trying to boot, with flags [ok] and so on (usual boot screen)

So kernel loads but I can't see a thing, i'm pretty sure I miss some flags like framebuffer or similar...

And it's explained why CTRL+ALT+CANC works!! I can see shutdown logs too...
Back to top
View user's profile Send private message
ian.au
Guru
Guru


Joined: 07 Apr 2011
Posts: 434
Location: Australia

PostPosted: Wed Jun 24, 2015 3:05 pm    Post subject: Reply with quote

Oh, okay. Sorry, I misunderstood.

Are you trying to boot the install into a console or xterm?

ie(Can you switch out to another console <ctl> <shift> + <F(x)> after the screen freezes?)
Back to top
View user's profile Send private message
Xploderman90
n00b
n00b


Joined: 27 Aug 2012
Posts: 57

PostPosted: Wed Jun 24, 2015 3:35 pm    Post subject: Reply with quote

ian.au wrote:
Oh, okay. Sorry, I misunderstood.

Are you trying to boot the install into a console or xterm?

ie(Can you switch out to another console <ctl> <shift> + <F(x)> after the screen freezes?)


It boots directly to console, i don't have any GUI installed.
I tried to switch console but nothing changes, but i echoed some strings in rc.log and rebooted while seeing nothing at all (all blind ehehe)

So it's definitely some kernel flag...help!! :D
Back to top
View user's profile Send private message
Xploderman90
n00b
n00b


Joined: 27 Aug 2012
Posts: 57

PostPosted: Wed Jun 24, 2015 6:02 pm    Post subject: Reply with quote

Maybe the problem is GRUB2...I have changed some settings in /etc/default/grub

Code:

GRUB_TERMINAL=console
GRUB_GFXMODE=640x480


and now I can see GRUB2 saying its going in "blind mode".

I tried to set

Code:
GRUB_GFXPAYLOAD_LINUX=text


but, when booting, it doesn't recognize "text" as valid (in conf comments is suggested as a valid option...i don't know what to say).
Back to top
View user's profile Send private message
Xploderman90
n00b
n00b


Joined: 27 Aug 2012
Posts: 57

PostPosted: Wed Jun 24, 2015 7:05 pm    Post subject: Reply with quote

WHOAH!! Solved :D

The problem was in kernel..I had to activate console framebuffer AND EFI framebuffer support. I don't know why but every time I had one or the other activated, (or i had KMS enabled so it was overriding efi framebuffer i think).

Well, now i can get into shells and everything so..thanks to all for your time!
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


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

PostPosted: Wed Jun 24, 2015 8:33 pm    Post subject: Reply with quote

Quote:

@Tony0945

I tried mounting swap too (8 GB) but nothing changed


I just thought maybe you didn't have enough memory. Glad you found the problem.

The manual always tells you to build a new kernel immediately. I think that's a mistake. For the unfamiliar, it's better to take a default genkernel kernel and get the system booting THEN try to optimize the kernel.
Back to top
View user's profile Send private message
ian.au
Guru
Guru


Joined: 07 Apr 2011
Posts: 434
Location: Australia

PostPosted: Wed Jun 24, 2015 10:42 pm    Post subject: Reply with quote

Great news :D , these can be tricky problems to fix. Glad you persisted.

Gentoo: when things go wrong (usually when you least need it) it teaches you the most.

I don't know if I use it as my main distro because of this or despite it :)

At least you should be on your way with the assignment, good luck.
Back to top
View user's profile Send private message
Xploderman90
n00b
n00b


Joined: 27 Aug 2012
Posts: 57

PostPosted: Thu Jun 25, 2015 12:51 pm    Post subject: Reply with quote

Yes, with gentoo you have to master every single part of your system. The problem is when setting up, but then you will have no problems at all. I
have several gentoos and mantainance cost is about 0 (only remember to emerge --sync and --update on a daily basis).
After you have set up the system, it's likely you'll never touch it in the future. And if there are problems, you know EXACTLY where to search because...well you build it from scratch :D
Thank you again
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