How do I build my server's kernels
With the recent Meltdown and Spectre critical vulnerabilities, I had to recompile my server's kernel quote often, so I established the following routine:
- Download incremental patches:
for pn in `seq 115 118`; do
wget "https://cdn.kernel.org/pub/linux/kernel/v4.x/incr/patch-4.4.${pn}-$((pn+1)).xz"
done
- Unpack incremental patches:
for pn in `seq 115 118`; do
xz -d patch-4.4.${pn}-$((pn+1)).xz
done
- Apply incremental patches:
for pn in `seq 115 118`; do
patch -p1 < patch-4.4.${pn}-$((pn+1))
done
- Update configuration:
make oldconfig
- Build:
time nice -+19 make
All this (except 4) could be automated in a bash script, but I'm feeling lazy, so I wrote it down here for my personal reference.
No comments:
Post a Comment