# fstab / UEFI



## tOsYZYny (Feb 16, 2022)

I have an older machine that does not have UEFI support and I'm selecting BIOS+UEFI for the ZFSBOOT_BOOT_TYPE in /usr/libexec/bsdinstall/zfsboot.

All my machines list the boot method as BIOS (I haven't set the boot method to UEFI in the BIOS yet):

```
sysctl machdep.bootmethod

BIOS
```

1. On the machine that supports UEFI (and I'm still booting up via BIOS), why does the EFI partition exist whereas on the non-UEFI it does not?  If I don't comment the line containing /boot/efi, it fails to boot.  I presume that the bsdinstall process is detecting EFI support and creates the partition, but it must not be through machdep.bootmethod, right?

2. Is desc and proc at all related?  I have those options specified in my fstab for java and if those aren't commented as well on the older machine, it still won't boot.  Wouldn't that be tied to the filesystem:

```
# development/java/java
desc   /dev/fd     fdescfs     rw  0   0
proc    /proc       procfs      rw  0   0
```


----------



## Phishfry (Feb 16, 2022)

tOsYZYny said:


> I presume that the bsdinstall process is detecting EFI support and creates the partition, but it must not be through machdep.bootmethod, right?


I would suspect some sort of bios probe. Or maybe routine that trys EFI and if fails then do Legacy BIOS.

You can tell from the color of the dialog screens. Dark blue = Legacy Light Blue = UEFI


----------



## Phishfry (Feb 16, 2022)

To test your hypothesis you could fiddle with the sysyctl settings of the installer.
sysctl machdep.bootmethod=UEFI
or 
sysctl machdep.bootmethod=BIOS


----------



## Phishfry (Feb 16, 2022)

Scratch that idea

```
sysctl: oid 'machdep.bootmethod' is read only
```


----------



## tOsYZYny (Feb 17, 2022)

I'll have to dig more, I don't see anything that stands out in my modified bsdinstall script that would be forcing that mountpoint in fstab, but won't force creation during install.


----------



## grahamperrin@ (Feb 17, 2022)

tOsYZYny said:


> … UEFI (and I'm still booting up via BIOS), … it must not be through machdep.bootmethod, right? …



<https://cgit.freebsd.org/src/tree/usr.sbin/bsdinstall/partedit/partedit_x86.c> maybe?


----------

