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

Assumption about system setup #4

Closed Davis-A closed 6 years ago

Davis-A commented 6 years ago

Re the docs.

Unmount /boot, and remount it at /mnt/boot

My system does not have a separate /boot dataset. /boot is a directory on the / dataset.

Moving kernels around seems counter intuitive when the kernel resides on a zfs dataset. Shouldn't it just point grub to a / dataset and boot the kernel there?

johnramsden commented 6 years ago

@croquagei I had assumed you were using a /boot partition. If you're keeping your kernels on ZFS, set org.zedenv.grub:bootonzfs=yes. If you don't like the location you can also change it with org.zedenv.grub:boot=${mountpoint}.

You still need a /mnt/boot, as grub will mount each boot environment to /mnt/boot/zfsenv/zedenv-${be} and query the /boot directory to see which kernels are there.

It then writes the resulting configuration file to /boot/grub/grub.cfg. I haven't done as much testing with a bootonzfs configuration. I also just realized this won't write an entry for the currently booted system, i'm writing a quick patch which will fix that. "EDIT: fixed https://github.com/johnramsden/zedenv-grub/commit/15cd212056ff71e81f6029fde3ff41bb5360b626"

Question, where do you keep your UEFI partition, and grub config. Do you output the configuration to a different location? If so we might need to bindmount your grub directory to /boot/grub. What confuses me is if your configuration is located on your ZFS dataset at /boot/grub/grub.cfg, how does grub find it? Maybe you can fill me in as I haven't had system running in this configuration.

I know entries can be generated for a boot on ZFS system, but I haven't tested is figuring out how to get the configuration read by grub.

johnramsden commented 6 years ago

Should be fixed as of #1