Add detection for grub and systemd environments