Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system. |
Notices |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-07-2003, 02:43 PM
|
#1
|
LQ Newbie
Registered: Jan 2003
Posts: 7
Rep:
|
Getting in and out and in again in the CHROOT environment?
Hello,
I only have time to do my LFS during the evenings. I shut my computer down during the day when I am at work. Is there a proper way to go in and out of the CHROOT environment to continue building LFS?
Any suggestions appreciated. A step-by-step procedure would gladly be better. Thanks.
|
|
|
01-07-2003, 03:05 PM
|
#2
|
Moderator
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696
|
You can mount your / somewhere and chroot to it OR chroot on one console and have another to make all the changes.
|
|
|
01-07-2003, 08:15 PM
|
#3
|
LQ Newbie
Registered: Jan 2003
Posts: 7
Original Poster
Rep:
|
Re: CHROOT
Fine. So it's really as simple as mounting my workspace and CHROOT'ing into it. If that's all there is to it then it's all fine. What I was worried about was all that crap you had to type in the first time you CHROOT into it i.e.:
"CHROOT & LFS /static/bin/env -i ...yadiyadiyada.. and all the geekf*** whooya"
If I don't have to do that everytime I go in, then all is well I guess...
Appreciate your suggestion. I'll try that.
|
|
|
01-08-2003, 02:50 AM
|
#4
|
Senior Member
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316
Rep:
|
Well it depends on what stage of the book you are in. You will probably need the chroot command with all the extra's in it until you've finished building bash in the chroot environment. And you will probably also need to mount the proc filesystem everytime.
After you've built bash you could probably enter the chroot with an easier command. That is if you've set everything up already so your environment gets set up properly especially things like your PATH. It doesn't hurt to still chroot into it in the same way though so it might be the easiest if you create a simple scripts which might include things like:
mounting lfs partitions
setting $LFS
chroot into lfs
You will still need to mount the proc filesystem after that.
|
|
|
01-08-2003, 12:25 PM
|
#5
|
LQ Newbie
Registered: Jan 2003
Posts: 7
Original Poster
Rep:
|
Re: Chroot... (Mik)
Thanks Mik for a more detailed suggestion. I'm just curious about mounting the proc(?) filesystem or whatever, cause I am about almost done completing the static environment. I believe I have gone in and out about 3 to 4 times now with just mounting the lfs, exporting LFS=/mnt/lfs, then chrooting into it. But I never mount the proc filesystem as you suggest. I haven't had any problems so far! Just wondering what problems I may encounter ahead just because I forgot to do this? Could I have just wasted 10 hours of my life for nothing... 
|
|
|
01-08-2003, 01:52 PM
|
#6
|
Senior Member
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316
Rep:
|
Well I'm not sure exactly which programs need it. It's just it says in the LFS book "You have to make sure all the commands in the rest of this chapter and in the following chapters are run from within the chroot environment. If you ever leave this environment for any reason (rebooting for example), you must remember to again enter chroot and mount proc (discussed later) before continuing with the installations."
It doesn't mention in the book which programs need it. All it says it's needed for some programs to function properly.
Oh I just read your post again and you mentioned almost done with the static part. You only need the proc filesystem mounted in the chroot after the static part is completed (beginning of chapter 6). I guess I got confused because you where mentioning doing a chroot to the lfs partition which is only done after the static part is done.
Last edited by Mik; 01-08-2003 at 01:56 PM.
|
|
|
01-08-2003, 09:34 PM
|
#7
|
LQ Newbie
Registered: Jan 2003
Posts: 7
Original Poster
Rep:
|
Well, you know I may have made a mistake in saying I was still in the static environment cause I think I am done with that. I am already at the point where you CHROOT into the static env. and almost 3/4th of the way through. Sorry if I had a brain fart. So far no major problems and I followed your suggestion of mounting /proc at the half-way point. I'll let you know if it will have an adverse effect when I am done with it (i.e. not mounting proc the first 3 or 4 times). At any rate you have been a big help and I appreciate all your suggestions. Thanks much!
|
|
|
01-10-2003, 04:55 PM
|
#8
|
Member
Registered: Sep 2002
Location: lahore pakistan
Distribution: slackware,redhat, FreeBSD,openbsd
Posts: 219
Rep:
|
copy the text from lfs book .
and in gnome terminal paste it . 
|
|
|
01-13-2003, 12:20 AM
|
#9
|
LQ Newbie
Registered: Jan 2003
Posts: 7
Original Poster
Rep:
|
 I believe we can close this thread now. I have completed the base LFS4 without any problems so far. I am currently on the first parts of the BLFS book (firewall). No problems so far with my system. Thanks to Mik and all the others who gave suggestions in this thread. Chow, all !
|
|
|
All times are GMT -5. The time now is 04:46 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|