Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Compile and install Ubuntu Linux 4.0.5 kernel, network and fix vmware kernel module compilation error     - Oracle PL / SQL selective basis (IF CASE), (LOOP WHILE FOR) (Database)

- Android screen rotation processing and ProgressDialog the best AsyncTask (Programming)

- ntop monitoring software configuration and installation (Linux)

- Linux process group, session daemon (Linux)

- Applications Linux leap second problem caused (Linux)

- Linux Network Programming --TCP and UDP datagram type Explanation (Programming)

- Oracle Incident Packaging Service (Database)

- Hadoop safe hftp (Server)

- Httpclient4.4 of principle (Http execution context) (Programming)

- How to use GRUB2 files directly from the hard disk to run ISO (Linux)

- Linux group account deletion, and other related operations (Linux)

- mysql_config_editor encryption and decryption of the new features of MySQL realization (Database)

- Install VMware Tools in Debian (Linux)

- Read and write files efficiently from Apache Kafka (Server)

- You may not know the Linux command-line network monitoring tool (Linux)

- How to install Zephyr Test Management Tools on CentOS 7.x (Server)

- Introduction to thread pooling and simple implementation (Programming)

- Linux platform to prevent hackers to share practical skills (Linux)

- C # asynchronous delegates (Programming)

- MySQL In can not be overridden with an internal connection (Database)

 
         
  Compile and install Ubuntu Linux 4.0.5 kernel, network and fix vmware kernel module compilation error
     
  Add Date : 2018-11-21      
         
         
         
  Today, the Ubuntu 14.04 upgrade to the latest kernel version 4.0.5, did not intend to record, but the upgrade process did encounter some problems, so it is still recorded, to share the same problems encountered ape friends.

Go to the official website to download the latest kernel tarball: https: //www.kernel.org/

Speed is not to force, only with a virtual machine in the Thunder download, and then copy it.

LZ copy the tarball to / usr / src the following, where the compiler directly installed:

# Switch to root identity
> $ Su
# Unzip source, give the folder /usr/src/linux-4.0.5
> # Tar xvf linux-4.0.5.tar.xz
> # Cd linux-4.0.5
# Make mrproper command to clean up temporary files left compile time ago,
# Because LZ decompression is a new package, so this step is not required
> # Make mrproper
# The kernel configuration file is currently being used as a template for cleaning up
> # Cp / boot / config-`uname -r` .config
# Start drawn graphics library based ncurse configuration interface has been selected in accordance with the relevant options currently being used kernel configuration, and then enable some new features to
> # Make menuconfig
# Normal is to be performed following these three commands, but not too much trouble on Ubuntu
> # Make install
> # Make modules
> # Make modules_install
On # Ubuntu package manager can use the kernel and related modules compiled into a deb package, which under the familiar Ubuntu shoes feel much easier, right?
# If there is no make-kpkg command prompt, you can first use apt-get install
> # Apt-get install kernel-package
#> Make-kpkg clean
# Command and make the same, j8 parameters can be specified 8 threads simultaneously compile
#> Make-kpkg --initrd kernel-image kernel-headers -j8
# Wait compiled it, generates two deb packages in a directory, then install them:
> # Dpkg -i linux-image-4.0.5_4.0.5-10.00.Custom_amd64.deb
> # Dpkg -i linux-headers-4.0.5_4.0.5-10.00.Custom_amd64.deb
# Grub seemingly no update can also be installed when deb automatically updated
> # Update-grub
# Reboot the system, right into the new kernel
> # Reboot

Compile, install, reboot is going smoothly, but found vmware start in the new kernel must be updated kernel module when prompted, but life and death make life difficult for the network module at compile time, LZ guess some may be due to the kernel interface is modified, and vmware driver source code do not follow the latest kernel interfaces do not match, it was reported that a number of grammatical errors, no way, can only be changed manually.

Start vmware in the shell, let it compile and install the module, after compiling failure will leave fails to compile error message in the shell, modify the code along tips.

> $ Vmware
/tmp/modconfig-WpjYEn/vmnet-only/userif.c: In function 'VNetCopyDatagram':
/tmp/modconfig-WpjYEn/vmnet-only/userif.c:526:4: error: implicit declaration of function 'skb_copy_datagram_iovec' [-Werror = implicit-function-declaration]
    return skb_copy_datagram_iovec (skb, 0, & iov, len);
    ^
/tmp/modconfig-WpjYEn/vmnet-only/driver.c: In function 'VNetFileOpUnlockedIoctl':
/tmp/modconfig-WpjYEn/vmnet-only/driver.c:1194:20: error: 'struct file' has no member named 'f_dentry'
    if (filp && filp-> f_dentry) {
                    ^
/tmp/modconfig-WpjYEn/vmnet-only/driver.c:1195:19: error: 'struct file' has no member named 'f_dentry'
      inode = filp-> f_dentry-> d_inode;
... Omitted a thousand lines here

Error It is clear that userif.c 526 rows and rows driver.c 1194, 1195 line problem.

But the newspaper out of the file path, but how could not find, and each time the compiler, the error path is changing, it should compile time now unpacked, while the compiler automatically deleted, so you need to find the two sources document archive where the job.

After some Google after finally found the location where the source package, then you can modify.

# Switch to root identity
> $ Su
# Enter the source directory
> # Cd / usr / lib / vmware / modules / source /
# Network-related untied source package, pay attention to just tar package, not compressed, so do not add -z parameter unpack
> # Tar xvf vmnet.tar
# Get vmnet-only / folder after unpacking, enter
> # Cd vmnet-only /
# One by one pack
> # Vim userif.c +526
// Replace the phrase directly following a period of return skb_copy_datagram_iovec (skb, 0, & iov, len);
#if LINUX_VERSION_CODE   return skb_copy_datagram_iovec (skb, 0, & iov, len);
#else
  struct iov_iter to;
  iov_iter_init (& to, READ, & iov, 1, len);
  return skb_copy_datagram_iter (skb, 0, & to, len);
#endif

> # Vim driver.c +1194

// Comment out directly to the original code, using file_inode () function to get the inode
#if 0
  if (filp && filp-> f_dentry) {
      inode = filp-> f_dentry-> d_inode;
  }
#endif
  inode = file_inode (filp);

Backup Source Package #
> # Mv vmnet.tar vmnet_bak.tar
# Repackaging
> #tar Cf vmnet.tar vmnet-only
# Run it again vmware, found that the compiler passed, oh yeah
> $ Vmware
# Cleanup
> # Rm -rf vmnet-only / vmnet_bak.tar
> # Exit
> $

This problem is solved this way. .

First discovered that Ubuntu actually install the kernel into the kernel can be packaged in the form of deb. .

To continue to experience the new kernel, and feeling stable again uninstall the original kernel.

In fact, uninstall is very simple:

# First check what kernel installed
> $ Sudo dpkg --get-selections | grep linux
# See the kernel currently in use, do not use the kernel is to uninstall
> $ Uname -r
# Uninstall the old kernels
> $ Sudo apt-get purge linux-image-3.13.0-24-generic
# See the old kernel is not gone
> $ Sudo dpkg --get-selections | grep linux
# Update the grub menu
> $ Sudo update-grub
     
         
         
         
  More:      
 
- Unable to start the network after restart clone a virtual machine (Linux)
- Linux Defensive / mitigate DDOS attacks (Linux)
- Linux into single user mode to modify the administrator password (Linux)
- Linux system font color change (Linux)
- Spring Data study notes -Helloworld (Programming)
- Ubuntu 15.04 installed Nvidia Quadro series graphics driver (Linux)
- Linux Systemd-- To start / stop / restart services in RHEL / CentOS 7 (Linux)
- Nginx Load Balancing (standby) + Keepalived (Server)
- CentOS 6.4 installation and configuration LNMP build PHP server runtime environment (Server)
- Java inner classes (Programming)
- Installation and Configuration ISC DHCP server on Debian Linux (Server)
- Thinking in Java study notes - Generics (Programming)
- Using BBED repair ORA-01190 error (Database)
- Detailed LVM2 (Linux)
- Linux loopback adapter Driven Design (Programming)
- Linux Timing task Crontab command Detailed (Linux)
- Memcache explain in detail (Server)
- Access.log Apache access log analysis and how to import it into MySQL (Server)
- Open Ubuntu system updates (Linux)
- C language function pointer and a callback function (Programming)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.