WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] xen 4.0-testing: cannot install grub in debian domU (bo

2010/6/28 Niccolò Belli <darkbasic4@xxxxxxxxx>:
> Il 27 giugno 2010 18.03, Fajar A. Nugraha <fajar@xxxxxxxxx> ha scritto:
>> I don't follow your logic from the commands you run earlier (did you
>> run fdisk? install debian domU first? chroot?).
>
> I'm sorry, I did not explained it.
> I already installed debian with hvm and the debian installer (no debootstrap).
> During the installation it failed to install grub:
> grub-install /dev/sda
> Searching for GRUB installation directory ... found: /boot/grub
> The file /boot/grub/stage1 not read correctly.

Did you run grub-install manually? You shouldn't have to.
Also, just to clarify, this is grub, right, not grub-pc (i.e. grub2)?

>
> So I mounted the image, I added "1:2345:respawn:/sbin/getty 38400
> hvc0" to /etc/inittab and I booted using pv, pv-grub and xm console. I
> tried to install grub using pv but I obtained the same error.

You can't install grub to MBR when in pv (at least not the last time I
tried). The reason is that grub-install needs some BIOS stuff, and pv
does not have a BIOS.

>
>
>> However it doesn't
>> really matter for PV domU. PV domU does not need grub to be installed
>> to MBR/partition for pygrub to work. It simply needs
>> /boot/grub/menu.lst (for grub) with the correct entries.
>
> Yes, but I want the domU to automatically update menu.lst
>
>
>> As for "automatically update the grub config (menu.lst) to boot the
>> latest kernel installed", you really only need these lines on
>> kernel-img.conf (on Ubuntu anyway. might be the same on debian) which
>> should exist already on a normal installation:
>>
>> do_initrd = yes
>> postinst_hook = update-grub
>> postrm_hook   = update-grub
>
> It doesn't work if the grub package is not installed.

Yes, grub package needs to be installed to have update-grub working.
But when in PV it does not need to update MBR/partition.

>
>
>> Now, for HVM, it's slightly different. You REALLY need it installed to
>> /dev/sda. If you install Debian as HVM using the install CD, it
>> already does that automatically.
>
> It should, but it doesn't succeed.

If you have some time, could you test whether Ubuntu Lucid behaves the
same way on your system, can't install grub to MBR when in HVM mode?
That would at least help determine whether this is a Xen bug or Debian
bug.

-- 
Fajar

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users