Re: UEFI install fails on Hetzner EX51

2016-11-26 Thread Jiri B
On Wed, Nov 23, 2016 at 03:29:55PM +0100, Leo Unglaub wrote:
> Hey,
> 
> On 11/23/16 15:17, Mark Kettenis wrote:
> >Right, something like that would work if you copy the OpenBSD EFI
> >bootloader into /EFI/OpenBSD/BOOTX64.EFI on the EFI system partition
> >first.
> 
> why do i have to copy the EFI file first? Does the order matter?
> 
> If yes, the correct workflow would be the following;
> 
> 1: Install OpenBSD
> 2: Start a Live-Linux image
> 3: Write the UEFI entry with efibootmgr
> 4: Reboot and hope the best :)
> 
> Or does someone have a better suggestion? What about efibootmgr, is it worth
> importing it into the OpenBSD source tree? Or do you guys want to do it
> yourself and create something like a uefictl with a clean CLI to manage UEFI
> corrcetly. I am not sure what the best way to go is here, but UEFI is not
> going away and the people using it are only going to get more and more do to
> larger discs becoming more common.
> 
> Greetings
> Leo
> 

Just a note, people could run UEFI VM inside qemu on OpenBSD. See
https://github.com/tianocore/tianocore.github.io/wiki/How-to-run-OVMF

I only installed OpenBSD inside qemu with OVMF on OpenBSD and at least
it booted fine.

j.



Re: UEFI install fails on Hetzner EX51

2016-11-23 Thread Daniel Gillen
On 23.11.2016 15:05, Leo Unglaub wrote:
> Hey,
> 
> On 11/23/16 14:50, Jiri B wrote:
>> So probably something like this?
>>
>> efibootmgr --create --disk /dev/$disk --part 1 --label "OpenBSD
>> (${disk})" --load "\\EFI\\openbsd\\BOOTX64.EFI"
> 
> yeah, i think something like this would work. But i am not sure about
> the --load flag. I would think it should be --load
> "\\efi\\boot\\BOOTX64.EFI" because thats where the OpenBSD installer
> puts the file on the efi partition.
> 
> Or am i mistaken?
> 
> Thanks and greetings
> Leo
> 

Hi

What about simply creating a startup.nsh file on the root of the efi
partition with the following content:

fs0:\efi\boot\BOOTX64.EFI

assuming that fs0 is the efi partition. I haven't tested this with
OpenBSD but it did the trick for me with several Linux installs that
didn't register grub correctly.

Daniel

-- 
Unix _IS_ user friendly - it's just
selective about who its friends are!



Re: UEFI install fails on Hetzner EX51

2016-11-23 Thread Leo Unglaub

Hey,

On 11/23/16 15:17, Mark Kettenis wrote:

Right, something like that would work if you copy the OpenBSD EFI
bootloader into /EFI/OpenBSD/BOOTX64.EFI on the EFI system partition
first.


why do i have to copy the EFI file first? Does the order matter?

If yes, the correct workflow would be the following;

1: Install OpenBSD
2: Start a Live-Linux image
3: Write the UEFI entry with efibootmgr
4: Reboot and hope the best :)

Or does someone have a better suggestion? What about efibootmgr, is it 
worth importing it into the OpenBSD source tree? Or do you guys want to 
do it yourself and create something like a uefictl with a clean CLI to 
manage UEFI corrcetly. I am not sure what the best way to go is here, 
but UEFI is not going away and the people using it are only going to get 
more and more do to larger discs becoming more common.


Greetings
Leo



Re: UEFI install fails on Hetzner EX51

2016-11-23 Thread Mark Kettenis
> Date: Wed, 23 Nov 2016 08:50:25 -0500
> From: Jiri B 
> 
> On Wed, Nov 23, 2016 at 01:55:59PM +0100, Leo Unglaub wrote:
> > Hey,
> > 
> > On 11/23/16 13:27, Mark Kettenis wrote:
> > >>> Booting the UEFI version of the install.fs works fine and also the
> > >>> install works but i am unable to boot the server. According the the
> > >>> datacenter this happens because OpenBSD does not write an entry in the
> > >>> mainboards firmware UEFI bootlist and simply asumes a fallback to
> > >>> /boot/bootx64.efi. But according to the datacenter this mainboard does
> > >>> not have that fallback and simply does not know what to boot.
> > >That sounds correct.
> 
> So probably something like this?
> 
> efibootmgr --create --disk /dev/$disk --part 1 --label "OpenBSD (${disk})" 
> --load "\\EFI\\openbsd\\BOOTX64.EFI"

Right, something like that would work if you copy the OpenBSD EFI
bootloader into /EFI/OpenBSD/BOOTX64.EFI on the EFI system partition
first.



Re: UEFI install fails on Hetzner EX51

2016-11-23 Thread Leo Unglaub

Hey,

On 11/23/16 14:50, Jiri B wrote:

So probably something like this?

efibootmgr --create --disk /dev/$disk --part 1 --label "OpenBSD (${disk})" --load 
"\\EFI\\openbsd\\BOOTX64.EFI"


yeah, i think something like this would work. But i am not sure about 
the --load flag. I would think it should be --load 
"\\efi\\boot\\BOOTX64.EFI" because thats where the OpenBSD installer 
puts the file on the efi partition.


Or am i mistaken?

Thanks and greetings
Leo



Re: UEFI install fails on Hetzner EX51

2016-11-23 Thread Jiri B
On Wed, Nov 23, 2016 at 01:55:59PM +0100, Leo Unglaub wrote:
> Hey,
> 
> On 11/23/16 13:27, Mark Kettenis wrote:
> >>> Booting the UEFI version of the install.fs works fine and also the
> >>> install works but i am unable to boot the server. According the the
> >>> datacenter this happens because OpenBSD does not write an entry in the
> >>> mainboards firmware UEFI bootlist and simply asumes a fallback to
> >>> /boot/bootx64.efi. But according to the datacenter this mainboard does
> >>> not have that fallback and simply does not know what to boot.
> >That sounds correct.

So probably something like this?

efibootmgr --create --disk /dev/$disk --part 1 --label "OpenBSD (${disk})" 
--load "\\EFI\\openbsd\\BOOTX64.EFI"

Not tested, I haven't played with OpenBSD on a UEFI machine. I was only
messing with EFI on EL7.

efibootmgr | egrep 'Red Hat Enterprise Linux|^BootOrder|^BootCurrent'
BootCurrent: 0015
BootOrder: 
0015,0014,0013,0012,0007,,0002,0001,0005,0006,0008,0009,000A,000B,000C,000D,000E,000F,0010
Boot0012* Red Hat Enterprise Linux
Boot0013* Red Hat Enterprise Linux (sdb)
Boot0014* Red Hat Enterprise Linux (sdc)
Boot0015* Red Hat Enterprise Linux (sdd)

# above shows the system was boot from "alternative" disk (sdd)

j.



Re: UEFI install fails on Hetzner EX51

2016-11-23 Thread Leo Unglaub

Hey,

On 11/23/16 13:27, Mark Kettenis wrote:

> Booting the UEFI version of the install.fs works fine and also the
> install works but i am unable to boot the server. According the the
> datacenter this happens because OpenBSD does not write an entry in the
> mainboards firmware UEFI bootlist and simply asumes a fallback to
> /boot/bootx64.efi. But according to the datacenter this mainboard does
> not have that fallback and simply does not know what to boot.

That sounds correct.


> So maybe it would be a good idea to write an entry in the UEFI bootmenu.
> I would love to provide a dmesg but sadly this is very dificult to get
> from this crappy remote vnc console i have to use to install stuff on
> the server. But i am working on getting a dmesg to you guys.

Unfortunately writing such an entry isn't trivial.  To do this from
within the installer, we'll need to write code to call the UEFI
runtime services from the OpenBSD kernel.


hmm yeah. This sounds like a very complicated task. Basically everything 
related to UEFI is much more complicated than it should to be.


I am by far not an expert on this issue but as i see it i have two options.

1: Boot a random Linux image and use a tool there to write an OpenBSD 
entry in the UEFI bootlist that points to /boot/bootx64.efi.


2: Wait for one of you guys to implement this stuff in the OpenBSD 
installer. I looked around a bit, maybe its not as hard as it seams. 
When i read this (https://github.com/rhinstaller/efibootmgr) here 
correctly simply forcing an entry into the bootlist should be possible 
with that code there. Maybe this helps.


What do you think about this? What would you guys recommend for the future?

Thanks and greetings
Leo



Re: UEFI install fails on Hetzner EX51

2016-11-23 Thread Mark Kettenis
> From: Leo Unglaub 
> Date: Wed, 23 Nov 2016 12:20:24 +0100
> 
> Hey friends,
> first of all i am sorry if this is not for tech@ and more for bugs@ but 
> to me it seams like a tech@ issue.
> 
> I am trying to install OpenBSD on a Hetzner EX51 server. The specs can 
> be found here: https://www.hetzner.de/us/hosting/produkte_rootserver/ex51
> 
> In order to use the entire 4 TB drives i wanted to use a
> 
> UEFI -> GPT -> softraid0 (RAID 1) -> 2 x 4 TB drives.
> 
> Booting the UEFI version of the install.fs works fine and also the 
> install works but i am unable to boot the server. According the the 
> datacenter this happens because OpenBSD does not write an entry in the 
> mainboards firmware UEFI bootlist and simply asumes a fallback to 
> /boot/bootx64.efi. But according to the datacenter this mainboard does 
> not have that fallback and simply does not know what to boot.

That sounds correct.

> So maybe it would be a good idea to write an entry in the UEFI bootmenu.
> I would love to provide a dmesg but sadly this is very dificult to get 
> from this crappy remote vnc console i have to use to install stuff on 
> the server. But i am working on getting a dmesg to you guys.

Unfortunately writing such an entry isn't trivial.  To do this from
within the installer, we'll need to write code to call the UEFI
runtime services from the OpenBSD kernel.

Cheers,

Mark



UEFI install fails on Hetzner EX51

2016-11-23 Thread Leo Unglaub

Hey friends,
first of all i am sorry if this is not for tech@ and more for bugs@ but 
to me it seams like a tech@ issue.


I am trying to install OpenBSD on a Hetzner EX51 server. The specs can 
be found here: https://www.hetzner.de/us/hosting/produkte_rootserver/ex51


In order to use the entire 4 TB drives i wanted to use a

UEFI -> GPT -> softraid0 (RAID 1) -> 2 x 4 TB drives.

Booting the UEFI version of the install.fs works fine and also the 
install works but i am unable to boot the server. According the the 
datacenter this happens because OpenBSD does not write an entry in the 
mainboards firmware UEFI bootlist and simply asumes a fallback to 
/boot/bootx64.efi. But according to the datacenter this mainboard does 
not have that fallback and simply does not know what to boot.


So maybe it would be a good idea to write an entry in the UEFI bootmenu.
I would love to provide a dmesg but sadly this is very dificult to get 
from this crappy remote vnc console i have to use to install stuff on 
the server. But i am working on getting a dmesg to you guys.


Greetings
Leo