Home IT Linux Windows Database Network Programming Server Mobile  
  Home \ Programming \ In Debian 4.3 compiler under Linux-2.6.28 kernel Summary     - CentOS source installation GitLab Chinese Version (Server)

- MongoDB common optimization settings in Linux (Database)

- Java Generics Introduction --HashMap summary (Programming)

- Monitor log file (listener.log) (Database)

- Root of AVL Tree- achieve balanced search trees AVL tree (Programming)

- Linux system performance monitoring with Nmon (Linux)

- LVM management reduces swap partition space to the root partition (Linux)

- Python Flask environment to build (Linux)

- Oracle Data File Management (Database)

- Ubuntu 14.04 Solution login interface infinite loop (Linux)

- Dom4j change XML coding (Programming)

- Linux Basic Course: Install the software from source code (Linux)

- How do I delete a NEEDS RECOVERY rollback state of undo tablespace (Database)

- How to use Linux to download music from Grooveshark (Linux)

- I like Linux Security (Linux)

- tar command to extract a file error: stdin has more than one entry (Linux)

- Running the open-source Swift under Linux platform (Linux)

- Linux host system monitoring implement the cgi (Server)

- Log device files under Linux - logger (Linux)

- Linux Change ssh port and disable remote root login at (Linux)

  In Debian 4.3 compiler under Linux-2.6.28 kernel Summary
  Add Date : 2018-11-21      

From the information I have found a point of view, there are two ways to compile the Linux kernel.

I would like to talk about the new method, this method is very simple. Anyway, I was a success. Of course, these operations need to be root user. My first CD-ROM Minimum system Debian-etch4.3 installed. Before kernel compiled in such a system, but also need to install some kits.

To complete the kernel compilation, Debian4.3 also need to install the package as follows:

# apt-get install gcc

# apt-get install make

# apt-get install libc6-dev

# apt-get install bzip

# apt-get install ncurse-dev

# apt-get install initrd-tools       ## if you want to use the mkinitrd command, you must install this package

With these packages, you should be able to compile the kernel using traditional methods.

If you want to use a new method to compile the kernel, you also need the following packages:

# apt-get install kernel-package

# apt-get install apt-get install fakeroot

After installing the kernel-package package, I suggest that when the compiler encountered any problems when you open this file to see: / usr / share / kernel-package / docs / README

well above preparations, we embark on the next steps to compile and install the kernel

will copy the kernel source file to the relevant directory, then unzip it. I will copy the source code to the next / usr / src directory

# tar xvf Linux-2.6.28.tar.bz2

# cd /usr/src/Linux-2.6.28

make some cleanup. Of course, after you extract the first compilation, you can not do these

# make clean

# make mrproper

The current kernel configuration as a template

# cp /boot/config-2.6.18-6-k7 .config

the first not to make any changes to the kernel configuration file directly start compiling. If you press the Configure compilation config-2.6.18-6-k7 normal start of the new kernel, then the kernel configuration. Because I was related operations in character mode interface menu, so use the following command:

# make menuconfig

appears kernel configuration interface, it can make the appropriate selection based on their computer's hardware.

start compiling

# make-dpkg clean

# fakeroot make-kpkg --initrd Linux_image

The above two commands right after the execution, we will see such a debian package in / usr / src directory:


install this package, you can complete the installation of the new kernel.

# dpkg -i Linux-image-2.6.28_2.6.28-10.00.Custom_i386.deb

The above command automatically modify menu.lst file, to which the following contents:

title                     Debian GNU / Linux, kernel 2.6.28

root                       (hd0,4)

kernel                   /boot/vmlinuz-2.6.28 root = / dev / hda5 ro

initrd                   /boot/initrd.img-2.6.28


title                     Debian GNU / Linux, kernel 2.6.28 (single-user mode)

root                       (hd0,4)

kernel                   /boot/vmlinuz-2.6.28 root = / dev / hda5 ro single

initrd                   /boot/initrd.img-2.6.28


to restart the computer, you can see the GRUB boot screen has been modified. Select Run menu kernel 2.6.28, Linux to see whether the normal start.

Let us look at the traditional methods. When I use this method to compile the kernel, we had some trouble. In fact, I compiled under 2.4.X kernel debian3.1 environment, although there are some twists and turns, but ultimately successful. I direct that the process of compiling the command needed to run it. I will copy the Linux-2.6.28.tar.bz2 to under / usr / src directory.

# tar xvf Linux-2.6.28.tar.bz2

# cd /usr/src/Linux-2.6.28

# make clean

# make mrproper

# make

# make modules_install

# cp -v / arch / i386 / boot / bzImage /boot/vmlinuz-2.6.28

# cd ../../..

# cp System.map /boot/System.map-2.6.28

# mkinitramfs -o /boot/initrd.img-2.6.28 2.6.28

# cp .config /boot/config-2.6.28

Of course, but also to modify /boot/grub/menu.lst, add the following content:

title                     Debian GNU / Linux, kernel 2.6.28

root                       (hd0,4)

kernel                   /boot/vmlinuz-2.6.28 root = / dev / hda5 ro

initrd                   /boot/initrd.img-2.6.28


to finish the work, restart the computer and see if you can normally enter the Linux system.

Several problems I encountered during compilation:

1, the traditional method of compiling the kernel, after the start-up display 'Unpacking initramfs ...   Kernel panic - not syncing: bad gzip magic numbers' error, the boot process will not proceed.

After several experiments, I think it is making use mkinitrd command initrd.img files related problems. I use the command make mkinitramfs initrd.img file, you can start properly. Operating in the following format:

# mkinitramfs -o /boot/initrd.img-2.6.28 2.6.28

In the above command, -o /boot/initrd.img-2.6.28 generate initrd.img-2.6.28 specifies the output file path,

2.6.28 drive module subsequent to the path specified under the space after the /lib/modules/2.6.28 added initrd.img-2.6.28 file. Without this parameter, added initrd.img-2.6.28 file is the current version of the driver module. For example, the Linux operating system kernel version If you are currently running a 2.6.18, then, / lib / 2.6.18 will have a subfolder modules, although the following command is to generate initrd.img file version 2.6.28 , but is actually under the driver module /lib/modules/2.6.18 added:

# mkinitramfs -o /boot/initrd.img-2.6.28

far as I understand, I think initrd.img files generated by the conventional method generates an error because the compiler kernel method is now circulating on the Internet is based on a very low kernel version, in these versions, the compressed file to start initrd format, so those data are used to teach you generate initrd.img mkinit. In later versions of the kernel compile options, instead of the original with initramfs initrd, use mkinitrd command to generate initrd.img file format will naturally produce an error, it is necessary to generate initrd.img replaced mkinitrd command mkinitramfs command. initramfs kernel compilation options in the Options menu position (Linux-2.6.28) are:

General Setup

| --- [M] Initial RAM filesytem and RAM disk (initramfs / initrd) support

2, let the kernel recognize USB devices

To compile options the following options are selected:

        Device Drivers

        | -SCSI device support

  {M}     | -SCSI device support

        *** SCSI support type (disk, tape, CD-ROM) ***

      | -SCSI disk support

  [*] | -USB support

      | -Support for Host-side USB

        *** Miscellaneous USB options ***  

  [*]         | -USB device filesystem

  [*]         | -USB device class-devices (DEPRECATED)

        *** USB Host Controller Drivers ***

  [*]         | -EHCI HCD (USB 2.0) support

  [*]         | -OHCI HCD support

  [*]         | -UHCI HCD support

        *** NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may al

        *** see USB_STORAGE Help for more information ***

  [*]         | -USB Mass Storage support

3, let the kernel recognize SATA hard drive

  kernel configuration options into the menu mode, select the following content:

        Device Drivers

        | -SCSI device support

{M}   | -SCSI device support

        *** SCSI support type (disk, tape, CD-ROM) ***

  | -SCSI disk support

  Serial ATA (prod) and Parallel ATA (experimental) drivers

[*]   | -ATA ACPI Support

[*]   | -SATA Port Multiplier support

  | -AHCI SATA support

[M]   | -ATA SFF support  

- How to find out a Unix system library files are 32-bit or 64-bit (Linux)
- Customize own small private Linux system (Linux)
- CentOS 6.5 minimal installation and configuration VMware tools (Linux)
- Kickstart automated installation and deployment RHEL 7.0 (Linux)
- Oracle 11g manually create a database (Database)
- tcpdump Linux system security tools (Linux)
- Linux compression and decompression command (Linux)
- Ten to improve the efficiency of the Linux bash tricks (Linux)
- Installation Strongswan: on a Linux IPsec-based VPN tool (Linux)
- 10 really interesting Linux command (Linux)
- CentOS 7 server environment to quickly build Linux (Server)
- zBackup: A versatile tool to remove duplicate backup (Linux)
- Through Oracle to help restore MySQL data problems (Database)
- Nginx caching using the official guide (Server)
- How to modify the SQL Server auto-increment value and the corresponding solution (Database)
- Linux System Getting Started Tutorial: Installing Git on Linux (Linux)
- MySQL to NoSQL avatar (Database)
- General Linux interface server parameter tuning (Server)
- Configuring VMWare FreeBSD9.2 remote debugging kernel source code (Linux)
- A brief introduction to some important Docker commands (Server)
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.