Rudi Ahlers
2008-Apr-06 14:19 UTC
[Xen-users] How to stop yum update on CentOS 5.1 to modify grub
Hi all I just got a shocker today on a CentOS 5.1 x64 Xen server where the xen VPS didn''t work properly so I thought I''d reboot it, but upon reboot it gave me some memory errors, so I rebooted the server and couldn''t start Xen at all. Then after poking around I thought I''d check to see if the Xen kernel is running, and it''s not running. It seem yum updated has updated the kernel, and then updated grub to use the new CentOS kernel, which is what it''s supposed todo. But how do I stop yum from doing it? -- Kind Regards Rudi Ahlers CEO, SoftDux Office: 087 805-9573 Fax No: 086 609 6128 Cell: 082 554 7532 Web: http://www.SoftDux.com Forum: http://Forum.SoftDux.com Join SA WebHostingTalk today, on http://www.WebHostingTalk.co.za _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Stephan Seitz
2008-Apr-07 11:26 UTC
Re: [Xen-users] How to stop yum update on CentOS 5.1 to modify grub
Rudi Ahlers schrieb:> Hi all > > I just got a shocker today on a CentOS 5.1 x64 Xen server where the xen > VPS didn''t work properly so I thought I''d reboot it, but upon reboot it > gave me some memory errors, so I rebooted the server and couldn''t start > Xen at all. Then after poking around I thought I''d check to see if the > Xen kernel is running, and it''s not running. It seem yum updated has > updated the kernel, and then updated grub to use the new CentOS kernel, > which is what it''s supposed todo. But how do I stop yum from doing it?I wouldn''t hack into packet managers. It''s better to use menu.lst itself to reflect the changes you want. I don''t know which version of grub centos uses, but on recent debian/ubuntu systems, there are commented lines which are used for default values. e.g. ## Xen hypervisor options to use with the default Xen boot option # xenhopt=vtd=1 ## Xen Linux kernel options to use with the default Xen boot option # xenkopt=console=tty0 swiotlb=128 max_loop=64 and ## If you want special options for specific kernels use kopt_x_y_z ## where x.y.z is kernel version. Minor versions can be omitted. ## e.g. kopt=root=/dev/hda1 ro ## kopt_2_6_8=root=/dev/hdc1 ro ## kopt_2_6_8_2_686=root=/dev/hdc2 ro # kopt=root=UUID=2c9954c1-d8f5-477a-a808-39f768b10ac3 ro ## additional options to use with the default boot option, but not with the ## alternatives ## e.g. defoptions=vga=791 resume=/dev/hda5 # defoptions=quiet splash results in title Xen 3.2 / Ubuntu 7.10, kernel 2.6.18.8-xen root (hd0,0) kernel /xen-3.2.gz vtd=1 module /vmlinuz-2.6.18.8-xen root=UUID=2c9954c1-d8f5-477a-a808-39f768b10ac3 ro console=tty0 swiotlb=128 max_loop=64 module /initrd.img-2.6.18.8-xen quiet after running update-grub. Well, assuming you''ve appropriate xen, vmlinuz, initrd and System.map files in place ;) HTH Cheers, Stephan _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Bas Mevissen
2008-Apr-07 14:00 UTC
Re: [Xen-users] How to stop yum update on CentOS 5.1 to modify grub
Rudi Ahlers wrote:>> You can change it by modifying the file /etc/sysconfig/kernel: >> >> # UPDATEDEFAULT specifies if new-kernel-pkg should make >> # new kernels the default >> UPDATEDEFAULT=yes >> >> # DEFAULTKERNEL specifies the default kernel package type >> DEFAULTKERNEL=kernel-xen >> >> Make sure that your default kernel is "kernel-xen" and not "kernel" >> obviously. >> >> Regards, >> >> Bas. >> > Cool, thank you. Does the kernel version affect this, or get affected by > this at all? >When a new kernel is installed, the post install script touched the file to change old "kernel-smp" references to "kernel". Script should only update after a check on kernel-smp IMHO. But if you have both xen-enabled and non-xen kernels installed, they both get updated when a new kernel of either type is available. The /etc/sysconfig/kernel file only determines whether the newly installed kernel becomes the default. I personally don''t see why there are two switched needed for that. Guess it is for historical reasons. Regards, Bas. (please keep the list posted) _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Rudi Ahlers
2008-Apr-07 14:08 UTC
Re: [Xen-users] How to stop yum update on CentOS 5.1 to modify grub
Bas Mevissen wrote:> Rudi Ahlers wrote: > >>> You can change it by modifying the file /etc/sysconfig/kernel: >>> >>> # UPDATEDEFAULT specifies if new-kernel-pkg should make >>> # new kernels the default >>> UPDATEDEFAULT=yes >>> >>> # DEFAULTKERNEL specifies the default kernel package type >>> DEFAULTKERNEL=kernel-xen >>> >>> Make sure that your default kernel is "kernel-xen" and not "kernel" >>> obviously. >>> >>> Regards, >>> >>> Bas. >>> >> Cool, thank you. Does the kernel version affect this, or get affected >> by this at all? >> > When a new kernel is installed, the post install script touched the > file to change old "kernel-smp" references to "kernel". Script should > only update after a check on kernel-smp IMHO. > > But if you have both xen-enabled and non-xen kernels installed, they > both get updated when a new kernel of either type is available. > > The /etc/sysconfig/kernel file only determines whether the newly > installed kernel becomes the default. I personally don''t see why there > are two switched needed for that. Guess it is for historical reasons. > > Regards, > > Bas. > > (please keep the list posted) > > >ok, now I have a tricky question. Do I need to have both kernels installed? What if I remove the standard kernel, and only keep the xen kernel? -- Kind Regards Rudi Ahlers CEO, SoftDux Web: http://www.SoftDux.com Check out my technical blog, http://blog.softdux.com for Linux or other technical stuff, or visit http://www.WebHostingTalk.co.za for Web Hosting stuff _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Bas Mevissen
2008-Apr-07 14:13 UTC
Re: [Xen-users] How to stop yum update on CentOS 5.1 to modify grub
Rudi Ahlers wrote:> Bas Mevissen wrote:> ok, now I have a tricky question. Do I need to have both kernels > installed? What if I remove the standard kernel, and only keep the xen > kernel? >Well, I kept the non-xen kernel around in case the automatically starting xen domU''s would crash the system. In that case, I can easily start the box with a non-xen kernel to resolve the problem. But technically, I see no reason to keep them around. Bas. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Rudi Ahlers
2008-Apr-07 14:29 UTC
Re: [Xen-users] How to stop yum update on CentOS 5.1 to modify grub
Bas Mevissen wrote:> Rudi Ahlers wrote: >> Bas Mevissen wrote: > >> ok, now I have a tricky question. Do I need to have both kernels >> installed? What if I remove the standard kernel, and only keep the >> xen kernel? >> > > Well, I kept the non-xen kernel around in case the automatically > starting xen domU''s would crash the system. In that case, I can easily > start the box with a non-xen kernel to resolve the problem. > > But technically, I see no reason to keep them around. > > Bas. >That''s what I''m fearing as well. What if the Xen kernel crashes. In this case I''d still need to drive out to the DC - which I don''t quite want. I guess I''ll just exclude the normal kernel from the updates as you suggest. P.S. Do you know if one could set a backup / fail-safe kernel in grub, which can automatically boot if thew default kernel gives problems? -- Kind Regards Rudi Ahlers CEO, SoftDux Web: http://www.SoftDux.com Check out my technical blog, http://blog.softdux.com for Linux or other technical stuff, or visit http://www.WebHostingTalk.co.za for Web Hosting stuff _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Bas Mevissen
2008-Apr-07 14:40 UTC
Re: [Xen-users] How to stop yum update on CentOS 5.1 to modify grub
Rudi Ahlers wrote:> That''s what I''m fearing as well. What if the Xen kernel crashes. In this > case I''d still need to drive out to the DC - which I don''t quite want.I''ve installed an IPMI2 module in my server. Costs about Eur 50 and gives you remote monitors (temperature, fans) and serial port-like console. Saved me a few trips to the DC already.> I guess I''ll just exclude the normal kernel from the updates as you > suggest. P.S. Do you know if one could set a backup / fail-safe kernel > in grub, which can automatically boot if thew default kernel gives > problems? >Just set UPDATEDEFAULT to "yes" if you want the latest Xen kernel by default and to "no" otherwise. Set DEFAULTKERNEL to "kernel-xen" and simply leave that other kernel around. Grub is no watchdog. So it cannot detect boot failure. If you want something like that, arrange a budget and contact me :-) Bas. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Rudi Ahlers
2008-Apr-07 14:49 UTC
Re: [Xen-users] How to stop yum update on CentOS 5.1 to modify grub
Bas Mevissen wrote:> Rudi Ahlers wrote: > >> That''s what I''m fearing as well. What if the Xen kernel crashes. In >> this case I''d still need to drive out to the DC - which I don''t quite >> want. > > I''ve installed an IPMI2 module in my server. Costs about Eur 50 and > gives you remote monitors (temperature, fans) and serial port-like > console. Saved me a few trips to the DC already. > >> I guess I''ll just exclude the normal kernel from the updates as you >> suggest. P.S. Do you know if one could set a backup / fail-safe >> kernel in grub, which can automatically boot if thew default kernel >> gives problems? >> > > Just set UPDATEDEFAULT to "yes" if you want the latest Xen kernel by > default and to "no" otherwise. Set DEFAULTKERNEL to "kernel-xen" and > simply leave that other kernel around. > > Grub is no watchdog. So it cannot detect boot failure. If you want > something like that, arrange a budget and contact me :-) > > Bas. >Hi Bas Unfortunately things work a lot different in our country. I''d like to take up your offer on the watchdog, but I know I won''t be able to afford it, especially if you say I need to budget for it. Our currency is about 8times the USD, so for USD100 I need to pay USD800 - which is a lot. And then we still need to pay for import duties, etc. Quite often, the USD100 components end up costing us about USD300''s value. P.S. What is IPMI2? Will it work on standard Pentium IV grade motherboards, or only on Xeon server grade motherboards? And does it get installed on the inside of the server, or how does it work? -- Kind Regards Rudi Ahlers CEO, SoftDux Web: http://www.SoftDux.com Check out my technical blog, http://blog.softdux.com for Linux or other technical stuff, or visit http://www.WebHostingTalk.co.za for Web Hosting stuff _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Bas Mevissen
2008-Apr-07 15:55 UTC
Re: [Xen-users] How to stop yum update on CentOS 5.1 to modify grub
Rudi Ahlers wrote:> Unfortunately things work a lot different in our country. I''d like to > take up your offer on the watchdog, but I know I won''t be able to afford > it, especially if you say I need to budget for it.Maybe there is some soft watchdog solution already written. You will need some kind of remote power switch to make it complete.> P.S. What is IPMI2? Will it work on standard Pentium IV grade > motherboards, or only on Xeon server grade motherboards? And does it get > installed on the inside of the server, or how does it work? >http://en.wikipedia.org/wiki/Intelligent_Platform_Management_Interface Remote console -> serial over LAN. Depends on motherboard support, not on the CPU type. I use a rather cheap SuperMicro server that has IPMI with serial (console) over LAN as an option. IPMI combines really good with Xen servers if you take a moment to configure it properly. Xen takes over the serial port, so you need to follow other instructions than for non-Xen systems. They are only slightly different luckily. Regards, Bas. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Mark Williamson
2008-Apr-13 15:49 UTC
Re: [Xen-users] How to stop yum update on CentOS 5.1 to modify grub
> > I''ve installed an IPMI2 module in my server. Costs about Eur 50 and > > gives you remote monitors (temperature, fans) and serial port-like > > console. Saved me a few trips to the DC already. > > > >> I guess I''ll just exclude the normal kernel from the updates as you > >> suggest. P.S. Do you know if one could set a backup / fail-safe > >> kernel in grub, which can automatically boot if thew default kernel > >> gives problems? > > > > Just set UPDATEDEFAULT to "yes" if you want the latest Xen kernel by > > default and to "no" otherwise. Set DEFAULTKERNEL to "kernel-xen" and > > simply leave that other kernel around. > > > > Grub is no watchdog. So it cannot detect boot failure. If you want > > something like that, arrange a budget and contact me :-) > > > > Bas. > > Hi Bas > > Unfortunately things work a lot different in our country. I''d like to > take up your offer on the watchdog, but I know I won''t be able to afford > it, especially if you say I need to budget for it. Our currency is about > 8times the USD, so for USD100 I need to pay USD800 - which is a lot. And > then we still need to pay for import duties, etc. Quite often, the > USD100 components end up costing us about USD300''s value. > > P.S. What is IPMI2? Will it work on standard Pentium IV grade > motherboards, or only on Xeon server grade motherboards? And does it get > installed on the inside of the server, or how does it work?Grub can do some useful high availability things; you can set a fallback kernel in case the default fails to load at all. You can also set up grub so that it will only choose a particular item *if* on the previous boot the system managed to get fully booted and ran a user-specified script to modify grub''s next boot settings. This way you can ensure that if a system reboots before your grub update script gets run then the next boot will choose a safe fallback boot option. I set this up on one of my systems once. Cheers, Mark -- Push Me Pull You - Distributed SCM tool (http://www.cl.cam.ac.uk/~maw48/pmpu/) _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users