Rmmod: chdir (/lib/modules): no such file or directory solution

Source: Internet
Author: User

 

 

 

 

 

You must create an empty directory such as/lib/modules/2.6.30.4. Otherwise, you Cannot uninstall the Ko module.
# Rmmod nls_cp936
Rmmod: chdir (/lib/modules): no such file or directory
However, you can uninstall nls_cp936, but there will always be a prompt:
Rmmod: module 'nls _ cp936 'not found

 

 

 

 

initial findings , Originally, this was compiled kernel make modules_install A generated directory ,

however, it was tested that rmmod: module 'nls _ cp936 'not found comes from busybox, not from kernel.

1. Create an empty/lib/modules/2.6.30 directory.

2. Use the following source code to generate the rmmod command. You can unmount the Ko module without any prompts. [Luther. gliethttp]

# Include <stdio. h>

# Include <stdlib. h>

# Include <unistd. h>

# Include <fcntl. h>

# Include <string. h>

# Include <errno. h>

Int main (INT argc, char * argv [])

{

Const char * modname = argv [1];

Int ret =-1;

Int maxtry = 10;

While (maxtry --> 0 ){

Ret = delete_module (modname, o_nonblock | o_excl); // The system calls sys_delete_module.

If (Ret <0 & errno = eagain)

Usleep (500000 );

Else

Break;

}

If (Ret! = 0)

Printf ("unable to unload driver module \" % s \ ": % s \ n ",

Modname, strerror (errno ));

}

 

3. Copy the generated command to the file system

# Arm-Linux-gcc-static-O rmmod. c

# Arm-Linux-strip-s rmmod

# Cp rmmod/nfs/

CP/nfs/rmmod/sbin

 

This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/qiaoliang328/archive/2010/01/15/5191821.aspx

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.