Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Messing with bios and efi-boot, system broken.
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3311
Location: Rasi, Finland

PostPosted: Thu Mar 29, 2018 10:29 pm    Post subject: Reply with quote

Ok. My time to guess.

For some reason the UEFI still fails to locate the "efistubbed" kernel. I've been there with one AMD APU UEFI laptop.
If UEFI cannot locate, boot or does recognize the OS loader (the efistub kernel in this case), it then searches the ESP partition for "\BOOT\BOOTX64.EFI" and tries to boot it.
I managed to properly configure the UEFI to boot into the efistub kernel by downloading some uefi shell application and place it to "\BOOT\BOOTX64.EFI". Then via the shell I manually created a startup file for the UEFI shell. Th startup file only had a timeout (to enter the setup) and then a command to load the efistub kernel. I never got the UEFI to boot the efistub kernel directly. :( But at least it was still UEFI which loaded the kernel.
If you're giving paths for UEFI directly, always remember to use backslash as directory separator. I think even Windows supports slash nowdays as separator, but afaik most UEFI implementations do not.

If the UEFI loads GRUB after whatever you try to do, then it might be reading the OS loader from disk offsets, because all other methods have failed? Yeah. I know. Wild guess. I'd try to zero the whole ESP (using dd) and then mkfs it and put the files back.

It's funny how I've also managed to get UEFI GRUB working ok, but efistub kernels have always failed in a way or another. :roll:

And as for why GRUB cannot no longer boot kernel properly... Well GRUB is a complex beast. I think someone will eventually run linux on grub shell to boot linux.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
P.Kosunen
Guru
Guru


Joined: 21 Nov 2005
Posts: 309
Location: Finland

PostPosted: Fri Mar 30, 2018 4:00 pm    Post subject: Reply with quote

1clue wrote:
Because I can, more than anything else. This box isn't in production and I thought it would be good to figure this out.

Good to practise, but stub kernel just makes things more difficult IMO.

If that stub kernel does not print anything to screen there might be something missing, i remember having same problem when missing some framebuffer driver.
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3311
Location: Rasi, Finland

PostPosted: Mon Apr 02, 2018 5:41 pm    Post subject: Reply with quote

P.Kosunen wrote:
Good to practise, but stub kernel just makes things more difficult IMO.
It's mostly simpler, but you need to store the kernel command line inside the kernel, which kinda ruins the simplicity in some cases because to change the command line you need to recompile the kernel.
There might be exceptions if the UEFI implementation somehow allows to pass arguments for the kernel... In fact, I think I've seen such UEFIs...
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
grumblebear
Apprentice
Apprentice


Joined: 26 Feb 2008
Posts: 202

PostPosted: Mon Apr 02, 2018 7:40 pm    Post subject: Reply with quote

No, you do not need to compile the command line arguments into the kernel, the exception being the default bootx64.efi if you want to use that.
Other kernels can be configured with efibootmgr, including the command line. In fact that is the most simple setup in my opinion. Why have to bother with grub, when the UEFI Bios has its own bootloader. I cannot understand why the wiki still seems to favor grub for first time installs. There are dozens of threads here about struggling with grub and boot partitions.
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3311
Location: Rasi, Finland

PostPosted: Mon Apr 02, 2018 7:59 pm    Post subject: Reply with quote

grumblebear wrote:
Other kernels can be configured with efibootmgr, including the command line.
So this is common among UEFI implementations?

And yes. You're absolutely right about UEFI being cabaple bootloader, so why to have another there...
However, I have at least one reason to use a seperate bootloader: The ability to boot rescue image without actually having physical media for it. This, of course, assumes you don't break your bootloader installation. ;)
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2569

PostPosted: Tue Apr 03, 2018 2:21 pm    Post subject: Reply with quote

At this point I'm thinking I need to:

  1. chroot into the system
  2. Completely remove the new unknown kernel
  3. emerge @system (after update of course)
  4. update grub config
  5. Reinstall grub itself to /EFI/boot/bootx64.efi


Or maybe switch over to REFInd?
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3311
Location: Rasi, Finland

PostPosted: Tue Apr 03, 2018 6:10 pm    Post subject: Reply with quote

1clue wrote:
Or maybe switch over to REFInd?
It sure should be much simpler than GRUB.
It seems that rEFInd expects to find kernel and initrd from the ESP.

If you get it working and being able to recognize (find) kernels automatically, please report here.
I have a love-hate affair with GRUB and I feel like having a little adventure.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2569

PostPosted: Tue Apr 03, 2018 8:11 pm    Post subject: Reply with quote

Zucca wrote:
1clue wrote:
Or maybe switch over to REFInd?
It sure should be much simpler than GRUB.
It seems that rEFInd expects to find kernel and initrd from the ESP.

If you get it working and being able to recognize (find) kernels automatically, please report here.
I have a love-hate affair with GRUB and I feel like having a little adventure.


My affair with grub is hate/hate. At heart I'm a lilo guy. I have NEVER managed to figure out grub, except to get it working and then blindly follow the same procedure over and over again after that. I initially installed this system as grub because I needed it up and running, and then afterward switched to UEFI by what I thought to be the simplest means possible.

I think when this settles down I hope to run rEFInd.

Status:


  1. I disconnected all drives and halted.
  2. I removed the battery and reset the CMOS, for far longer than the recommended 5 seconds. It worked this time, mostly.
  3. I reinstalled the battery and booted the box, again with no drives.
  4. It got boot errors, but after multiple resets and alternating function keys on the screen, I got back into BIOS.
  5. I also completely reset the BMC too.
  6. I STILL had crap from my attempts at boots in the bios.
  7. I deleted everything I could find.
  8. I configured boot order for EFI-only and went with basic drive priorities (cdrom first, etc)
  9. I reattached the drives
  10. I saved and reset the bios
  11. Grub came up, I selected 1 kernel back, and it booted.
  12. I did an update (emerge-webrsync...) which is still going.
  13. I removed the questionable kernel and everything related to it.
  14. I did grub-mkconfig > /boot/grub/grub.cfg


I have high hopes that next boot will be a hands-off boot.

At that point I'll switch over to getting rEFInd to work.
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2569

PostPosted: Wed Apr 04, 2018 2:40 am    Post subject: Reply with quote

Crap.

Now whatever I do, when I power up or reset, the screen says "System initializing..." and then on the lower right, the BIOS post codes go by until it gets to "ED" and then it hangs. For hours.

I've reset everything that can reset. I've unplugged every wire, popped the battery, reset the CMOS, cold reset the BMC. Whether it has drives plugged in or not, it always gets to the ED post code and stops. It doesn't even get to the point where I can press a key to enter the BIOS.

Also, AFAICT, there is no ED bios post code. I'm on AMI Bios 1.76.
Back to top
View user's profile Send private message
bammbamm808
Guru
Guru


Joined: 08 Dec 2002
Posts: 548
Location: Hawaii

PostPosted: Wed Apr 04, 2018 2:56 am    Post subject: Reply with quote

Zucca wrote:
1clue wrote:
Or maybe switch over to REFInd?
It sure should be much simpler than GRUB.
It seems that rEFInd expects to find kernel and initrd from the ESP.

If you get it working and being able to recognize (find) kernels automatically, please report here.
I have a love-hate affair with GRUB and I feel like having a little adventure.


Ive been using rEFInd for years. It finds the efistub kernels reliably and requires minimal fiddling and cinfiguration. Ive also used it to boot win 8.1 flawlessly. It does memtest and any other boot alternatives you might want. It'd easy to skin and theme as well.
_________________
MSI MAG B550 Tomahawk
Ryzen 3900x
32Gb Samsung B-die (16GB dual rank x2) DDR4 @ 3200MHz, cl14
Geforce RTX 2070S 8GB
Samsung m.2 NVME pcie-3.0
Etc....
Back to top
View user's profile Send private message
P.Kosunen
Guru
Guru


Joined: 21 Nov 2005
Posts: 309
Location: Finland

PostPosted: Wed Apr 04, 2018 10:57 am    Post subject: Reply with quote

1clue wrote:
Crap.


support@supermicro.com

Try contacting Supermicros tech support.

https://www.anandtech.com/show/11110/semi-critical-intel-atom-c2000-flaw-discovered

There is also this.
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2569

PostPosted: Wed Apr 04, 2018 4:49 pm    Post subject: Reply with quote

@P.Kosunen,

What a spectacularly craptastic event.

I'm trying really hard to tell you I appreciate your help, but it's difficult given the ramifications.

Maybe I can get another motherboard? I wonder if they'll let me upgrade to a c3958?

More likely I'll be up the creek without a paddle and get to buy my own board.
Back to top
View user's profile Send private message
P.Kosunen
Guru
Guru


Joined: 21 Nov 2005
Posts: 309
Location: Finland

PostPosted: Thu Apr 05, 2018 11:37 am    Post subject: Reply with quote

https://forum.pfsense.org/index.php?topic=126783.0

It sounds like Supermicro will give you new or fixed board even if warranty has expired, just mention Atom C2000 bug. You can ask about upgrade, i would guess it is not possible in case of manufacturer, reseller/store might be able to do it when returning broken product.
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2569

PostPosted: Thu Apr 05, 2018 3:45 pm    Post subject: Reply with quote

That, at least, is really good news. I've already emailed the supermicro support center. If they don't offer to replace it I'll mention the bug.

Your google voodoo is much stronger than mine.

Thanks.
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2569

PostPosted: Thu Apr 05, 2018 6:46 pm    Post subject: Reply with quote

I have an RMA request in, at the direction of the SuperMicro support guy. I should have my RMA number within 24 hours.

Since I got this board I've been impressed with SuperMicro and how they build things. Every piece of hardware is first-rate and performance is fantastic.

When I started having problems, at first I thought it was me or my messing up Gentoo.

When the system failed to even get to the point where I can choose to enter the BIOS I had a sudden dislike of SuperMicro. It no longer seemed possible that this was my doing. It was maybe stronger because I had thought them so rock-solid before. Every piece of consumer hardware I've ever bought has turned out to have some sort of irritating flaw, whether or not it seriously impacted my intended use of the product.

In truth it may have been me messing with a direct-to-kernel boot that caused this failure, based on the link P.Kosunen provided. I have been booting and resetting frequently to get this thing to work, and that actually seems to be something that may exacerbate the aging of that resistor.

At this point, I've had pretty rapid response and instruction to RMA the board from SuperMicro. As well, it's not SuperMicro's fault that the flaw exists, but Intel's. I'm back in love with SuperMicro again. When it comes time to buy new desktop hardware they will definitely be on my short list of suppliers, along with system76 even though it will almost certainly be a gentoo box in short order.
Back to top
View user's profile Send private message
Goverp
Veteran
Veteran


Joined: 07 Mar 2007
Posts: 1972

PostPosted: Fri Apr 06, 2018 8:19 am    Post subject: Reply with quote

I've just entered this swamp myself, a new HP laptop, free up 600 GB disk for Gentoo (hey, one place where Windows 10 is better than Vista!), install via LiveDVD in a USB stick (only took 1hr to find out how to boot that! Thanks Sakaki), and now fighting with rEFInd and HP's and Windows boot managers/loaders.

A relevant point to the above discussion - rEFInd found my Gentoo kernel (in the EFI partition), but the screen went black when I booted into it. I'm pretty sure the issue is that it missed the refind-linux.conf file that specified "root=/dev/sda7" to boot the kernel, and I'd ommitted to include said parameter within the kernel. I think that may be because I called my kernel "gentoo.efi", but reading the rEFInd documentation, there's special handling of files labelled "vmlinux*.efi", so it probably wasn't looking. I also noticed a comment about bootx64.efi not picking up external parameters, so perhaps it's the same problem - the kernel doesn't know where the root partition is.

As an aside, digging into the Windows boot manager configuration (BCDEdit et al). It's default listing hides the firmware boot loader; you need to run "BCDEdit /enum all" to see the {fwbootmgr} entry, which has timeout=0 and the Windows boot manager first on its list. Perhaps that's why all attempt to start say rEFInd instead of the Windows manager fail. I may try fiddling with it in stages - I get seriously worried about bricking my system when playing in the EFI space. ...
_________________
Greybeard
Back to top
View user's profile Send private message
P.Kosunen
Guru
Guru


Joined: 21 Nov 2005
Posts: 309
Location: Finland

PostPosted: Fri Apr 06, 2018 11:17 am    Post subject: Reply with quote

Goverp wrote:
I've just entered this swamp myself, a new HP laptop, free up 600 GB disk for Gentoo (hey, one place where Windows 10 is better than Vista!), install via LiveDVD in a USB stick (only took 1hr to find out how to boot that! Thanks Sakaki), and now fighting with rEFInd and HP's and Windows boot managers/loaders.


I remeber having problems with some old HP Probook with Win7 Pro, it always defaulted to Windows after reboot even when efibootmgr settings did look good. I ended up moving /Microsoft/Boot/bootmgfw.efi to /Microsoft/bootmgfw.efi and copied refind.efi and config to /Microsoft/Boot/bootmgfw.efi + /Microsoft/Boot/refind.conf.

7 entry in refind.conf:
Code:
menuentry winseven {
   icon /EFI/refind/icons/os_win.icns
   loader /EFI/Microsoft/bootmgfw.efi
}
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2569

PostPosted: Fri Apr 20, 2018 4:45 pm    Post subject: Reply with quote

Status update:

My board is on the way back home. I don't know if it's the original board or a different one, but considering the short time my board was at their site before the return was on its way, I suspect the serial number will not match the one I bought.

No problem for me, I'd rather have quick turnaround than the same exact piece of hardware.
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2569

PostPosted: Sat Apr 28, 2018 5:58 am    Post subject: Reply with quote

Another status update:

The board is back. They didn't get my weird BIOS post code of ED. They updated all the firmware, did the hardware fix and sent it back.

Something is wrong with the system. I've ordered some new cables for everything inside but at the moment it's actually running.

I had a bit of a scare, I was messing around with the IPMI software and set the IPMI interface to "dedicated." The problem is, that evidently changes it to the serial port and not a NIC. I don't have a serial cable, and nothing I could do would bring it back. I ordered a usb-to-serial-rj45 cable as well.

I finally found sys-apps/ipmicfg, which is a command-line utility for messing with supermicro firmware. I found out how to reset the BMC network settings from there. It's a pretty handy utility if you have a supermicro box.

So, at the moment I'm running in UEFI boot, with grub as a boot loader. Again.

I might give rEFInd a try. Or maybe I'll try the stub kernels again? IDK right now.
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3311
Location: Rasi, Finland

PostPosted: Sat Apr 28, 2018 7:27 am    Post subject: Reply with quote

1clue wrote:
So, at the moment I'm running in UEFI boot, with grub as a boot loader. Again.

I might give rEFInd a try. Or maybe I'll try the stub kernels again? IDK right now.
As you may have noticed, I recently moved to UEFI and rEFInd. After the installation and little configuration it... it just works. Just remember rEFInd is "OS loader" not boot loader. So you need to use "efistubbed" kernels with it.

I don't see much advantage with plain efistubbed kernel vs. letting rEFInd to choose one.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2569

PostPosted: Sat Apr 28, 2018 4:37 pm    Post subject: Reply with quote

I was watching your thread. It was one of the reasons I'm considering using rEFInd.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Goto page Previous  1, 2
Page 2 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