[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)



2010/6/27 Niccolò Belli <darkbasic4@xxxxxxxxx>:
> Il 26 giugno 2010 17.51, Bruce Edge <bruce.edge@xxxxxxxxx> ha scritto:
>> I would assume you would need to mount the root .img via loopback, chroot
>> into it, and install form there
>
> I have to specify the offset when I loopback mount the image, so I
> will not be able to install it in the mbr but just in the first
> partition.
> Also I want the domU able to install the bootloader because I want it
> to automatically update the grub config (menu.lst) to boot the latest
> kernel installed.

I don't follow your logic from the commands you run earlier (did you
run fdisk? install debian domU first? chroot?). 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.

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

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

-- 
Fajar

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