johnramsden / zedenv-grub

zedenv plugin for GRUB
https://zedenv.readthedocs.io/en/latest/plugins.html#grub
BSD 3-Clause "New" or "Revised" License
11 stars 4 forks source link

org.zedenv.grub:bootonzfs=yes should apply to entire pool or only the /boot/grub mounted dataset? #20

Closed a-schaefers closed 5 years ago

a-schaefers commented 5 years ago

I am unsure after reading the docs if I should do

zfs set org.zedenv.grub:bootonzfs=yes rpool

or

zfs set org.zedenv.grub:bootonzfs=yes rpool/boot (my /boot/grub dataset)

?

And maybe we could clarify the readme on this tiny point.

Thank you!! :-)

johnramsden commented 5 years ago

I'll clarify in the readme, should be the BE root though.

There is a command that you can use for settings though:

zedenv set --help
Usage: zedenv set [OPTIONS] ZEDENV_PROPERTIES...

  Set boot environment properties.

Options:
  -v, --verbose  Print verbose output.
  --help         Show this message and exit.

So you should be able to do the following:

zedenv set org.zedenv.grub:bootonzfs=yes
johnramsden commented 5 years ago

So if you wanted to set it manually you would set it on ${pool}/${optional_dataset}/ROOT

a-schaefers commented 5 years ago

Unfortunately, now I'm even more confused. Currently I am doing this: https://github.com/a-schaefers/dotfiles/blob/gentoo/bin/root-scripts/zedenv-install#L35

I'm just trying to reliably have a way to set up my systems. It all seems to be working fine, but want to make sure it's technically correct.

a-schaefers commented 5 years ago

okay, i've got it sorted now, using zedenv set org.zedenv.grub:bootonzfs=yes zedenv set org.zedenv:bootloader=grub

in my script

Thanks.

johnramsden commented 5 years ago

Just to clarify, all you're doing is selling a property, I read it from the boot environment root, so as long as it is set above the root and inherited, or set directly on the root, zedenv should pick it up.

The zedenv set command basically just runs zfs set ${property} ${pool}/${optional_dataset}/ROOT