I am writing a BASH script that automatically configures, builds and installs the most recent kernel image. The generated kernel should include the grsecurity patchset. It would use the previous configuration from /proc/config.gz, which I created manually when compiling the first custom kernel on the machine.
Is it safe to fully automatize the process? It would look like this:
- Check the most recent kernel that
grsecurityis available for - Download the
grsecuritypatchset and the matching kernel source tree - Patch the kernel
- Copy the previous kernel configuration file into the kernel source directory
- Run
make olddefconfigto configure the kernel based on the previous configuration - Compile the kernel with
fakeroot make deb-pkg - Install the resulting packages and change bootloader priority
- Send me a mail indicating that a reboot is required
The main question: is it likely that a kernel compiled with olddefconfig will contain errors that prevent the system from booting if the previous configuration is working correctly? It is very important because it is a remote server accessed via SSH and a manual rescue would take a lot of effort.