discover/grub2: Add initial script infrastructure