In the situation where ZFS snapshots do not contain a .../etc directory,
the generation of /b/g/grub.cfg silently fails, providing no "linux"
kernel lines in the /b/g/grub.cfg file.
This patch prevents this type of failure from occurring.
This issue is especially apparent on systems running in FIPS mode
with ZFS boot+root pools.
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