I think there is a better "solution" (involving disabling recordfail in the affected cases, which is LVM for me).
I believe that the correct thing to use to check for LVM or RAID is grub-probe's "abstraction" target. This returns a list of possible abstractions below the filesystem level (or an empty string if there are none). For instance, on a system with just LVM here (hardware RAID is transparent to the system), it returns that: # grub-probe --target=abstraction /boot/ lvm On an older system with mdadm RAID1 and boot outside of LVM, it returns this: # grub-probe --target=abstraction /boot raid mdraid1x grub-probe --target=abstraction / raid mdraid1x lvm Also note that older versions of grub-probe output an additional space at the end of the list if the list is non-empty, so mind that when parsing the output. There's no such superfluous space on trusty, tho. So what I do is check the list for possible candidates that would fail with "recordfail". In my case, this is just "lvm" and I don't have a system here to test it with md RAID in practice, but I guess you would just need to extend the "for i in x y z" list with "raid". The reason while the case statement inside the for loop looks as bit convoluted is that you could find the culprit at 4 possible places: making up the whole list, just at the beginning of the list, just at the end of the list or somewhere in the middle of the list. ** Patch added: "Patch to /etc/grub.d/00_header to account for /boot on LVM" https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1274320/+attachment/4293379/+files/grub_00_header.patch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1274320 Title: Error: diskfilter writes are not supported To manage notifications about this bug go to: https://bugs.launchpad.net/grub/+bug/1274320/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs