Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Programming \ In Debian 4.3 compiler under Linux-2.6.28 kernel Summary     - Ubuntu Tutorial - Manually install Oracle Java JDK 8 (Linux)

- Use XtraBackup be physical standby database MySQL (Database)

- MySQL time field based partitioning scheme summary (Database)

- Oracle data row split multiple lines (Database)

- C ++ function object (Programming)

- Broadcom transplanted to OpenWrt summary (Programming)

- Java Concurrency -volatile keywords (Programming)

- How to Install Puppet in the Ubuntu 15.04 (Server)

- SQLite (Database)

- Oracle Linux 6.4 (BOND) dual NIC teaming combat - Annotated (Linux)

- Java is simple to read and write HDFS Demo (Programming)

- Create, modify, delete users, user groups under linux (Linux)

- Distributed Hadoop1.2.1 cluster installation (Server)

- Lazarus for Raspbian installation (Linux)

- CentOS install SystemTap-2.6 (Linux)

- Linux OOM killer mechanism (Linux)

- Install FFmpeg compiling from source in Mac OS X environment (Linux)

- C ++ input and output summary _ Input (Programming)

- How to update the ISPConfig 3 SSL Certificates (Server)

- Windows environment Android Studio v1.0 Installation Guide (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:

Linux-image-2.6.28_2.6.28-10.00.Custom_i386.deb

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

savedefault

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

savedefault

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

savedefault

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  

     
         
         
         
  More:      
 
- How to view the Linux graphics hardware information (Linux)
- Android annotation support (Support Annotations) (Programming)
- Upgrade to Linux Mint 16 petra Mint 17 Qiana (Linux)
- Boot-Repair Tool - repair of frequent start-up problems (Linux)
- Cooling solutions Ubuntu system (Linux)
- Defensive programming in PHP (Programming)
- CentOS 5.x install Lua 5.2.3 error (LIBS = -lncurses) (Linux)
- Ubuntu under VirtualBox virtual machine serial port settings (Linux)
- Lenovo E431 notebook CentOS system is installed wireless network card driver (Linux)
- Linux systems use IP masquerading anti-hacker (Linux)
- How to migrate MySQL to MariaDB under linux (Database)
- Httpclient4.4 of principle (Http execution context) (Programming)
- Snort build a secure Linux server (Linux)
- Linux formatted partition error Could not stat / dev / sda No such file or directory Solution (Linux)
- Install Apache streaming media services on CentOS 6.4 (Server)
- Docker Private Registry Installation Guide at CentOS6.X (Linux)
- CentOS 6.5 makes the LAN http source (Linux)
- CentOS install SVN server configuration and automatically synchronized to the Web directory (Server)
- How to update the Linux kernel to improve system performance (Linux)
- Linux commands with browsing and downloading files (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.