-
Notifications
You must be signed in to change notification settings - Fork 1
/
README_RHEL
65 lines (46 loc) · 2.12 KB
/
README_RHEL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Recompiling a RHEL 5 / CentOS 5 kernel
--------------------------------------
- Look up the version of the installed kernel, e.g. through the
following command:
uname -r
- Choose a RHEL / CentOS mirror
- Download the source RPM matching the installed kernel version, e.g.
kernel-2.6.18-92.1.22.el5.src.rpm
- Now generate a kernel source tree from this source RPM by running
the following commands as root:
useradd mockbuild
rpm -i kernel-2.6.18-92.1.22.el5.src.rpm
The above commands will create a kernel spec file
/usr/src/redhat/SPECS/kernel-2.6.spec and will create the files for
building the kernel source tree in /usr/src/redhat/SOURCES/.
- The kernel source tree can now be built by running the commands
below. These commands will not only create a kernel source tree but will
also install a kernel .config file:
yum install unifdef
rm -rf /usr/src/redhat/BUILD
mkdir -p /usr/src/redhat/BUILD
chown mockbuild /usr/src/redhat/BUILD
sudo -u mockbuild rpmbuild -bp /usr/src/redhat/SPECS/kernel-2.6.spec
- Next, apply the SCST patches to this kernel source tree:
cd "/usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.$(uname -m)"
patch -p1 <${SCST_SOURCE_DIR}/scst/kernel/rhel/scst_exec_req_fifo-rhel5.patch
patch -p1 <${SCST_SOURCE_DIR}/iscsi-scst/kernel/patches/rhel/put_page_callback-rhel5.patch
- Modify EXTRAVERSION in Makefile from "-prep" into "-scst". The text
assigned to the EXTRAVERSION variable will be appended to the kernel
version 2.6.18 and will appear a.o. in the GRUB boot menu. Choosing a
name that refers to the SCST project will help to recognize the
customized kernel.
- If you are familiar with kernel configuration, you can decrease
kernel compilation time significantly by minimizing the kernel
configuration as follows:
yum install qt-devel
lsmod
make xconfig &
- Now compile and install the kernel:
make && make modules
mkdir -p /lib/modules/2.6.18-scst && make modules_install && make install
- Edit the bootloader menu such that the newly compiled kernel is
loaded by default:
vi /boot/grub/menu.lst
- Boot into the new kernel:
reboot