[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] pv-grub installation problem



On 27 March 2014 17:58, Ian Campbell <Ian.Campbell@xxxxxxxxxx> wrote:
> On Thu, 2014-03-27 at 16:07 +0100, Aastha Mehta wrote:
>> Hello,
>>
>> I am trying to install pv-grub for my guest domains and I am facing
>> some troubles with that. I followed the steps as provided on the wiki
>> - http://wiki.xen.org/wiki/PvGrub, or more like
>> http://backdrift.org/xen-pvgrub-howto
>>
>> I tried to manually install the kernel packages in guest -
>> linux-headers-3.13.5-031305-generic_3.13.5-031305.201402221823_amd64.deb
>> linux-headers-3.13.5-031305_3.13.5-031305.201402221823_all.deb
>> linux-image-3.13.5-031305-generic_3.13.5-031305.201402221823_amd64.deb
>>
>> sudo dpkg -i linux-header-*deb linux-image-*deb
>>
>> and I get the following output:
>>
>> (Reading database ... 24775 files and directories currently installed.)
>> Preparing to replace linux-headers-3.13.5-031305-generic
>> 3.13.5-031305.201402221823 (using
>> linux-headers-3.13.5-031305-generic_3.13.5-031305.201402221823_amd64.deb)
>> ...
>>
>> Unpacking replacement linux-headers-3.13.5-031305-generic ...
>> Preparing to replace linux-headers-3.13.5-031305
>> 3.13.5-031305.201402221823 (using
>> linux-headers-3.13.5-031305_3.13.5-031305.201402221823_all.deb) ...
>>
>> Unpacking replacement linux-headers-3.13.5-031305 ...
>> Selecting previously unselected package linux-image-3.13.5-031305-generic.
>> Unpacking linux-image-3.13.5-031305-generic (from
>> linux-image-3.13.5-031305-generic_3.13.5-031305.201402221823_amd64.deb)
>> ...
>>
>> Done.
>>
>> Setting up linux-headers-3.13.5-031305 (3.13.5-031305.201402221823) ...
>> Setting up linux-image-3.13.5-031305-generic (3.13.5-031305.201402221823) ...
>> Running depmod.
>> update-initramfs: deferring update (hook will be called later)
>> Examining /etc/kernel/postinst.d.
>> run-parts: executing /etc/kernel/postinst.d/initramfs-tools
>> 3.13.5-031305-generic /boot/vmlinuz-3.13.5-031305-generic
>>
>> update-initramfs: Generating /boot/initrd.img-3.13.5-031305-generic
>> run-parts: executing /etc/kernel/postinst.d/x-grub-legacy-ec2
>> 3.13.5-031305-generic /boot/vmlinuz-3.13.5-031305-generic
>>
>> run-parts: executing /etc/kernel/postinst.d/zz-update-grub
>> 3.13.5-031305-generic /boot/vmlinuz-3.13.5-031305-generic
>>
>> Generating grub.cfg ...
>> cat: /boot/grub/video.lst: No such file or directory
>> /usr/sbin/grub-probe: warn: disk does not exist, so falling back to
>> partition device /dev/xvda2.
>>
>> Warning: Setting GRUB_TIMEOUT to a non-zero value when
>> GRUB_HIDDEN_TIMEOUT is set is no longer supported.
>>
>> /usr/sbin/grub-probe: warn: disk does not exist, so falling back to
>> partition device /dev/xvda2.
>>
>> Found linux image: /boot/vmlinuz-3.13.5-031305-generic
>> Found initrd image: /boot/initrd.img-3.13.5-031305-generic
>>
>> /usr/sbin/grub-probe: warn: disk does not exist, so falling back to
>> partition device /dev/xvda2.
>>
>> Found linux image: /boot/vmlinuz-3.13.5-guest
>> Found initrd image: /boot/initrd.img-3.13.5-guest
>>
>> /usr/sbin/grub-probe: warn: disk does not exist, so falling back to
>> partition device /dev/xvda2.
>> done
>> Setting up linux-headers-3.13.5-031305-generic (3.13.5-031305.201402221823) 
>> ...
>>
>> There is no /boot/grub/device.map file. Also, I manually tried to
>> install grub on /dev/xvda2, but it gives me similar messages:
>> root@u3:~# grub-install --boot-directory=/ /dev/xvda2
>> /usr/sbin/grub-probe: warn: disk does not exist, so falling back to
>> partition device /dev/xvda2.
>> /usr/sbin/grub-setup: warn: disk does not exist, so falling back to
>> partition device /dev/xvda2.
>> /usr/sbin/grub-setup: error: cannot guess the root device. Specify the
>> option `--root-device'.
>> root@u3:~# mount
>> /dev/xvda2 on / type ext3 (rw,noatime,nodiratime,errors=remount-ro)
>>
>> Clearly, the MBR is not properly set up. So, of course when I try to
>> boot the guest domain I get the "grubdom>" prompt, and I am not able
>> to boot.
>>
>> Can somebody let me know what is going wrong and how I can fix it?
>
> I don't know what is wrong but I just wanted to point out that the "MBR"
> is not actually used with PV GRUB, since that is a baremetal thing --
> hopefully you can now avoid that red herring.
>
> Things to investigate might be that Ubuntu (which it seems you are
> using) uses grub2 which has a different cfg filesyntax to grub1 (which
> is what pvgrub is based on). So you end up at the prompt because the
> expected cfg file (which you give the path to as "extra" in your guest
> cfg I think) just doesn't exist.
>
> For a workaround to that Debian has
> http://packages.qa.debian.org/p/pv-grub-menu.html not sure if Ubuntu has
> it too.
>
> Alternatively upstream grub has recently announced support for running
> grub2 as a PV Xen guest. Not sure if that is in any released version
> though, nor of any docs to point at.
>
> Ian.
>

Thanks for the reply. However, I have still not been able to get this
working. I tried to replace grub2 with grub1 and so now I have a
menu.lst boot config file. This is how my config file looks like -
##
...
## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title Ubuntu 12.04 LTS, kernel 3.13.5-031305-generic
root (hd0)
kernel /boot/vmlinuz-3.13.5-031305-generic
root=UUID=f705776c-c503-4130-abb4-395def49f73a ro console=hvc0 quiet
splash root=/dev/xvda2
initrd /boot/initrd.img-3.13.5-031305-generic

title Ubuntu 12.04 LTS, kernel 3.13.5-031305-generic (recovery mode)
root (hd0)
kernel /boot/vmlinuz-3.13.5-031305-generic
root=UUID=f705776c-c503-4130-abb4-395def49f73a ro  single
initrd /boot/initrd.img-3.13.5-031305-generic

title Ubuntu 12.04 LTS, kernel 3.13.5-guest
root (hd0)
kernel /boot/vmlinuz-3.13.5-guest
root=UUID=f705776c-c503-4130-abb4-395def49f73a ro console=hvc0 quiet
splash root=/dev/xvda2
initrd /boot/initrd.img-3.13.5-guest

title Ubuntu 12.04 LTS, kernel 3.13.5-guest (recovery mode)
root (hd0)
kernel /boot/vmlinuz-3.13.5-guest
root=UUID=f705776c-c503-4130-abb4-395def49f73a ro  single
initrd /boot/initrd.img-3.13.5-guest

title Chainload into GRUB 2
root (hd0)
kernel /boot/grub/core.img
### END DEBIAN AUTOMAGIC KERNELS LIST

I do not know what the last chainload entry is for. The problem to me
it seems is that somehow xvda is not being identified as a valid
device and so somehow it either does not have the grub properly
installed, or my way of specifying the root device is wrong. I have
tried specifying root as (hd0) as well as (hd0, 0) or (hd0, 1) - both
in the grub config file and the config file in the host - but it does
not help. The xvda2 is a separate disk image only, it is not a
partition.

And the config file in dom0 looks as follows -
kernel = '/usr/local/lib/xen/boot/pv-grub-x86_64.gz'
extra = '(hd0)/boot/grub/menu.lst'
vcpus = '1'
memory  = '1024'
disk  = [
          'file:/home/domains/u3.11g/disk.img,xvda2,w',
          'file:/home/domains/u3.11g/swap.img,xvda1,w',
        ]
name  = 'u3.13.5g'
dhcp  = 'dhcp'
vif = ['mac=00:16:3E:17:FA:E8']

I tried the pv-grub-menu generator that you suggested, but it does not
help either. I still get into the grubdom on booting the domU.

Thanks,
Aastha.

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.