Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Programming \ In Debian 4.3 compiler under Linux-2.6.28 kernel Summary     - LinSSID: a graphical Wi-Fi scanner under Linux (Linux)

- Use Oracle Data Guard to complete cross-platform database migration cases (Database)

- Notebook computer forget password solution (Linux)

- gzip, bzip2, xz, tar, zip compression, archive Detailed (Linux)

- Try debugfs restore the deleted files ext3 file system (Linux)

- Boost-- time and date - (1) timer library introduction (Programming)

- Linux system commands to view hardware information (Linux)

- Eclipse 3.7.2 can not start solving under Ubuntu 14.04 (Linux)

- Oracle to read and modify the data block process (Database)

- Linux, modify the fstab file system can not start causing solve one case (Linux)

- Use the top command (Linux)

- Ubuntu 14.04 VirtualBox can not start solution (Linux)

- C ++ Supplements - Virtual Function Principle (Programming)

- Ten best plug surge Emacs Productivity (Linux)

- MySQL full-index scan bug (Database)

- Android imageView in the Src and Background (Programming)

- Openfire Hazelcast cluster Detailed (Server)

- Automatic batch resolve dependencies problem locally installed rpm package (Linux)

- Spring Data MongoDB combat (Database)

- Linux system installation Gitlab (Server)

 
         
  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:      
 
- CentOS 7 Configure logging (VirtualBox) (Linux)
- Linux regex awk Comments (Linux)
- MySQL DATE_FORMAT () function (Database)
- Linux Network Programming - raw socket can do (Programming)
- CentOS 6.4 dial-up Raiders (Linux)
- RHEL 5.7 Yum configure local source [Errno 2] No such file or directory (Linux)
- Upgrading Oracle 11.2.0.1.0 to 11.2.0.3.0 (Database)
- KVM QEMU virtual machine installation configuration under CentOS (Linux)
- Teach you how to protect the Linux operating system security tips (Linux)
- Use Linux firewall camouflage defense hacked (Linux)
- Linux file permissions bit forced bits and adventure Comments (Linux)
- Let CentOS perform PPPoE dial-up, ADSL can be used in a network environment! (Linux)
- Go performed using iOS and Android programming (Programming)
- Linux kernel modules related to the management Comments (Linux)
- Python context managers (Programming)
- Oracle Standby Redo Log experiment (Database)
- Ubuntu 14.10 install KDE Plasma 5.2 (Linux)
- Java filter (Programming)
- CentOS 6.4 Telecom ADSL dial-up network configuration (Linux)
- How to install the Linux text editor Atom 0.124.0 (Linux)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.