RHEL 5.6 compile and install the 3.2.9 Kernel

Source: Internet
Author: User

Step 6:

1/download the kernel 3.2.9 kernel.org and decompress it to/usr/src:

[root@localhost src]# ls -latotal 141172drwxr-xr-x  6 root root     4096 Mar 11 19:31 .drwxr-xr-x 15 root root     4096 Mar 10 09:55 ..drwxr-xr-x  2 root root     4096 Oct  1  2009 debugdrwxr-xr-x  3 root root     4096 Mar 10 09:56 kernelsdrwxrwxr-x 23 root root     4096 Mar 11 19:27 linux-3.2.9-rwxrw-rw-  1 root root 78132997 Mar 11 09:48 linux-3.2.9.tar.bz2drwxr-xr-x  7 root root     4096 Mar 10 09:57 redhat

2/make gconfig. Save and exit without any modification. The. config file is generated locally and modified as follows:

1,

Change config_sysfs_deprecated to config_sysfs_deprecated = y.

Or

2,

Use make menuconfig to select the following options

General setup -->              [*] enable deprecated sysfs features to support old userspace tools

Otherwise, the new kernel of some systems cannot be started. Generally, the direct consequence is that the new kernel cannot be started:

RedHat nash Version 5.1.19.6 startingrver(2.6.33.3)mount: could not find filesystem ‘/dev/root’setuproot: moving /dev failed: No such file or directorysetuproot: error mounting /proc: No such file or directorysetuproot: error mounting /sys: No such file or directoryswitchroot: mount failed: No such file or directoryKernel panic – not syncing: Attempted to kill init![Linux-initrd @ 0x1fc37000,0x228585 bytes]

3/make:

[root@localhost linux-3.2.9]# make -j4   scripts/kconfig/conf --silentoldconfig Kconfigwarning: (AX88796_93CX6 && RTL8180 && RTL8187 && ADM8211 && RT2400PCI && RT2500PCI && RT61PCI && RT2800PCI && R8187SE) selects EEPROM_93CX6 which has unmet direct dependencies (MISC_DEVICES)** Restart config...*** General setup*Prompt for development and/or incomplete code/drivers (EXPERIMENTAL) [Y/n/?] yCross-compiler tool prefix (CROSS_COMPILE) [] Local version - append to kernel release (LOCALVERSION) [] Automatically append version information to the version string (LOCALVERSION_AUTO) [N/y/?] nKernel compression mode> 1. Gzip (KERNEL_GZIP)  2. Bzip2 (KERNEL_BZIP2)  3. LZMA (KERNEL_LZMA)  4. XZ (KERNEL_XZ)  5. LZO (KERNEL_LZO)choice[1-5?]: 1Default hostname (DEFAULT_HOSTNAME) [(none)] (none)Support for paging of anonymous memory (swap) (SWAP) [Y/n/?] ySystem V IPC (SYSVIPC) [Y/n/?] yPOSIX Message Queues (POSIX_MQUEUE) [Y/n/?] yBSD Process Accounting (BSD_PROCESS_ACCT) [Y/n/?] y  BSD Process Accounting version 3 file format (BSD_PROCESS_ACCT_V3) [N/y/?] nopen by fhandle syscalls (FHANDLE) [N/y/?] nExport task/process statistics through netlink (EXPERIMENTAL) (TASKSTATS) [Y/n/?] y  Enable per-task delay accounting (EXPERIMENTAL) (TASK_DELAY_ACCT) [Y/n/?] y  Enable extended accounting over taskstats (EXPERIMENTAL) (TASK_XACCT) [Y/n/?] y    Enable per-task storage I/O accounting (EXPERIMENTAL) (TASK_IO_ACCOUNTING) [Y/n/?] yAuditing support (AUDIT) [Y/n/?] y  Enable system-call auditing support (AUDITSYSCALL) [Y/n/?] yKernel .config support (IKCONFIG) [N/m/y/?] nKernel log buffer size (16 => 64KB, 17 => 128KB) (LOG_BUF_SHIFT) [19] 19Automatic process group scheduling (SCHED_AUTOGROUP) [N/y/?] nEnable deprecated sysfs features to support old userspace tools (SYSFS_DEPRECATED) [Y/n/?] y  Enable deprecated sysfs features by default (SYSFS_DEPRECATED_V2) [N/y/?] (NEW)

Enter y to start compilation.

4/make modules_install: copy the Lib file to/lib/modules:

[Root @ localhost linux-3.2.9] # ls/lib/modules/
2.6.18-238. EL5 3.2.9

5/make install

[Root @ localhost boot] # ls-latotal 17660drwxr-xr-x 3 Root 4096 Mar 11 20:22. drwxr-XR-x 26 Root 4096 Mar 11 .. -RW-r -- 1 Root 67210 DEC 20 2010 config-2.6.18-238.el5drwxr-xr-x 2 root Root 4096 Mar 11 grub-RW ------- 1 Root 2787124 Mar 10 initrd-2.6.18-238.el5.img-rw-r -- r -- 1 Root 4024934 Mar 10 initrd-2.6.18-238.el5kdump.img-rw ------- 1 Root 2784350 Mar 11 initrd-3.2.9.img-rw-r -- r -- 1 Root 94600 Jul 13 2006 memtest86 +-1.65-RW-r -- 1 Root 113923 Dec 20 2010 symvers-2.6.18-238.el5.gzlrwxrwxrwx 1 root 22 Mar 11 system. map->/boot/system. map-3.2.9-rw-r -- r -- 1 Root 1260254 DEC 20 2010 system. map-2.6.18-238.el5-rw-r -- r -- 1 Root 1879493 Mar 11 system. map-3.2.9lrwxrwxrwx 1 Root 19 Mar 11 vmlinuz->/boot/vmlinuz-3.2.9-rw-r -- r -- 1 Root 2094684 DEC 20 2010 vmlinuz-2.6.18-238.el5-rw-r -- r -- 1 Root 158 DEC 20 2010. vmlinuz-2.6.18-238.el5.hmac-rw-r -- r -- 1 Root 2861840 Mar 11 vmlinuz-3.2.9 [root @ localhost boot] # generated vmlinuz-3.2.9, initrd-3.2.9.img, system, map-3.2.9

You can.

Modify the startup directory:

1 # grub.conf generated by anaconda  2 #  3 # Note that you do not have to rerun grub after making changes to this file  4 # NOTICE:  You do not have a /boot partition.  This means that  5 #          all kernel and initrd paths are relative to /, eg.  6 #          root (hd0,0)  7 #          kernel /boot/vmlinuz-version ro root=/dev/sda1  8 #          initrd /boot/initrd-version.img  9 #boot=/dev/sda 10 default=0 11 timeout=5 12 splashimage=(hd0,0)/boot/grub/splash.xpm.gz 13 hiddenmenu 14 title Red Hat Enterprise Linux Server (3.2.9) 15     root (hd0,0) 16     kernel /boot/vmlinuz-3.2.9 ro root=LABEL=/ rhgb quiet crashkernel=128M@16M 17     initrd /boot/initrd-3.2.9.img 18 title Red Hat Enterprise Linux Server (2.6.18-238.el5) 19     root (hd0,0) 20     kernel /boot/vmlinuz-2.6.18-238.el5 ro root=LABEL=/ rhgb quiet crashkernel=128M@16M 21     initrd /boot/initrd-2.6.18-238.el5.img

Start from the new kernel.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.