UEFI on MSI laptop ?

Hakaba

Member

Reaction score: 22
Messages: 51

I'm trying ro install freebsd (12.0) on my MSI laptop with uefi.
I'm facing a strange issue. I can boot on a UFS usb stick, but after install on ssd (using ZFS), my ssd is not bootable.
I try the installation with and without 4k sectors options and with different partition scheme (bios+uefi/uefi)
How can I know if the issue is due to bsdinstall or UEFI config ?
May I have more chance with freebsd 12.1 on this part ?
Thanks in advance.
 

Emrion

Active Member

Reaction score: 43
Messages: 221

What's happen when you try to boot on your ssd? Do you see any message?
Also, can you post the result of gpart show after the install?
 
OP
OP
H

Hakaba

Member

Reaction score: 22
Messages: 51

When I boot in UEFI on ssd, the bios menu show up on info panel without information. It is like there is no efi partition on ssd.
gpart show :
Code:
=>        40  1000215136  nvd0  GPT  (477G)
          40      409600     1  efi  (200M)
      409640        1024     2  freebsd-boot  (512K)
      410664         984        - free -  (492K)
      411648     4194304     3  freebsd-swap  (2.0G)
     4605952   995608576     4  freebsd-zfs  (475G)
  1000214528         648        - free -  (324K)

=>      3  2955503  da0  GPT  (7.2G) [CORRUPT]
        3       29    2  freebsd-boot  (15K)
       32       48       - free -  (24K)
       80     1600    1  efi  (800K)
     1680  2953826       - free -  (1.4G)

=>      3  2955503  iso9660/FURYBSD  GPT  (7.2G) [CORRUPT]
        3       29                2  freebsd-boot  (15K)
       32       48                   - free -  (24K)
       80     1600                1  efi  (800K)
     1680  2953826                   - free -  (1.4G)
 
OP
OP
H

Hakaba

Member

Reaction score: 22
Messages: 51

With freebsd 12.1, same issue.
I have no freebsd-boot partition.
I have tryed furybsd (to copy/paste gpart show below), freebsd 12.0 and freebsd 12.1 and all combinaisons in bios...
The laptop is a MSI p65.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 8,058
Messages: 31,652

Your SSD is probably nvd0 and it does contain both efi and freebsd-boot partitions.
 
OP
OP
H

Hakaba

Member

Reaction score: 22
Messages: 51

Yes, but after a freeBSD 12.1 installation, the freebsd-boot is not here. This is the only difference between FreeBSD 12 and 12.1
I probably will use my laptop with Legacy mode, but I don't know what mistake I made.
 

Sevendogsbsd

Aspiring Daemon

Reaction score: 295
Messages: 598

Last time I installed FreeBSD on my MSI motherboard PC, I did not need a freebsd-boot partition, only an efi partition. I also followed the UEFI instructions from the wiki but I have never used ZFS on my desktop, only UFS so not sure if those instructions would work. UEFI
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 8,058
Messages: 31,652

You probably forgot to set the partitioning to GPT/BIOS+EFI.
 
OP
OP
H

Hakaba

Member

Reaction score: 22
Messages: 51

You probably forgot to set the partitioning to GPT/BIOS+EFI.
I try both option (GPT/EFI and GPT/BIOS+EFI)
The second choice works only with the Boot mode "Legacy".
So I am not able to start my computer with UEFI on a nvme ssd with freebsd installed (zfs)

I disabled / enabled security boot, Fast boot, Trusted Computing. I try to change the SATA Mode Selection from AHCI to Intel RS
 
OP
OP
H

Hakaba

Member

Reaction score: 22
Messages: 51

Last time I installed FreeBSD on my MSI motherboard PC, I did not need a freebsd-boot partition, only an efi partition. I also followed the UEFI instructions from the wiki but I have never used ZFS on my desktop, only UFS so not sure if those instructions would work. UEFI
I will test it next weekend...
Thanks, I left a comment if it works or not.
 
OP
OP
H

Hakaba

Member

Reaction score: 22
Messages: 51

Last time I installed FreeBSD on my MSI motherboard PC, I did not need a freebsd-boot partition, only an efi partition. I also followed the UEFI instructions from the wiki but I have never used ZFS on my desktop, only UFS so not sure if those instructions would work. UEFI
First test : FAT32 : Fail.
Second test FAT16 : Fail.

I continue to test a lot of config ...
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 8,058
Messages: 31,652

The second choice works only with the Boot mode "Legacy".
"Legacy" BIOS boot, which is now known as CSM, requires the freebsd-boot partition on GPT.

CSM booting MBR: uses the master boot record (first sector on the disk) to boot
CSM booting GPT: boots by loading the code from the freebsd-boot partition
UEFI booting: boots by loading and executing /EFI/BOOT/BOOTX64.EFI from the efi partition (which is in fact just FAT12/16/32)

Because UEFI booting is problematic on your system I would recommend using the GPT(BIOS+EFI) combination. This will provide all the required stuff to boot the system in EFI mode and CSM mode. Which means you can switch between the two boot types by simply changing the setting in the BIOS/UEFI. No changes would be needed on FreeBSD.
 
OP
OP
H

Hakaba

Member

Reaction score: 22
Messages: 51

So, I use the legacy mode to boot my laptop after a GPT(BIOS+EFI) installation.
UEFI doesn't work for a mysterious reason.

But as I can install a Linux in the nvme disk and boot in EFI mode, what part is different ?
The reason is probably a wrong partition type for efi, no ?

Is it useless to try UEFI with secure-boot ? see :

It is time to install a WM now :)

PS : I let the post unresolved, if I find how boot a MSI laptop in UEFI mode with freeBSD, I will complete here.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 8,058
Messages: 31,652

But as I can install a Linux in the nvme disk and boot in EFI mode, what part is different ?
The reason is probably a wrong partition type for efi, no ?
No, the partition type is correct. As far as I understood things some manufacturers go the cheap route and use a 32 bit UEFI. Booting a 64 bit FreeBSD with a 32 bit EFI doesn't work. Linux does seem to be able to do this. I have a few machines with UEFI and none of them are able to EFI boot FreeBSD.
 
OP
OP
H

Hakaba

Member

Reaction score: 22
Messages: 51

On the MSI, I have the choice between :
Legacy / UEFI / UEFI with SCM. Only Legacy work (SCM is a Legacy mode, but failed... Strange, non ?)

And if I try to boot on a 32Gb USB stick, it... fails !
(retry in progress)

Is there a simple way to know if UEFI is 32 or 64 bits ?
 
Top