Bug 253364 - boot partition documentation
Summary: boot partition documentation
Status: New
Alias: None
Product: Documentation
Classification: Unclassified
Component: Documentation (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Sergio Carlavilla Delgado
URL: https://cgit.freebsd.org/src/tree/UPD...
Depends on: 254276
  Show dependency treegraph
Reported: 2021-02-09 02:25 UTC by Graham Perrin
Modified: 2021-03-23 13:52 UTC (History)
3 users (show)

See Also:

Information about the mobile hard disk drive and its OpenZFS pool (6.82 KB, text/plain)
2021-02-09 02:25 UTC, Graham Perrin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Graham Perrin 2021-02-09 02:25:41 UTC
Created attachment 222286 [details]
Information about the mobile hard disk drive and its OpenZFS pool

<https://cgit.freebsd.org/src/commit/UPDATING?id=5db7b015e9aa18e129d73992583491702e4a5206> (2020-08-25) offered relatively strong advice in the context of updating/upgrading FreeBSD: 

> … Do not upgrade root pools until 
> the loader is updated to support zstd. …

In addition, I find it impossible to boot where an available non-boot pool uses zstd:

* first observed with 13.0-CURRENT
* also observed with 14.0-CURRENT.

I assume that the issue will also be observable with 12.2-RELEASE-p3 (I do not yet have the hardware resources to test), if this is true then it's not _solely_ an UPDATING issue. 

Hardware probe at <https://bsd-hardware.info/?probe=72137c63f8> (with the drive connected after boot), and the attached text file includes pool-related information. This pool used OpenZFS from the outset, it was not upgraded. 

In my case: not a showstopper. With the drive for the non-boot pool external, on USB, it's easy enough to disconnect before attempting to boot the computer. 

External versus internal

If a zstd-compressed filesystem is on a non-boot pool on an _internal_ drive: I imagine that things will be less easy …
Comment 1 Graham Perrin 2021-02-09 02:39:47 UTC
Thanks to Kyle Evans I'm now aware of the importance of having an up-to-date loader.efi … I'll attend to this … apologies for the noise.
Comment 2 Graham Perrin 2021-02-09 04:05:41 UTC
copied to 
on ada0p1


root@mowa219-gjp4-8570p:~ # lsblk ada0
DEVICE         MAJ:MIN SIZE TYPE                              LABEL MOUNT
ada0             0:133 466G GPT                                   - -
  ada0p1         0:135 200M efi                        gpt/efiboot0 -
  ada0p2         0:137 512K freebsd-boot               gpt/gptboot0 -
  <FREE>         -:-   492K -                                     - -
  ada0p3         0:139  16G freebsd-swap                  gpt/swap0 SWAP
  ada0p3.eli     2:28   16G freebsd-swap                          - SWAP
  ada0p4         0:141 450G freebsd-zfs                    gpt/zfs0 <ZFS>
  ada0p4.eli     0:152 450G -                                     - -
  <FREE>         -:-   4.0K -                                     - -
root@mowa219-gjp4-8570p:~ # 


Subsequent boots succeed ☑ without the need to disconnect the non-boot drive. 

Now I see e.g. <https://www.freebsd.org/cgi/man.cgi?query=uefi(8)> and <https://www.freebsd.org/cgi/man.cgi?query=efibootmgr(8)>, however I was not previously aware of the need to manually mount and update a boot partition – I mentioned boot failures a few months ago, no-one dropped a hint re: updating. So I'll leave this open as a documentation bug. 

We have <https://docs.freebsd.org/en/books/handbook/zfs/> Chapter 20 for ZFS and <https://docs.freebsd.org/en/books/handbook/cutting-edge/> (not entirely cutting edge) Chapter 24 for updating and upgrading FreeBSD. 

I can't find a hint about BOOTx64.efi anywhere in the handbook. Maybe it belongs near the head of Chapter 24, as example of what's _not_ updated when an update is performed …

Comment 3 Sergio Carlavilla Delgado freebsd_committer 2021-03-03 20:52:05 UTC
Can you please provide a patch?
Comment 4 Graham Perrin 2021-03-04 04:08:26 UTC
Honestly, I lack the knowledge and experience to do this properly, I'm _very_ wary of making mistakes or omissions concerning boot loading. It's such an important area. 

Recently posted <https://vermaden.wordpress.com/2021/02/23/upgrade-freebsd-with-zfs-boot-environments/> gained some loader(8) -related information through which I became aware of the type of problem that can occur. 

Can someone with thorough knowledge of boot loading be brought in for this? 

Thank you
Comment 5 Graham Perrin 2021-03-14 12:33:43 UTC
Wording for the Handbook might take inspiration from wording under: 


> Boot Loader Changes

Re: bug 254276 there's not yet a release note about OpenZFS. 

It might help to have a single line, in the Boot Loader Changes section, to complement whatever will be written in the OpenZFS section. 

### Duplication

There is what appears to be a second anchor for a duplicate subheading with no content: 


> Boot Loader Changes
Comment 6 Sergio Carlavilla Delgado freebsd_committer 2021-03-14 12:35:06 UTC
I'll try to add this to the handbook.
Thanks for your comments Graham :)