grub-multi-install: Reset partition type between partitions
Reconfiguring shim-signed in a lxd VM offered /dev/sda as
an ESP, which is obviously wrong.
What happened is that it did not have any ID_PART_ENTRY_TYPE
or ID_PART_ENTRY_SCHEME properties set in udev, so the eval
did not set anything, and the values from the previous partition
were reused.
Call hwmatch only on i386/pc as it is only available there.
This avoids "error: can't find command `hwmatch'." on e.g., x86_64/efi.
The equivalent behavior is linux_gfx_mode=keep because grub is special:
the `if hwmatch` clause is true on that error and `$match = 0` is true
too, as it is undefined (confirmed in grub shell.) A quick fix for now.
grub-initrd-fallback.service, debian/grub-common.service: only start units when booted with grub. Use presence of /boot/grub/grub.cfg as proxy. LP: #1925507