On Wed, Apr 2, 2014 at 12:43 PM, Michael Chang <[email protected]> wrote: > On Tue, Apr 01, 2014 at 08:06:44PM +0400, Andrey Borzenkov wrote: >> В Tue, 1 Apr 2014 15:46:22 +0800 >> Michael Chang <[email protected]> пишет: >> >> > While trying to boot xen pv guest with old grub config (menu.lst), >> > the pvgrub2 loads it's menu successfully, but when you attemp to boot >> > the kernel it failed with the following message. >> > >> > error: couldn't load file /boot/vmlinuz-3.0.76-0.11-xen. >> > error: you need to load the kernel first. >> > >> > Press any key to continue..." >> > >> > The kernel is there and boots fine with pygrub. >> > >> > After some investigation, it boils down to the menu.lst has explicitly >> > set it's root device to (hd0,1) and therefore the root device is not >> > recognized by pvgrub2. >> > >> > title Xen -- SUSE Linux Enterprise Server 11 SP3 - 3.0.76-0.11 >> > root (hd0,1) >> > kernel /boot/vmlinuz-3.0.76-0.11-xen root=/dev/xvda2 resume=/dev/xvda1 >> > splash=silent showopts initrd /boot/initrd-3.0.76-0.11.xen >> > >> > I'd like to know whether old grub configuration is considered or planned >> > to work with pvgrub2 ? And is it a viable suggestion to have (hdX,Y) a >> > valid xen disk name because it's quite common in some existing configs ? >> > >> >> I believe this technically should work; but this needs someone who >> knows how Xen disks is mapped to hd number in legacy grub. >> >> It would be something like (completely untested) > > Thank you for the patch. I applied it and tried to test it. The > virtdisks[i].handle never matched with num as it's id of the disk (on > my system it is 51712). >
As I said, completely untested :) > Please pardon my ignorant, can num be the index to the virtdisks array > to get the mapped xen disk ? > pv-grub additionally sorts by handle: http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=stubdom/grub/mini-os.c;h=9d4bcc76d5f3e9907889948ee0dcea32e19c185b;hb=HEAD#l73 So to actually map pv-grub hdX we need to do the same. _______________________________________________ Grub-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/grub-devel
