Re: Can't boot GNU Mach with efi

2021-02-06 Thread jbranso
That's cool.  I didn't realize that the Hurd could potentially boot from UEFI.  
That's interesting.

February 6, 2021 6:40 PM, "Paul Dufresne"  wrote:

>  Le sam., 06 févr. 2021 16:57:39 -0500  écrit 
> 
>> So, you got GNU Mach to boot with EFI? Wow! That's awesome!
> 
> No... I had not tried yet when you wrote your message.
> 
> Now, I have tried, and failed.
> 
> I think that a good part of the (my) problem, is that I have made a custom 
> iso, with 
> /media/paul/Debian sid h-i386 1/EFI/boot/BOOTX64.EFI
> (for info, I used isomaster to add it, after having copied it from my own 
> /boot/efi directory
> (using root access) to my $HOME directory, 
> chown $USER ~/BOOTX64.EFI )
> 
> My previous DVD show the DVD in UEFI boot mode in the Boot menu of the 
> firmware, but trying to boot
> it return to the firmware.
> My edited iso would not even show up in UEFI mode in the firmare Boot menu. 
> But "still" works in
> "Normal" CSM mode.
> 
> So I finally realized that CD/DVD are in ISO9660 format... and UEFI partition 
> normally need to be
> in FAT (normally FAT32) to be found by
> the firmware.
> 
> So... it need to be done once the system is installed... I only have access 
> to a working Hurd on
> UEFI system under QEMU... but I probably could try.



Re: Can't boot GNU Mach with efi

2021-02-06 Thread Paul Dufresne
 Le sam., 06 févr. 2021 16:57:39 -0500   écrit 

 > So, you got GNU Mach to boot with EFI?  Wow!  That's awesome!

No... I had not tried yet when you wrote your message.

Now, I have tried, and failed.

I think that a good part of the (my)  problem, is that I have made a custom 
iso, with 
/media/paul/Debian sid h-i386 1/EFI/boot/BOOTX64.EFI
(for info, I used isomaster to add it, after having copied it from my own 
/boot/efi directory (using root access) to my $HOME directory, 
chown $USER ~/BOOTX64.EFI )

My previous DVD show the DVD in UEFI boot mode in the Boot menu of the 
firmware, but trying to boot it return to the firmware.
My edited iso would not even show up in UEFI mode in the firmare Boot menu. But 
"still" works in "Normal" CSM mode.

So I finally realized that CD/DVD are in ISO9660 format... and UEFI partition 
normally need to be in FAT (normally FAT32) to be found by
the firmware.

So... it need to be done once the system is installed... I only have access to 
a working Hurd on UEFI system under QEMU... but I probably could try. 



Re: Can't boot GNU Mach with efi

2021-02-06 Thread jbranso
So, you got GNU Mach to boot with EFI?  Wow!  That's awesome!

February 6, 2021 4:14 PM, "Paul Dufresne"  wrote:

> I just wrote:
>> The question is... how to we get the EFI_SYSTEM_TABLE, that was read by 
>> BOOTX64.EFI (which I
> believe is part of Grub binary package)... 
>> or is there an other way to get it again? 
> 
> That is much easier than I thought!
> This manual explains it:
> https://www.gnu.org/software/grub/manual/multiboot2/html_node/Index.html#SEC_Contents
> Section 3.6.13 and 3.6.14 show hot to get the table.
> Section 3.6 have more interesting infos.
> 
> Also, see 3.3 to know the state in which Grub boot the 32 bit OS.
> I guess EAX value can be used to know if the UEFI is 32 or 64 bits.



Re: Can't boot GNU Mach with efi

2021-02-06 Thread Paul Dufresne
I just wrote:
 > The question is... how to we get the EFI_SYSTEM_TABLE, that was read by 
 > BOOTX64.EFI (which I believe is part of Grub binary package)... 
 > or is there an other way to get it again? 

That is much easier than I thought!
This manual explains it: 
https://www.gnu.org/software/grub/manual/multiboot2/html_node/Index.html#SEC_Contents
Section 3.6.13 and 3.6.14 show hot to get the table.
Section 3.6 have more interesting infos.

Also, see 3.3 to know the state in which Grub boot the 32 bit OS.
I guess EAX value can be used to know if the UEFI is 32 or 64 bits.



Re: Can't boot GNU Mach with efi

2021-02-06 Thread Paul Dufresne
https://help.ubuntu.com/community/UEFIBooting
is a good introduction to booting on UEFI with Grub.

They say: 
"If you have a non-Mac UEFI system, then you have a x86_64 (aka 64-bit) UEFI 
2.x firmware. "
But I did saw non-MAC UEFI which was 32 bit on relatively old laptops.

Type the following command in a MacOS terminal : ioreg -l -p IODeviceTree | 
grep firmware-abi
Which should show either EFI32 or EFI64.

Later in that document:
Using Apple bootloader itself (safest option)
You need to use the following naming convention for grub.efi :
EFI
Bootloader path and filename
32-bit
/EFI/BOOT/BOOTIA32.EFI

64-bit
/EFI/BOOT/BOOTX64.EFI

Also, about not having a console in GNUMach...

UEFI have their own drivers, written in a virtual machine (Describe in 
Appendice J of [1]).

When you begin in UEFI, you get the EFI_SYSTEM_TABLE (section 4.2) where you 
get handles to:
*ConIn (Console Input) and *ConOut (Console Output), that is describe more in 
chapter 12,
and Appendix B of [1].

[1]: https://uefi.org/sites/default/files/resources/UEFI_Spec_2_8_A_Feb14.pdf
taken from: https://www.uefi.org/specifications/

The question is... how to we get the EFI_SYSTEM_TABLE, that was read by 
BOOTX64.EFI (which I believe is part of Grub binary package)...
or is there an other way to get it again?



Re: Can't boot GNU Mach with efi

2021-02-06 Thread Paul Dufresne
I can't boot current in UEFI on "recent: Prime H310M-C CR2.0 motherboard.

Here on Ubuntu, I see the CD have:
/media/paul/Debian sid h-i386 1/EFI/boot/bootia32.efi
nothing else in that /EFI/boot directory.

I am really unsure, but I feel this file is for people having to boot 32 bits 
(U)EFI.
Most people have 64 bits (U)EFI.

Searcing confirmation:

https://wiki.debian.org/UEFI
leads to think to use bootia32.efi

>From 
>https://www.congatec.com/fileadmin/user_upload/Documents/Application_Notes/AN31_Creating_a_UEFI_Stick.pdf
Section 2.2
I tend to think this is linked to the UEFI PC... I think if your PC is 64 bits 
and you want to run 32 bit OS you need: BOOTX64.efi

But like said, better have the two to work on both.





Re: Can't boot GNU Mach with efi

2021-02-05 Thread Samuel Thibault
Andrea G. Monaco, le sam. 06 févr. 2021 00:16:58 +0100, a ecrit:
>   > Mach doesn't initialize text mode itself indeed.
> 
> Okay, Mach has no framebuffer console like fbcon in Linux, right? Then 
> maybe the only option is switching back to text mode.

It doesn't indeed, it's a microkernel :)

Samuel



Re: Can't boot GNU Mach with efi

2021-02-05 Thread Andrea G. Monaco


  > Mach doesn't initialize text mode itself indeed.

Okay, Mach has no framebuffer console like fbcon in Linux, right? Then 
maybe the only option is switching back to text mode.


-- 
Andrea G. Monaco
Hacker, mathematician, lgbt+ activist
"Hope will never be silent!", H. Milk