Automatically (or semi-automatically) update /boot/grub/grub.conf?

General support questions
Post Reply
urilabob
Posts: 7
Joined: 2009/08/07 07:17:46

Automatically (or semi-automatically) update /boot/grub/grub.conf?

Post by urilabob » 2019/06/22 04:34:53

Hi; yep, you read that right: grub (not grub2) on centOS7. Why? Well, I have a remote virtual server with a commercial provider running centOS7. Unfortunately the provider uses pyconf for booting, which is grub (not grub2) compatible; in particular, it uses /boot/grub/grub.conf as the configuration file. It seems to work OK, and I can use yum to update almost everything successfully (including, apparently, the relevant kernel files). However yum does not update the grub.conf file, so it's still booting from the original 2014 kernel even though there are up-to-date kernels installed. Security is reasonably important for me on this machine, so I would really like to be running up-to-date kernels. I could edit the grub.conf file manually, but that is error prone (and boot errors on a remote virtual server are pretty hard to fix). So I'm looking for a way to automate the process as far as possible, to minimise errors.

In order of preference, what I'm looking for are:

1. Good ideas on how to do this (probably someone will have a better suggestion than either of the next two)

2. Any way to get centOS7 to update grub.conf (I suspect this is a forlorn hope, because the centOS7 repos are designed around grub2)

3. Any way to write a reliable script to handle the update - I can't afford to start from scratch, developing bash scripts generally is debug intensive (at least for me), and every error will result in an unbootable server. One thought I had would be to find the script centOS6 uses to update grub.conf, and bongle it, but I haven't had much luck in trying to find where it might be in the centOS6 repos

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: Automatically (or semi-automatically) update /boot/grub/grub.conf?

Post by aks » 2019/06/24 01:46:00

Well the obvious thing is to get the vendor to update their system or accept the security implications there of.

You can get the CentOS source and compile it yourself and retro fit it to use grub but over time this is probably not going to be something you'll want to do. As the kernel moves forward you may eventually find incompatibilities with the older (deprecated) grub boot loader. Also it's a bucket load of work, with the issues you have mentioned.

I think your best recourse is to push it back. If the vendor is happy to not get the newer features and bug fixes then you are essentially golden, because it now becomes their problem. If they want all the new bits, they need to move with the times. It's pretty binary.

Unless you are hired as a programmer,. then you'll have to fix it yourself. If you are not a programmer, have a go at fixing it (albeit not in production) - it would be fun and would be a feather in your cap.

Post Reply