Bug#595152: ZFS support
On Wed, Sep 01, 2010 at 02:36:17PM +0200, Robert Millan wrote:
> This patch adds ZFS support to grub-installer.
Thanks for this patch.
> diff -ur grub-installer-1.55.old/grub-installer grub-installer-1.55/grub-installer
> --- grub-installer-1.55.old/grub-installer 2010-08-18 16:38:02.000000000 +0200
> +++ grub-installer-1.55/grub-installer 2010-09-01 13:47:23.554370178 +0200
> @@ -75,10 +75,15 @@
>
> serial="$(get_serial_console)"
>
> +grub_probe () {
> + apt-install grub-common
> + $chroot $ROOT grub-probe $@
> +}
apt-install is not that cheap; it has to set up the target chroot and
then tear it all down again. Could you please add a bit of state here
to remember when grub_probe has already been called?
> @@ -118,7 +123,7 @@
> }
>
> findfs () {
> - mount | grep "on $ROOT${1%/} " | tail -n1 | cut -d' ' -f1
> + grub_probe -t device $1
> }
>
> findfstype () {
I think this should be OK, although I'm (possibly unjustifiably)
paranoid about unexpected side-effects at this point. Perhaps you could
add the original mount-grepping code back in as a fallback in case
grub-probe fails? For example, I'm wondering about the case where / is
a dm-crypt device.
This can be applied after these changes.
--
Colin Watson [cjwatson@debian.org]
Reply to: