SlackwareThis Forum is for the discussion of Slackware Linux.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Following on from my thread about a boot problem with my notebook computer, which suddenly make's the screen go black while running through the boot messages, other LQ members suspected that it may be due to an unsupported graphics chip (the Intel GMA 3600) in the stock slackware 14 3.2x kernel.
It was suggested that if I use the huge kernel 3.5.4 config file from /testing, and built a kernel from that config file and source, the correct drivers are available to make my notebook work.
It was also suggested that I 'chroot' into the system to do this. But Im not sure how involved it is. I've read some things about chroot, but I dont seem to fully understand it or how it works.
I was hoping that LQ members might try to explain chroot, what it is, and at the end of it maybe some practical advice to allow me chroot into my system to allow me to build a new kernel (which I can do already) to try and resolve the boot problem.
(*EDIT* I should say that when I attempted to resolve this problem a few days ago, I wasnt very well at all, and it was late at night, but the enthusiasm to try Slack 14 on my notebook should have waited untill I was feeling better. My apologies for the previous thread, I do however feel better this morning to attempt to resolve this problem, so any help will be appreciated and acted on)
Last edited by clifford227; 10-01-2012 at 05:49 AM.
Chrooting basically means entering in a turned off system while you are running another active system. Very, very roughly speaking :-)
For successfully chrooting into a system (for example, when you have installed a system and want to chroot to it form a Live CD), you usually have to perform these steps:
#Mount the filesystem you want to chroot into.
mount /dev/whatever /mnt/wherever
#Mount critical stuff in the filesystem you want to chroot into.
#A system will usually work badly without these.
mount -o bind /sys /mnt/wherever/sys
mount -o bind /dev /mnt/wherever/dev
mount -o bind /proc /mnt/wherever/proc
#Chroot into the system.
This should give you a root shell in the turned off system.
Last edited by BlackRider; 10-01-2012 at 06:05 AM.
If you have to have access to the hardware or kernel interface from within the chrooted system you first need to make them accessible. For example, Grub will complain if you want to install it and doesn't have access to those directories.
But why do would you need to mount further directories, sys, dev and proc, when you have already mounted the filesystem as a whole?
TobISGD has mostly explained it. What is contained in sys, dev and proc is volatile ware, because it exist not in a turned off system. These folders contain kernel and hardware stuff that is generated by the kernel on boot and destroyed on shutdown, so an inactive system has not access to them.
That's why you provide the inactive system with "copies" of the stuff generated by your running system. Because the inactive system cannot generate everything by itself.
(...)It only mounts the root, to attach the filesystem and no directories below it, so you have to then attach further directories which are needed.
Yes, if you use a multi-partition system, you have to track and mount every stuff inside the root of the inactive system.
For example, if your / is in /dev/sda1 and your /home is in /dev/sda2, you would do something like:
mount /dev/sda1 /mnt/whatever
mount /dev/sda2 /mnt/whatever/home
and so on.
What is the correct label for '/mnt/wherever'?
That's irrelevant. Any existent directory will do. You can make a folder called "chroot", "orange", or "sdfsdf" and mount everything there if you want. It does not even have to be inside of /mnt (although the purpose or /mnt is precisely to mount this kind of things inside of it).
I chose the new kernel in the Lilo screen, and managed to get through all of the boot messages (although some of the new modules failed), I got to the login console, and logged in as root. Unfortunately when I did startx, in the fluxbox screen there is no keyboard or touchscreen input (although fluxbox time in bottom right is still working!)