Hi! I''m experimenting with Xen 4 on Squeeze. Squeeze uses grub2 by default, and the config format has changed. I can''t for the life of me figure out where to set options for the hypervisor and the Dom0 kernel on bootup. It seems the grub2 stanza for xen is being generated by /etc/grub.d/20_linux_xen and that seems to have some provisions for receiving arguments, but I have no idea how to make update-grub pass those arguments. Is there a config file I''m overlooking? --Igor _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On 09/30/2010 04:03 PM, Igor Serebryany wrote:> Hi! > > I''m experimenting with Xen 4 on Squeeze. Squeeze uses grub2 by > default, and the config format has changed. I can''t for the life of > me figure out where to set options for the hypervisor and the Dom0 > kernel on bootup. > > It seems the grub2 stanza for xen is being generated by > /etc/grub.d/20_linux_xen and that seems to have some provisions for > receiving arguments, but I have no idea how to make update-grub pass > those arguments. > > Is there a config file I''m overlooking? >Igor, I''m in the experimenting stage as well. Under Ubuntu 10.4 with grub2, I have the following in /etc/grub.d/40_custom : #!/bin/sh exec tail -n +3 $0 # This file provides an easy way to add custom menu entries. Simply type the # menu entries you want to add after this comment. Be careful not to change # the ''exec tail'' line above. menuentry "Xen 4.0.1 / Ubuntu 10.4 kernel 2.6.32.21-xen pvops" { recordfail insmod ext2 set root=(hd0,5) search --no-floppy --fs-uuid --set 52710c96-cc2d-473e-81e2-29be34d60339 multiboot /xen-4.0.1.gz module /vmlinuz-2.6.32.21-xen root=/dev/mapper/dokodemo-root ro module /initrd.img-2.6.32.21-xen } Andy _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Thu, Sep 30, 2010 at 05:08:13PM -0500, Andy Howell wrote:> On 09/30/2010 04:03 PM, Igor Serebryany wrote: > > Is there a config file I''m overlooking?I guess the config I was overlooking is /etc/default/grub -- settings set in there get imported into the scripts that generate the grub.cfg entries. Parsing the code, it looks like the 20_linux_xen script uses the following arguments: for the hypervisor options, use GRUB_CMDLINE_XEN and GRUB_CMDLINE_XEN_DEFAULT. for instance: GRUB_CMDLINE_XEN_DEFAULT="dom0_mem=256M" the dom0 kernel options come from the usual GRUB_CMDLINE_LINUX and LINUX_DEFAULT options. in both cases, the non-DEFAULT options come first, and the DEFAULT options are omitted in the rescue entries. I wish there was a way to pass arguments only to kernels being started as part of Dom0. I should submit this as an easy patch to debian... I also wasn''t sure what the conventional way to make Xen be the first thing that boots is, so I just changed the order in which the entries are generated: testbox1:/etc/grub.d# mv 20_linux_xen 09_linux_xen --Igor _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On 09/30/2010 06:04 PM, Igor Serebryany wrote:> On Thu, Sep 30, 2010 at 05:08:13PM -0500, Andy Howell wrote: >> On 09/30/2010 04:03 PM, Igor Serebryany wrote: >>> Is there a config file I''m overlooking? > > I guess the config I was overlooking is /etc/default/grub -- settings > set in there get imported into the scripts that generate the grub.cfg > entries. Parsing the code, it looks like the 20_linux_xen script uses > the following arguments: > > for the hypervisor options, use GRUB_CMDLINE_XEN and > GRUB_CMDLINE_XEN_DEFAULT. for instance: > > GRUB_CMDLINE_XEN_DEFAULT="dom0_mem=256M" > > the dom0 kernel options come from the usual GRUB_CMDLINE_LINUX and > LINUX_DEFAULT options. in both cases, the non-DEFAULT options come > first, and the DEFAULT options are omitted in the rescue entries. > > I wish there was a way to pass arguments only to kernels being started > as part of Dom0. I should submit this as an easy patch to debian... > > I also wasn''t sure what the conventional way to make Xen be the first > thing that boots is, so I just changed the order in which the entries > are generated: > > testbox1:/etc/grub.d# mv 20_linux_xen 09_linux_xen > > --Igor >Igor, If you edit /etc/default/grub and set GRUB_DEFAULT: GRUB_DEFAULT="Ubuntu, with Linux 2.6.32-24-generic" GRUB_DEFAULT is either the entry number or the exact menu text. The Ubuntu docs may be of help: https://help.ubuntu.com/community/Grub2 After you change it, run update-grub. Andy _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users