Didier Raboud
2008-Nov-17 17:02 UTC
[Pkg-xen-devel] #505517 [grub-pc] Dosen't handle xen dom0 kernel automagically [PATCH]
package grub-pc tag 505517 patch upstream thanks Le jeudi 13 novembre 2008 09:36:03, vous avez ?crit?:> Hi, > > Willing to try Xen, I installed "xen-linux-system-2.6.26-1-xen-amd64", > which came with a bunch of packages? > > When I tried to boot the corresponding image, I got an error in Grub. > > AFAIK and from what I gathered on the web, the entry "should be": > > multiboot /xen-3.2-1-amd64.gz dom0_mem=1024M > module /vmlinuz-2.6.26-1-xen-amd64 root=/dev/mapper/Tamino-Root ro quiet > vga=792 > module /initrd.img-2.6.26-1-xen-amd64 > > instead of what is shown below. And in fact, it works. > > I think that booting the Xen hypervisor should be more straightaway than > now (I had to modify the grub-pc configuration). > > Regards, > > DidierHi, Here is a patch that solves bug #505517 in two steps?: * grub-pc_00_add_xen_support.patch Removes the xen kernels from 10_linux's listing (simply blacklisting *-xen-* kernels and initrds) * grub-pc_01_add_xen_support.patch * grub-pc_02_add_xen_support.patch * grub-pc_03_add_xen_support.patch Add a 10_xen in /etc/grub.d/ for support of the Xen hypervisors Lists all the *-xen-* kernels for each hypervisor version Maybe 00 should land in grub-pc and 01-03 in some other xen-unique package (e.g. the hypervisor itself). Thus cc-ing Debian Xen Team. I hope that a patch inspired by these could allow a Lenny release with "compatible" Xen and grub-pc. Best regards, OdyX -- Didier Raboud, proud Debian user. CH-1802 Corseaux didier at raboud.com -------------- next part -------------- A non-text attachment was scrubbed... Name: grub-pc_00_add_xen_support.patch Type: text/x-diff Size: 509 bytes Desc: not available Url : http://lists.alioth.debian.org/pipermail/pkg-xen-devel/attachments/20081117/f70d2edb/attachment.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: grub-pc_01_add_xen_support.patch Type: text/x-diff Size: 5076 bytes Desc: not available Url : http://lists.alioth.debian.org/pipermail/pkg-xen-devel/attachments/20081117/f70d2edb/attachment-0001.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: grub-pc_02_add_xen_support.patch Type: text/x-diff Size: 689 bytes Desc: not available Url : http://lists.alioth.debian.org/pipermail/pkg-xen-devel/attachments/20081117/f70d2edb/attachment-0002.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: grub-pc_03_add_xen_support.patch Type: text/x-diff Size: 441 bytes Desc: not available Url : http://lists.alioth.debian.org/pipermail/pkg-xen-devel/attachments/20081117/f70d2edb/attachment-0003.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part. Url : http://lists.alioth.debian.org/pipermail/pkg-xen-devel/attachments/20081117/f70d2edb/attachment.pgp
Ian Campbell
2008-Nov-17 17:30 UTC
[Pkg-xen-devel] #505517 [grub-pc] Dosen't handle xen dom0 kernel automagically [PATCH]
On Mon, 2008-11-17 at 18:02 +0100, Didier Raboud wrote:> Here is a patch that solves bug #505517 in two steps : > > * grub-pc_00_add_xen_support.patch > Removes the xen kernels from 10_linux's listing > (simply blacklisting *-xen-* kernels and initrds)This is wrong for a few reasons. First the uname of the kernel is not a strong indicator of its Xen'ness. Consider that XEN could just as likely be the users initials or the name of a particular machine for which this is a custom kernel. Secondly modern kernels (with CONFIG_PARAVIRT=y) can be booted on both Xen and native so you want a native entry to support that. Thirdly pygrub can be used to boot a domU by examining the inguest grub configuration. This relies on the presence of a native style entry inside the guest (although it doesn't currently speak the grub2 config file format). The only case where you might historically have wanted to exclude a kernel is a legacy (not CONFIG_PARAVIRT) kernel when you are running in domain 0 but that is counter to the pygrub usecase and it is complicated to detect when you are in domain 0 vs domain U reliably. Since it only effects legacy kernels it is best to just ignore it since it will go away shortly, IOW never filter away any Xen kernels. There are a number of closed bugs against grub1's update-grub about this issue, I guess debian/changelog of the grub1 source would list them.> > * grub-pc_01_add_xen_support.patch > * grub-pc_02_add_xen_support.patch > * grub-pc_03_add_xen_support.patch > Add a 10_xen in /etc/grub.d/ for support of the Xen hypervisors > Lists all the *-xen-* kernels for each hypervisor versionOnly kernels which have CONFIG_XEN_PRIVILEGED_GUEST=y should get a hypervisor style stanza (in addition to a native one as discussed above). Looks like there is some code duplication in 10_linux vs 10_xen, is there some common location you could put it ? Usually with grub1 Xen was listed first (I guess since in all likelihood if you installed it you will boot it) so perhaps 09_xen ??? Ian. -- Ian Campbell Current Noise: Pride And Glory - Losin' Your Mind It is clear that the individual who persecutes a man, his brother, because he is not of the same opinion, is a monster. -- Voltaire