ubunutu grub-pc kickstart install
I'm trying to get Ubuntu 12.04 to install via a kickstart setup, and so far we are seeing two issues:
1) in a virtual machine (VirtualBox and VMware Fusion) if there is a network device present it fails to install grub.
2) in a physical (IBM x3755 from memory) if the installation is not of a physical medium (eg Virtual disk via IMM) it fails.
In both cases the problem is that the installer complains that grub failed to install to /target/ .
I've gotten to the stage that then doing
- an Alt+F2 to go to a console,
- chroot /target/ bash,
- update /etc/apt/sources.list
- apt-get update -y
- apt-get install grub-pc -y
This last step gets me to a dialog that then asks where I want to install grub to. I've since put these steps into the post install section of my kickstart configuration file. All this is fine up to the point where it would require interaction, which never appears to take place, which I assume either it fails silently or doesn't happen.
I've taken a general look at grub-pc's postinst script, but I don't see anything in the script that gives a means of configuring it via a command line argument or file on disk. However it does appear that once grub is setup, that the postinst script will deploy it to the same location again. So at this point, I'm going back to the interactive Alt-F2 , chroot and running `/var/lib/dpkg/info/grub-pc.postinst configure` and then selecting /dev/sda ...
Thus my question:
Is there a way to configure grub-pc from the command line to install to the MBR, and thus complete the setup completely non-interactively, via a kickstart configuration file?