This Linux Kernel patch changes the default TIME-WAIT
duration (60 seconds for
Linux 5.4).
- Download the Linux source tree
linux-X.Y[.Z]
in this directory:
$ wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-X.Y[.Z].tar.xz
$ tar -xvf linux-X.Y[.Z].tar.xz
- Apply the patch:
$ cd linux-X.Y[.Z]
$ patch -p1 < ../patchfile_linux-X.Y[.Z]
- Download the Linux source tree
linux-X.Y[.Z]
in this directory:
$ wget https://cdn.kernel.org/pub/linux/kernel/vX.x/linux-X.Y[.Z].tar.xz
$ tar -xvf linux-X.Y[.Z].tar.xz
- Copy it to
linux-X.Y[.Z].original
:
$ cp -R linux-X.Y[.Z] linux-X.Y[.Z].original
- Modify the source code in
linux-X.Y[.Z]
. - Create the new patch file:
$ diff -uNr linux-X.Y[.Z].original linux-X.Y[.Z] > patchfile_linux-X.Y[.Z]
- Download the Linux source tree
linux-X.Y[.Z]
and apply a patch. - Install the compilers and tools needed to build the Kernel:
$ sudo apt-get install build-essential libncurses-dev bison flex libssl-dev libelf-dev
- Copy and edit the existing Linux configuration (or use
make menuconfig
):
$ cp -v /boot/config-$(uname -r) linux-X.Y[.Z]/.config
If copying from Ubuntu, read this.
- Build the Kernel:
$ cd linux-X.Y[.Z]
$ make oldconfig
$ make -j $(nproc)
- Install the Kernel modules:
$ sudo make modules_install
- Install the Kernel:
$ sudo make install
- Clean build object files:
$ make clean
- Edit and update the Grub configuration:
$ sudo vi /etc/default/grub
$ sudo update-grub
- Reboot the system:
$ sudo reboot
- Check the new Kernel version:
$ uname -mrs
- Rodrigo Alves Lima (ral@gatech.edu)
Copyright (C) 2022 Rodrigo Alves Lima.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.