Skip to contentSkip to conversation

F16, yum install xen, run grub2 or grubby as needed?

DISCUSSION Konrad Rzeszutek Wilk 3 participants 7 messages Sep 15, 2011 – Sep 22, 2011

lore
Share & tools
lore
#0 lore raw

Hey Michael,

I was playing today with https://admin.fedoraproject.org/updates/grubby-8.2-1.fc16?_csrf_token=014c2b18c3b6e843699e9ef1e56cf9726c5c4fc2
and https://admin.fedoraproject.org/updates/grub2-1.99-6.fc16 which make the grub.cfg have the
correct entries of Xen and Linux.

And realized that I had to manually do:

grub2-mkconfig > /boot/grub2/grub.cfg

which ends up doing the new stanza.. but in some sense I think it makes senee for the Xen script to actually call this.

Thoughts?

#1 lore raw
Quoted 6 lines · Konrad Rzeszutek Wilk

Hey Michael,

I was playing today with https://admin.fedoraproject.org/updates/grubby-8.2-1.fc16?_csrf_token=014c2b18c3b6e843699e9ef1e56cf9726c5c4fc2
and https://admin.fedoraproject.org/updates/grub2-1.99-6.fc16 which make the grub.cfg have the
correct entries of Xen and Linux.

Quoted 8 lines

And realized that I had to manually do:

grub2-mkconfig > /boot/grub2/grub.cfg

which ends up doing the new stanza.. but in some sense I think it makes senee for the Xen script to actually call this.

Thoughts?

It probably makes sense to have a post-install/post-uninstall script in the xen-hypervisor RPM to run this. The updated grub2 creates a set of entries for each of xen-4.1.1.gz and its two symbolic links xen-4.1.gz and xen.gz which is a bit untidy, so perhaps it makes sense to remove the symbolic links.

Michael Young

#2 lore raw
Quoted 15 lines · M A Young
Quoted 13 lines · Konrad Rzeszutek Wilk

Hey Michael,

I was playing today with https://admin.fedoraproject.org/updates/grubby-8.2-1.fc16?_csrf_token=014c2b18c3b6e843699e9ef1e56cf9726c5c4fc2
and https://admin.fedoraproject.org/updates/grub2-1.99-6.fc16 which make the grub.cfg have the
correct entries of Xen and Linux.

And realized that I had to manually do:

grub2-mkconfig > /boot/grub2/grub.cfg

which ends up doing the new stanza.. but in some sense I think it makes senee for the Xen script to actually call this.

Quoted 7 lines
Quoted 1 line

Thoughts?

It probably makes sense to have a post-install/post-uninstall script in the xen-hypervisor RPM to run this. The updated grub2 creates a set of entries for each of xen-4.1.1.gz and its two symbolic links xen-4.1.gz and xen.gz which is a bit untidy, so perhaps it makes sense to remove the symbolic links.

Taking this a step further.. what about re-ordering the boot order? Say 'yum install xen-hypervisor' (which implies that the user has a good idea of what Xen is), would make sure that the Xen 4.1.1 stanze is called before the baremetal? Not sure what it would entail (modifying /etc/default/grub?) and whether that is actually OK?

#3 lore raw
Quoted 5 lines · Konrad Rzeszutek Wilk
Quoted 4 lines · M A Young
Quoted 2 lines · Konrad Rzeszutek Wilk

realized that I had to manually do:
grub2-mkconfig > /boot/grub2/grub.cfg

Yes, I've been manually running that too, but the resuling grub.cfg file from when I manually regenerate it is subtly different from the grub.cfg generated after automatically installing a new kernel ...

The one generated by manually running grub2-mkconfig creates a Xen submenu with all the various kernels under it, whereas after installing a new kernel, the one generated has all the xen + kernels in the top level menu.

Quoted 4 lines
Quoted 4 lines

grub2 creates a
set of entries for each of xen-4.1.1.gz and its two symbolic links xen-4.1.gz and xen.gz which is a bit untidy, so perhaps it makes sense to remove the symbolic links.

I've submitted a bug with a patch to make the /etc/20_linux_xen helper script ignore the symbol files and symbolic links, if there's no need for the symbolic links the patch could be even simpler.

https://bugzilla.redhat.com/show_bug.cgi?id=738085

#4 lore raw
Quoted 9 lines · Andy Burns
Quoted 5 lines · Konrad Rzeszutek Wilk
Quoted 4 lines · M A Young
Quoted 2 lines · Konrad Rzeszutek Wilk

realized that I had to manually do:
grub2-mkconfig > /boot/grub2/grub.cfg

Quoted 8 lines

Yes, I've been manually running that too, but the resuling grub.cfg file from when I manually regenerate it is subtly different from the grub.cfg generated after automatically installing a new kernel ...

The one generated by manually running grub2-mkconfig creates a Xen submenu with all the various kernels under it, whereas after installing a new kernel, the one generated has all the xen + kernels in the top level menu.

Oh, well, that is kind of convient. So you install new kernel and viola the new kernel boots in the hypervisor kernel?

Quoted 9 lines
Quoted 5 lines
Quoted 5 lines

grub2 creates a
set of entries for each of xen-4.1.1.gz and its two symbolic links xen-4.1.gz and xen.gz which is a bit untidy, so perhaps it makes sense to remove the symbolic links.

I've submitted a bug with a patch to make the /etc/20_linux_xen helper script ignore the symbol files and symbolic links, if there's no need for the symbolic links the patch could be even simpler.

Could you also send the patch to upstream grub2? So that other distros can benefit as well?

Quoted 7 lines

https://bugzilla.redhat.com/show_bug.cgi?id=738085

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#5 lore raw
Quoted 9 lines · Konrad Rzeszutek Wilk
Quoted 4 lines · Andy Burns

The one generated by manually running grub2-mkconfig creates a Xen submenu with all the various kernels under it, whereas after installing a new kernel, the one generated has all the xen + kernels in the top level menu.

Oh, well, that is kind of convient. So you install new kernel and viola the new kernel boots in the hypervisor kernel?

No, because the baremetal stanza for the new kernel seems to always be before the xen stanza

Quoted 6 lines
Quoted 3 lines

I've submitted a bug with a patch to make the /etc/20_linux_xen helper script ignore the symbol files and symbolic links, if there's no need for the symbolic links the patch could be even simpler.

Could you also send the patch to upstream grub2? So that other distros can benefit as well?

Yes, will do ...

#6 lore raw
In reply to Konrad Rzeszutek Wilk
Quoted 1 line · Konrad Rzeszutek Wilk

Oh, well, that is kind of convient. So you install new kernel and viola the new kernel boots in the hypervisor kernel?

The way I achieved that, is to edit /etc/default/grub to include GRUB_DEFAULT="Xen"

which matches the submenu created by /etc/grub.d/20_linux_xen

so the submenu is the default chosen, and the newest kernel is automatically chosen from the top item of the submenu.

I suspect there are still flies in the ointment with that, which was when I started to notice that installing a kernel had messed with the /boot/grub2/grub.cfg file

If my server was in the remote data centre rather than the next room, I wouldn't be confident about rebooting it and expecting it to run the right combination of xen+kernel.