Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


How to do a grub-install on KVM guest with virtio disks?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

How to do a grub-install on KVM guest with virtio disks?

rchurchrchurch Member
edited January 2012 in Tutorials

I am trying to do a grub-install on KVM guest and not succeeding. Does anyone know how? I have done some googling and tried some examples but it is still now working.

Any ideas?

Comments

  • FranciscoFrancisco Top Host, Host Rep, Veteran

    What command are you running?

    Francisco

    Thanked by 1rchurch
  • This my main approach.
    grub-install --no-floppy --root-directory=/mnt/vda1 /dev/vda.

    There are some other guides that write about editing /boot/grub/device.map and some that do it manually like

    grub
    device (hd0) /dev/vda
    root (hd0,0)
    setup (hd0)
    quit

    I have tried those options as well with no success

  • FranciscoFrancisco Top Host, Host Rep, Veteran

    is boot on a sep partition or on the root?

    Francisco

  • Boot is on the root partition

  • FranciscoFrancisco Top Host, Host Rep, Veteran

    grub-install --root-directory=/mnt/vda1 --modules="biosdisk part_msdos" /dev/vda

    Try that :)

    Francisco

  • rchurchrchurch Member
    edited January 2012

    the grub-install I am using doesn't support that --modules="biosdisk part_msdos". I am using System Rescue CD and think the grub version is 0.97. I am also not sure if additional drivers are needed to enable Ubuntu Hardy run on kvm-virtio hosts, although being an LTS I expect to.

    In fact I just installed a fresh Ubuntu Hardy and it failed to boot.

    I suspect I have to install a later Ubuntu version with a separate boot partition, and add Ubuntu Hardy to the menu.lst it creates.

    I will try a few other approaches and get back to you.

  • FranciscoFrancisco Top Host, Host Rep, Veteran

    Well there's yer' problem.

    Ubuntu uses/requires GRUB2 :)

    You should be able to boot the ubuntu CD and tell it 'rescue system', and then issue it the command I mentioned.

    Francisco

  • The Ubuntu Hardy ISO - 8.04.4 cannot enter rescue mode. If fails at that step.

  • tuxtux Member

    @Francisco said: Ubuntu uses/requires GRUB2 :)

    Are you sure? I have one Kubuntu 12.04 with GRUB 0.97.

  • FranciscoFrancisco Top Host, Host Rep, Veteran

    You likely installed it yourself, but I know debian and likely ubuntu as well all went to grub2 a while back o_O

    Maybe they swapped back in the latest stuff since grub2 is annoying, but I'm assuming nope.

    Francisco

  • I will give it another try and report my findings

Sign In or Register to comment.