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

Re: [Xen-users] xen 4.0-testing: cannot install grub in debian domU (both hvm and pv)


  • To: xen-users@xxxxxxxxxxxxxxxxxxx
  • From: Niccolò Belli <darkbasic4@xxxxxxxxx>
  • Date: Sun, 27 Jun 2010 22:22:04 +0200
  • Delivery-date: Sun, 27 Jun 2010 13:23:36 -0700
  • 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 :content-type:content-transfer-encoding; b=FSCaXEiLpSXSVsDOU0uwvvIad4FQ/ziwy4hFKsCoMLu0AlPhBptLVXeJ1ma1HlmGMQ xgVEP7RNecP6AJ1jtxcoqXmLRRmTGwSj+tX6mCKJGj5PU4AST/xAwNp7qXdaNoUYpKP4 RO/fw/ETGbxT0CANF8Q4CvuwQUO3LZXtomAfY=
  • List-id: Xen user discussion <xen-users.lists.xensource.com>

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


> 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


 


Rackspace

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