Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Computer refuses to boot Gentoo
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
weegeeweeg
n00b
n00b


Joined: 17 Aug 2018
Posts: 6

PostPosted: Sat Aug 18, 2018 1:14 am    Post subject: Computer refuses to boot Gentoo Reply with quote

I'm installing Gentoo alongside Windows 10 on a Dell Inspiron 7559. Everything went fine until the motherboard firmware didn't recognize Grub, so I tried using efibootmgr instead. It wouldn't work because the minimal install CD only boots in MBR mode, and in order to modprobe efivars you need to be running the shell in UEFI mode. So I made a system rescue CD (usb) and was able to run it in UEFI mode and make efibootmgr work. However, now when I try to boot from my bootx64.efi created by efibootmgr, it will just pass over and it boot from something else (Windows, network, usb, etc). I'm really not sure where to go from here, I rebuilt the kernel, I turned off windows fastboot, legacy OPROM is disabled, and secure boot is off. What else could possibly be stopping Gentoo from booting?

My /etc/fstab:
/dev/sda1 /boot fat32 defaults,noatime 0 2
/dev/sda4 / ext4 defaults,noatime 0 1

[topic]efibootmgr -v[/topic]
BootCurrent: 1005
Timeout: 1 seconds
BootOrder: 0002,0000
Boot0000* Windows Boot Manager HD(1,GPT,(uuid),(path to /boot/efi/microsoft/boot/bootmgfw.efi)) (random irrelevent letters and numbers)
Boot0002* Gentoo VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)

To be clear, I haven't been able to boot into the system het, and unless there's some way to post logs here from the system rescue CD I have to manually type them so let me know if there's any info I missed.

Thanks in advance!
Back to top
View user's profile Send private message
axl
Guru
Guru


Joined: 11 Oct 2002
Posts: 542
Location: Romania

PostPosted: Sat Aug 18, 2018 1:20 am    Post subject: Reply with quote

the minimal iso image doesn't have efi support. I'm given to understand the live dvd image does. or something that is in gentoo handbook. system rescue cd that is. or another live iso from other distros.

your /sys/firmware/efi/vars has to be mounted to install a bootloader in efi mode. and to do that, you have to boot in efi mode first. so... good luck :)


EDIT: dont change anything. everything seems fine. just find another medium to boot in efi mode, and then just go about installation like it was a minimal iso. mount /mnt/gentoo. mount proc sys dev, bla bla. everything like the handbook. just use a boot medium that has /sys/firmware/efi/vars mounted upon boot.
Back to top
View user's profile Send private message
weegeeweeg
n00b
n00b


Joined: 17 Aug 2018
Posts: 6

PostPosted: Sat Aug 18, 2018 1:34 am    Post subject: Reply with quote

axl wrote:
the minimal iso image doesn't have efi support. I'm given to understand the live dvd image does. or something that is in gentoo handbook. system rescue cd that is. or another live iso from other distros.

your /sys/firmware/efi/vars has to be mounted to install a bootloader in efi mode. and to do that, you have to boot in efi mode first. so... good luck :)


EDIT: dont change anything. everything seems fine. just find another medium to boot in efi mode, and then just go about installation like it was a minimal iso. mount /mnt/gentoo. mount proc sys dev, bla bla. everything like the handbook. just use a boot medium that has /sys/firmware/efi/vars mounted upon boot.


Yeah I did that beforehand, and it didn't work. Fortunately though, I was able to get it running by renaming the efi file to BOOTMGFW.EFI because it's a whitelisted file name I guess. Now I can boot in, but it throws out some errors and sticks me right back into a shell with no way to figure out why it crashed. At least I made progress! :D

Could you tell me how I can log what happens during the boot process so I can figure out what went wrong?
Back to top
View user's profile Send private message
axl
Guru
Guru


Joined: 11 Oct 2002
Posts: 542
Location: Romania

PostPosted: Sat Aug 18, 2018 1:37 am    Post subject: Reply with quote

weegeeweeg wrote:
Could you tell me how I can log what happens during the boot process so I can figure out what went wrong?


it's a complicated question. depends on what type of logging manager you used. if you enabled systemd or not.

if you have systemd, journalctl --list-boots . and then journalctl -b "this_boot".

without... you would have to look into logging managers. /var/log/messages. /var/log/rc.log. depends.
Back to top
View user's profile Send private message
weegeeweeg
n00b
n00b


Joined: 17 Aug 2018
Posts: 6

PostPosted: Sat Aug 18, 2018 1:49 am    Post subject: Reply with quote

axl wrote:
weegeeweeg wrote:
Could you tell me how I can log what happens during the boot process so I can figure out what went wrong?


it's a complicated question. depends on what type of logging manager you used. if you enabled systemd or not.

if you have systemd, journalctl --list-boots . and then journalctl -b "this_boot".

without... you would have to look into logging managers. /var/log/messages. /var/log/rc.log. depends.


Everything seems fine in messages (using openRC) and rc.log doesn't exist. It's not supposed to be booting into a shell, right? I get a login "screen" as in, it asks for login and password in the full screen shell, pretty much identical to the live cd/sysrescue. But nothing seems "wrong."
Back to top
View user's profile Send private message
axl
Guru
Guru


Joined: 11 Oct 2002
Posts: 542
Location: Romania

PostPosted: Sat Aug 18, 2018 1:51 am    Post subject: Reply with quote

weegeeweeg wrote:
axl wrote:
weegeeweeg wrote:
Could you tell me how I can log what happens during the boot process so I can figure out what went wrong?


it's a complicated question. depends on what type of logging manager you used. if you enabled systemd or not.

if you have systemd, journalctl --list-boots . and then journalctl -b "this_boot".

without... you would have to look into logging managers. /var/log/messages. /var/log/rc.log. depends.


Everything seems fine in messages (using openRC) and rc.log doesn't exist. It's not supposed to be booting into a shell, right? I get a login "screen" as in, it asks for login and password in the full screen shell, pretty much identical to the live cd/sysrescue. But nothing seems "wrong."


No. it's not supposed to be booted into shell. login and password it's what is supposed to happen :)
Back to top
View user's profile Send private message
weegeeweeg
n00b
n00b


Joined: 17 Aug 2018
Posts: 6

PostPosted: Sat Aug 18, 2018 2:08 am    Post subject: Reply with quote

@axl I installed sysklogd and looked through the logs it provided and nothing is pointing to an error. Do you have any other ideas on what could be preventing the OS from booting into its graphical interface?
Back to top
View user's profile Send private message
axl
Guru
Guru


Joined: 11 Oct 2002
Posts: 542
Location: Romania

PostPosted: Sat Aug 18, 2018 2:10 am    Post subject: Reply with quote

weegeeweeg wrote:
@axl I installed sysklogd and looked through the logs it provided and nothing is pointing to an error. Do you have any other ideas on what could be preventing the OS from booting into its graphical interface?



OHhh. yeah. kernel. X. way long to go.

let's start with the basics. what kind of video adaptor do you have? ati/nvidia? are you sure you factored that in when compiling the kernel and X (make.conf) ?

EDIT. also I dont have this type of hardware, but I have to ask, are we talking about a laptop? I'm given to understand laptops have hybrid video cards and those use totally different drivers.
Back to top
View user's profile Send private message
weegeeweeg
n00b
n00b


Joined: 17 Aug 2018
Posts: 6

PostPosted: Sat Aug 18, 2018 2:19 am    Post subject: Reply with quote

axl wrote:
weegeeweeg wrote:
@axl I installed sysklogd and looked through the logs it provided and nothing is pointing to an error. Do you have any other ideas on what could be preventing the OS from booting into its graphical interface?



OHhh. yeah. kernel. X. way long to go.

let's start with the basics. what kind of video adaptor do you have? ati/nvidia? are you sure you factored that in when compiling the kernel and X (make.conf) ?

EDIT. also I dont have this type of hardware, but I have to ask, are we talking about a laptop? I'm given to understand laptops have hybrid video cards and those use totally different drivers.


Yeah, it has an intel iGPU (530) and GTX 960M. I enabled a setting in the kernel for optimus support, but it said NEW, so that might be it? Other than that I just added support for the iGPU because that's the default and it shouldn't try to run the nvidia one.
I would think that it would complain about the video adapter in the logs though.
I found something useful in the logs, it says
INIT: Runlevel 3
Error: cannot start netmount as net.eth0 would not start

So it's trying to boot from the network I guess? Also, I connected to the net in the shell just fine, so I don't know why it says it won't start.
Back to top
View user's profile Send private message
axl
Guru
Guru


Joined: 11 Oct 2002
Posts: 542
Location: Romania

PostPosted: Sat Aug 18, 2018 2:24 am    Post subject: Reply with quote

weegeeweeg wrote:
axl wrote:
weegeeweeg wrote:
@axl I installed sysklogd and looked through the logs it provided and nothing is pointing to an error. Do you have any other ideas on what could be preventing the OS from booting into its graphical interface?



OHhh. yeah. kernel. X. way long to go.

let's start with the basics. what kind of video adaptor do you have? ati/nvidia? are you sure you factored that in when compiling the kernel and X (make.conf) ?

EDIT. also I dont have this type of hardware, but I have to ask, are we talking about a laptop? I'm given to understand laptops have hybrid video cards and those use totally different drivers.


Yeah, it has an intel iGPU (530) and GTX 960M. I enabled a setting in the kernel for optimus support, but it said NEW, so that might be it? Other than that I just added support for the iGPU because that's the default and it shouldn't try to run the nvidia one.
I would think that it would complain about the video adapter in the logs though.
I found something useful in the logs, it says
INIT: Runlevel 3
Error: cannot start netmount as net.eth0 would not start

So it's trying to boot from the network I guess? Also, I connected to the net in the shell just fine, so I don't know why it says it won't start.



I don't know how much more help I could provide since you use hardware that I don't have from a video card point of view, and network scripts which were phased out a year ago. I'll try.

/etc/conf.d/network file. did you set up that file?

EDIT. you should have that file set up and also should rc-update add net.eth0 boot . did you run that command?

EDIT2: net.ifnames=0. maybe this will help. because maybe eth0 is not eth0. should look into udev permanent rules. but whatever. just one man's opinion.
Back to top
View user's profile Send private message
weegeeweeg
n00b
n00b


Joined: 17 Aug 2018
Posts: 6

PostPosted: Sat Aug 18, 2018 2:35 am    Post subject: Reply with quote

@axl I forgot to set that up this time around because I skipped through a lot of the handbook after failing my first install attempt. I'm not sure that will solve the problem, but I'll try that tomorrow.

Thanks so much for your help! :D
Back to top
View user's profile Send private message
axl
Guru
Guru


Joined: 11 Oct 2002
Posts: 542
Location: Romania

PostPosted: Sat Aug 18, 2018 2:36 am    Post subject: Reply with quote

weegeeweeg wrote:
@axl I forgot to set that up this time around because I skipped through a lot of the handbook after failing my first install attempt. I'm not sure that will solve the problem, but I'll try that tomorrow.

Thanks so much for your help! :D


It's my pleasure :)
Back to top
View user's profile Send private message
oreo
n00b
n00b


Joined: 14 Aug 2018
Posts: 31

PostPosted: Sat Aug 18, 2018 9:01 am    Post subject: Reply with quote

axl wrote:
the minimal iso image doesn't have efi support. I'm given to understand the live dvd image does. or something that is in gentoo handbook. system rescue cd that is. or another live iso from other distros.


I'm not sure that that is true. I've successfully installed gentoo with the minimal installation CD on UEFI systems many many times. (Not liveDVD) If that is not what you meant please correct me.

As to whether the proper tools are installed on the minimal installation disc, I am not sure but you can just emerge the proper packages in the chrooted environment.

-oreo
_________________
"One does not simply, install gentoo."
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13865

PostPosted: Sat Aug 18, 2018 5:26 pm    Post subject: Reply with quote

I believe axl was asserting that you cannot boot that media in UEFI mode. Historically, this was true. I have not checked whether it is still true.

Due to some very strange decisions, configuring certain UEFI properties can only be done while booted in UEFI mode. Thus, if you want to configure the system to boot Gentoo by default and you want to boot through UEFI, you need to start a Linux (not necessarily Gentoo) in UEFI mode to make those changes. (You can sometimes cheat and rely on the UEFI fallback rules to get the same effect by just laying out files in a particular way.) You could also do as the OP did and ignore UEFI entirely. However, some boards ship deficient legacy modes, so using UEFI on those boards is important.
Back to top
View user's profile Send private message
axl
Guru
Guru


Joined: 11 Oct 2002
Posts: 542
Location: Romania

PostPosted: Sat Aug 18, 2018 9:10 pm    Post subject: Reply with quote

Hu wrote:
I believe axl was asserting that you cannot boot that media in UEFI mode. Historically, this was true. I have not checked whether it is still true.

Due to some very strange decisions, configuring certain UEFI properties can only be done while booted in UEFI mode. Thus, if you want to configure the system to boot Gentoo by default and you want to boot through UEFI, you need to start a Linux (not necessarily Gentoo) in UEFI mode to make those changes. (You can sometimes cheat and rely on the UEFI fallback rules to get the same effect by just laying out files in a particular way.) You could also do as the OP did and ignore UEFI entirely. However, some boards ship deficient legacy modes, so using UEFI on those boards is important.


Thank you Hu, that's exactly what I meant :)
Back to top
View user's profile Send private message
oreo
n00b
n00b


Joined: 14 Aug 2018
Posts: 31

PostPosted: Sat Aug 18, 2018 9:12 pm    Post subject: Reply with quote

Hu wrote:
(You can sometimes cheat and rely on the UEFI fallback rules to get the same effect by just laying out files in a particular way.)


Welp, that explains why whenever I install grub from the minimal installation CD, I get a "this system does not support efi variables." I'm guessing that is the only reason it worked. The first time, I had to manually tell my bios where grubx64.efi was, but other systems it usually auto-detects it. (That explains it.)

Is a UEFI minimal installation disc for gentoo possible/in the future plans? I know a system with poor auto-detection would have to have EFI variables configured before hand making a UEFI disc not plausible. (Or is that incorrect?) How do other LiveCDs do it?
_________________
"One does not simply, install gentoo."
Back to top
View user's profile Send private message
axl
Guru
Guru


Joined: 11 Oct 2002
Posts: 542
Location: Romania

PostPosted: Sat Aug 18, 2018 9:15 pm    Post subject: Reply with quote

bios does it. when you press like F2 or F12 or whatever, the UEFI OSes will be clearly marked with "UEFI". :)

That's where it starts. If your bios doesn't say "UEFI" forget looking for efi vars.


UHM, if i understood the question correctly...
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13865

PostPosted: Sat Aug 18, 2018 10:15 pm    Post subject: Reply with quote

It is possible, but I am not aware of any plans to make one. There are Gentoo-based UEFI boot media, but none built and maintained by Gentoo's core release team.
Back to top
View user's profile Send private message
oreo
n00b
n00b


Joined: 14 Aug 2018
Posts: 31

PostPosted: Sat Aug 18, 2018 11:21 pm    Post subject: Reply with quote

I guess my question was assuming that EFI variables are stored on the bios. If so, how does an EFI live CD work? On bioses with poor EFI auto-detection features, the bios would need to have EFI variables set up before hand for that specific live CD. Wouldn't that make EFI live CDs impossible for systems that don't have good auto-detection features and only work if the EFI vars are set up correctly?

There is a flaw somewhere in my reasoning, not sure where it is though.
_________________
"One does not simply, install gentoo."
Back to top
View user's profile Send private message
Leio
Developer
Developer


Joined: 27 Feb 2003
Posts: 487
Location: Estonia

PostPosted: Mon Aug 20, 2018 9:18 am    Post subject: Reply with quote

To the best of my knowledge, adding support for EFI is being actively worked on for official minimum-cd or some other mediums, if not done already.
_________________
GNOME team lead; GStreamer; MIPS/ARM64
Back to top
View user's profile Send private message
axl
Guru
Guru


Joined: 11 Oct 2002
Posts: 542
Location: Romania

PostPosted: Mon Aug 20, 2018 6:52 pm    Post subject: Reply with quote

oreo wrote:
I guess my question was assuming that EFI variables are stored on the bios. If so, how does an EFI live CD work? On bioses with poor EFI auto-detection features, the bios would need to have EFI variables set up before hand for that specific live CD. Wouldn't that make EFI live CDs impossible for systems that don't have good auto-detection features and only work if the EFI vars are set up correctly?

There is a flaw somewhere in my reasoning, not sure where it is though.


I don't know all the internals of the firmware (bios) but it stands to reason that a fresh computer (one that hasn't been installed) has no efivars at all. Therefor the bios reads disks available and composes what will later become efivars. Right?
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Tue Aug 21, 2018 12:29 pm    Post subject: Reply with quote

axl wrote:
Therefor the bios reads disks available and composes what will later become efivars. Right?
No, not really. UEFI firmware is installed in NVRAM (flash) memory on the motherboard. efivar and efivarfs are kernel constructs used in linux to access and modify the content of the NVRAM. The terms efivar and efivarfs are not in the UEFI specification.

The UEFI firmware is not contained in the BIOS. BIOS is replaced by UEFI. The UEFI specification requires that the UEFI firmware provide a legacy BIOS mode.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
axl
Guru
Guru


Joined: 11 Oct 2002
Posts: 542
Location: Romania

PostPosted: Tue Aug 21, 2018 9:41 pm    Post subject: Reply with quote

DONAHUE wrote:
UEFI firmware is installed in NVRAM (flash) memory on the motherboard


no it isn't. it's in the "rom" module. in nvram it saves the settings of the rom.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13865

PostPosted: Wed Aug 22, 2018 1:06 am    Post subject: Reply with quote

Some vendors might put it in ROM, but placing any complex software in true ROM is a terrible idea, since it means the only way to correct defects is to discard the board to which that ROM was soldered and install a new board. Rewritable persistent memory is a much better choice. Flash memory is a popular way to satisfy this requirement. Ideally, the board will come with a separate, possibly ROM-backed, program for use as an emergency recovery environment if the flashed program is broken.

Do you have a citation for consumer boards that use true ROM to store their UEFI code?
Back to top
View user's profile Send private message
axl
Guru
Guru


Joined: 11 Oct 2002
Posts: 542
Location: Romania

PostPosted: Thu Aug 23, 2018 5:04 am    Post subject: Reply with quote

Hu wrote:
Some vendors might put it in ROM, but placing any complex software in true ROM is a terrible idea, since it means the only way to correct defects is to discard the board to which that ROM was soldered and install a new board. Rewritable persistent memory is a much better choice. Flash memory is a popular way to satisfy this requirement. Ideally, the board will come with a separate, possibly ROM-backed, program for use as an emergency recovery environment if the flashed program is broken.

Do you have a citation for consumer boards that use true ROM to store their UEFI code?


no. i just make it up as i go along to be honest.

but building on your idea, rom is just some flash memory that you can write in certain situations. which is how most vendors put their firmware in. it didn't actually change over the years.

and the nvram DONAHUE talked about was there since always. a way to save bios settings (that's why it has a battery in), now it's a way to save uefi firmware settings (still why we have the battery in). and it's also readable/writable from the os. which is cool. Another version of me wants to say "big whoop". so yeah.

Quote:

I guess my question was assuming that EFI variables are stored on the bios.


so that was the original question. some variables are stored in the nvram thingie. some are scanned upon boot. and uefi firmware still sits in some rewritable rom module. which is kinda funny. until hackers fark that up too.
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 1, 2  Next
Page 1 of 2

 
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