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

To: Niccolò Belli <darkbasic4@xxxxxxxxx>
Subject: Re: [Xen-users] xen 4.0-testing: cannot install grub in debian domU (both hvm and pv)
From: Bruce Edge <bruce.edge@xxxxxxxxx>
Date: Sun, 27 Jun 2010 14:11:26 -0700
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sun, 27 Jun 2010 14:13:59 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=uavtn26ZfiJyVsHHaPxghQTLphTm5HH5BCjldEY/4vI=; b=vZsk+NpFRpsLsG7i6LpLJOL0R9dCWmEmyq8Yyf3IJu+5M04V/wA4dWS/3FkH6zqNtI leQyWwyGA5+7k4YqSoa3ycNojegJoKvBkdYA7h2XxRRaQZrF2n6WP/H9LD1f7g0DDwwX EZNnl6WtTWHgClzpeYDUGdJBSxslCMdcbqWhI=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=qfDO33B2A8dNgivmOoNLCCurqS0sgGERZXCgqEdne1srLzeTG5GLE+W9HQ8iRPlocY jB2+FDJ2gnY/Lh4hCaoSeQwZj0p0OPEJi37PPL6Ym8t04HgpeDBuICi/Jf/QnURBPt+6 BLlu+PE45Ua+jtnZ9UjotQSyTFnJBRxPDDj6Y=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <AANLkTimYqcUkGaEXYfUZO3qSUIOb-WfBlblCB63ejX2Q@xxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <AANLkTimSgqOwwnsurIPKPhwsetwlfH1OqRoMeyuS5BCA@xxxxxxxxxxxxxx> <AANLkTiksziKe57E56f0Cqbziq2z_Mphvu62WQJp_Riej@xxxxxxxxxxxxxx> <AANLkTin69LPnuu45DPjPgjra8rak_3ffCAhJjIu6t_rl@xxxxxxxxxxxxxx> <AANLkTikXxb5iVo82S6qn4r6AsTunIGVKQXfu-cR5rUOH@xxxxxxxxxxxxxx> <AANLkTimYqcUkGaEXYfUZO3qSUIOb-WfBlblCB63ejX2Q@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
2010/6/27 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.

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.


> 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


Ahh, that makes sense.

How about this:

The latest kernel is always going to leave a symlink pair in root:
 lrwxrwxrwx   1 root root    28 2010-06-27 09:29 vmlinuz -> boot/vmlinuz-2.6.34-5-server
 lrwxrwxrwx   1 root root    31 2010-06-27 09:29 initrd.img -> boot/initrd.img-2.6.34-5-server

Have one manually constructed menu.lst that uses /vmlinuz and /initrd.img instead of the actual files in /boot/...
That lets the kernel version float under it and not have to keep updating the menu.lst.

-Bruce


> 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.


> 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 want to install it manually
> after that, you can:
> - boot with a live CD (I like sysrescuecd)
> - mount all the necessar partitions ( "/", /boot, and possible others)
> - bind-mount /dev, /dev/pts/, /sys, and /proc to the mounted root
> - chroot
> - possibly edit /etc/mtab
> - grub-install /dev/sda

If debian cannot install the grub package the bootloader is useless
because I do not really need it, I just want the domU to update
menu.lst on its own.

Darkbasic

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

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