[kernel-xen] starting DomU's after upgrade to 4.2.0

Steven Spencer steven.spencer at kdsi.com
Sat Oct 13 01:19:47 EST 2012


On 10/12/2012 08:00 AM, Steven Haigh wrote:
> On 12/10/2012 11:51 PM, Steven Spencer wrote:
>> I must not have rebooted after the last kernel update.  And how my eyes
>> missed that, I'm not sure.  Thanks Steven.
>
> Yep, that'll do it every time...
>
> I've been meaning to write a bit of a script to run after the new
> kernel-xen package has been installed to automatically change it over to
> kernel, module, module. I am rather hesitant to do so without major
> testing though - as any small bug may cause the system to be unbootable.
>
> I welcome scripts on how to do this for testing - but for now, I've been
> happy enough to just let it be done manually - then at worst case, the
> Dom0 reboots without Xen and works as a normal machine instead of not
> booting at all.
>

This isn't elegant but this script does provide a methodology for 
getting this done.  You could probably improve on it greatly! ;-)

# grab the full path to sed and cat for the script
sedpath=`which sed`
catpath=`which cat`
# create a backup copy of the grub.conf in case we totally hose something
cp /etc/grub.conf /etc/grub.conf.01
# modify the grub.conf to change initrd to module
$catpath /etc/grub.conf | eval "$sedpath -e s/initrd/module/g > 
/etc/grub.conf"

I think sed and cat are available on all linux distros somewhere.  A 
boot CD would allow you to boot back into the machine, mount the root 
filesystem and allow you to copy the backup grub.conf.01 back to live in 
the event that there were a real disaster.

Obviously, the safest way is just to have the user modify grub.conf by hand.

Thanks,
-- 
-- 
Steven G. Spencer, Network Administrator
KSC Corporate - The Kelly Supply Family of Companies
Office 308-382-8764 Ext. 231
Mobile 308-380-7957


More information about the kernel-xen mailing list