2010/8/4, Seth Goldberg <seth.goldb...@oracle.com>: >> I don't think this is the appropiate place for this kind of sanity check. >> Keep in mind "grub-probe -t device" has many purposes, and for some of >> them >> (e.g. determining the partmap) the ZFS status is irrelevant. > > Hmm. I do see your point here, but then I'd ask how you plan to handle > ensuring that all disks in a mirror are properly updated with boot/core. > I think the proper thing would be either to have grub-probe output a set of > devices, onto which grub-setup would iterate and install boot/core, or > implement an abstraction that allows that to happen behind the scenes. How > does this work for lvm or other raids?
There are two approaches, one of them is simply to run grub-install for each of the intended devices. This is what Debian scripts do, and is independant on the content in the partitions of those devices (lvm, raid, zfs, whatever). The other is giving grub-setup special knowledge of the abstraction. We do this for RAID1, see the code around: util/i386/pc/grub-setup.c: devicelist = grub_util_raid_getmembers (dest_dev); which allows user to e.g. "grub-install /dev/md0". Then the scripts embed raid.mod into core.img, and (in principle) after core.img has been loaded GRUB has RAID mirroring protection to access /boot/grub/. I suppose it's possible to do something similar for ZFS mirror layouts. > The question is: should GRUB2's installation be implicit or explicit for > all members of a mirrored root pool when grub-setup is invoked. Implicit approach only works for mirrored setup. If you want to install to all members in a non-mirrored pool, you still need explicit approach, so I'd only implement implicit one if there's a clear benefit, such as the protection offered by mirroring. I would check if zfs.mod from grub-extras provides this protection before trying to answer this question. _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel