I have a 4 wire resistive touchscreen and a Raspberry Pi. Now I must install the driver but the kernel must be recompiled. I followed this tutorial on engineering-diy.blogspot.be, and I downloaded his kernel.

Now I have one problem - he said that I must replace the /lib folder on the SD card. But I don't have that folder on my Raspberry Pi. When I create this folder and replace the kernel and the lib folder, the Pi boots up and the GUI starts up. But then I cannot use my mouse or keyboard, and I cannot login with SSH.

Does anybody have a solution, or where I can find the /lib folder?

2 Answers 2


Sorry, Stijnb, but there is ABSOLUTELY AND COMPLETELY no possibility of a raspbian system working at all -- not even a little bit, not anything, no login, no init, nothing -- without the /lib folder. It is exactly as feasible as someone saying, "I was driving my car and someone said to look for the wheels, but I looked and there are no wheels!" If you got in the car and managed to drive it, IT HAS WHEELS. Period. End of story.

So you are somehow mistaken. Add the output of ls -l / to your post if possible.

I doubt very much any of the tutorial information you have read has instructed you to replace /lib, either. That would be (again, pure and simple) malicious, since the most basic and essential components of the system, beyond the kernel, are in /lib. There is no possible reason for replacing the whole directory. Most likely you were to add a directory for your new kernel to /lib/modules, or replace an existing one. If it is the latter, move the old folder to somewhere you can get it back from again (e.g., just rename it). The /lib/modules subdirectories contain kernel modules such as hardware drivers.

Whatever you've done, if you've removed stuff willy-nilly from /lib and now have serious problems, you're screwed (unless of course you have a previous backup) -- you might as well just start from scratch with a fresh image on the card.

  • On my SD card i have only kernel.img and some start files. But no other files or folders.
    – Stijnb
    Aug 24, 2013 at 19:12
  • There are two partitions. The first one is VFAT, very small, and contains kernel.img and a few other things. The second one is ext4 and much bigger. That is the actual root filesystem. HOWEVER, if you are looking at the card on a windows computer, you probably cannot see both partitions ;)
    – goldilocks
    Aug 24, 2013 at 19:15
  • I use mac os x. I need to put my sd card in some linux os
    – Stijnb
    Aug 24, 2013 at 19:32
  • That may be the easiest, although I think there are ways to mount ext4 on OSX. You could use a linux VM (virtual machine) inside a running OSX system -- how to do that is a separate question tho, and not appropriate for this forum. Search around about that (I am sure there are many tutorials) and if you have trouble, superuser exchange is probably the place to ask: superuser.com
    – goldilocks
    Aug 24, 2013 at 19:39
  • Okay i have a laptop with ubuntu. I will try it tomorrow thanks for the help.
    – Stijnb
    Aug 24, 2013 at 20:45

Although you already got a perfectly good answer, here I give a generic way to find your files and directories in the future.

On any Unix system (even Mac), finding anything is easy when you know how.

#> find / -name "lib" 

The slash "/" tells find where to start searching. It could be something like "/home" if you want to search only user accounts. If the search results are taking too much screen space, use the following:

#> find / -name "lib" | less

This makes the search results scrollable. The pipe sign "|" tells that the output of find should be processed by less. Press ESC to exit less.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.