Re: [Libguestfs] guestfish and grub-install
[CC'd to libguestfs mailing list, please send follow ups there] On Thu, May 12, 2011 at 02:58:20PM +0200, Adrian Reber wrote:
I am running guestfish on SL6 to install a few ubuntu VMs. I am now at the point where I try to install grub on the VMs. Should be easy with "grub-install". But it seems this installs the grub from the host machine. In my case that is grub 0.97 instead of the grub2 ubuntu wants.
This is true.
Trying to run the grub-install from ubuntu in guestfish does also not work:
<fs> command "/usr/sbin/grub-install --root-directory=/ /dev/vda" libguestfs: error: command: df: Warning: cannot read table of mounted file systems: No such file or directory df: Warning: cannot read table of mounted file systems: No such file or directory Could not find device for //boot: Not found or not a block device. <fs>
Because only /dev/vda1 has been mounted on /.
Any ideas how I can install grub2 with guestfish?
You could try running the grub2 command (ie. using 'command'). However see the caveats at: http://libguestfs.org/guestfs.3.html#running_commands http://libguestfs.org/guestfs.3.html#security The situation is further confusing because grub2 is not a universally agreed upon upgrade to grub (Fedora is still using grub and won't update to grub2 any time soon). Anyhow, patches welcome if you want to fix the API. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top
On 12 maj 2011, at 15:21, Richard W.M. Jones wrote:
The situation is further confusing because grub2 is not a universally agreed upon upgrade to grub (Fedora is still using grub and won't update to grub2 any time soon).
(I know this is an old thread) I think Fedora 16 (final release planned for 2011-10-25) will use GRUB2 by default: http://fedoraproject.org/wiki/Features/Grub2 --Marek
On Thu, Jul 21, 2011 at 11:16:52AM +0200, Marek Goldmann wrote:
On 12 maj 2011, at 15:21, Richard W.M. Jones wrote:
The situation is further confusing because grub2 is not a universally agreed upon upgrade to grub (Fedora is still using grub and won't update to grub2 any time soon).
(I know this is an old thread)
I think Fedora 16 (final release planned for 2011-10-25) will use GRUB2 by default:
Right, I spotted that last week, but didn't see that it had been accepted. This is a good thing because it reduces the duplication between Fedora and Debian. It will however probably require a few changes in libguestfs. Thanks for alerting us! Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top
participants (2)
-
Marek Goldmann -
Richard W.M. Jones