...
 
Commits (2)
  • Witaut Bajaryn's avatar
    #8 Pretend com.datto:encryption is supported · 970162bb
    Witaut Bajaryn authored
    This way,
    - grub-probe:
      - doesn't fail for a pool with [email protected]=active;
      - succeeds for both unencrypted and encrypted datasets' mountpoints;
    - grub:
      - doesn't fail when /boot/grub is on an unencrypted dataset
        on a pool with [email protected]=active;
      - can boot a kernel from an unencrypted dataset on such a pool;
      - fails with "error: compression algorithm inherit not supported"
        when trying to load a kernel from an encrypted dataset.
    
    TODO Reject datasets with encryption enabled.
    970162bb
  • Witaut Bajaryn's avatar
    #8 grub_fs_probe: Don't attempt to read zfs root · 920eae88
    Witaut Bajaryn authored
    The ZFS root dataset might be encrypted,
    and reading OpenZFS encryption is not implemented.
    
    grub-probe might get called just to get the pool name,
    and reading the root dataset is not necessary for that.
    920eae88
......@@ -285,6 +285,7 @@ static const char *spa_feature_names[] = {
"com.delphix:embedded_data",
"com.delphix:extensible_dataset",
"org.open-zfs:large_blocks",
"com.datto:encryption",
NULL
};
......
......@@ -70,7 +70,16 @@ grub_fs_probe (grub_device_t device)
}
else
#endif
(p->fs_dir) (device, "/", probe_dummy_iter, NULL);
if (grub_strcmp (p->name, "zfs") == 0)
{
char *label = 0;
p->fs_uuid (device, &label);
if (label)
grub_free (label);
}
else
(p->fs_dir) (device, "/", probe_dummy_iter, NULL);
if (grub_errno == GRUB_ERR_NONE)
return p;
......