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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
12-13-2012, 08:15 AM
|
#1
|
|
Member
Registered: Dec 2012
Location: Lahore,Pakistan
Distribution: Ubuntu 12.10
Posts: 35
Rep: 
|
LFS 7.2 Chapter 6.4 Chroot Environment Error
raza@raza-Inspiron-1564:~$ chroot "$LFS" /tools/bin/env -i \
> HOME=/root \
> TERM="$TERM" \
> PS1='\u:\w\$ ' \
> PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
> /tools/bin/bash --login +h
chroot: cannot change root directory to : No such file or directory
|
|
|
|
12-13-2012, 08:20 AM
|
#2
|
|
LQ Veteran
Registered: Sep 2003
Location: the Netherlands
Distribution: lfs, debian, rhel
Posts: 8,703
|
Quote:
|
Originally Posted by raza.ajmi
raza@raza-Inspiron-1564:~$ chroot "$LFS" /tools/bin/env -i \
.
.
|
From the LFS 7.2 book, chapter 6.4 :
Quote:
|
It is time to enter the chroot environment to begin building and installing the final LFS system. As user root, run the following command to enter the realm that is, at the moment, populated with only the temporary tools:
|
|
|
|
1 members found this post helpful.
|
12-13-2012, 08:54 AM
|
#3
|
|
Member
Registered: Dec 2012
Location: Lahore,Pakistan
Distribution: Ubuntu 12.10
Posts: 35
Original Poster
Rep: 
|
ok thanks
can you tell me the proper way to switch root user in Ubuntu ??
|
|
|
|
12-13-2012, 09:00 AM
|
#4
|
|
Member
Registered: Jun 2010
Location: Devon,UK
Distribution: Linux From Scratch, Slackware64,
Posts: 537
Rep: 
|
In ubuntu the root account is disabled by default so you have to use 'sudo' ie
Code:
sudo chroot "$LFS" /tools/bin/env -i \
.
.
|
|
|
|
12-13-2012, 09:10 AM
|
#5
|
|
LQ Veteran
Registered: Sep 2003
Location: the Netherlands
Distribution: lfs, debian, rhel
Posts: 8,703
|
I'm not 100% sure if sudo is the way to go. The root environment might not be fully set.
You can enable full root access in the following way: Now root has a password and you can do the following to get full root access:
|
|
|
1 members found this post helpful.
|
12-13-2012, 09:10 AM
|
#6
|
|
Member
Registered: Dec 2012
Location: Lahore,Pakistan
Distribution: Ubuntu 12.10
Posts: 35
Original Poster
Rep: 
|
i used the sudo but the error is same 
|
|
|
|
12-13-2012, 09:12 AM
|
#7
|
|
LQ Veteran
Registered: Sep 2003
Location: the Netherlands
Distribution: lfs, debian, rhel
Posts: 8,703
|
Quote:
Originally Posted by raza.ajmi
i used the sudo but the error is same 
|
See post #5
You might also want to have a look at this (as reference!!) : LFS 7.1 on Ubuntu 12.04
|
|
|
1 members found this post helpful.
|
12-13-2012, 09:18 AM
|
#8
|
|
Member
Registered: Dec 2012
Location: Lahore,Pakistan
Distribution: Ubuntu 12.10
Posts: 35
Original Poster
Rep: 
|
thanks druuna i got the access to root but problem is still problem
root@raza-Inspiron-1564:~# sudo chroot "$LFS" /tools/bin/env -i \
> HOME=/root \
> TERM="$TERM" \
> PS1='\u:\w\$ ' \
> PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
> /tools/bin/bash --login +h
chroot: cannot change root directory to : No such file or directory
now
|
|
|
|
12-13-2012, 09:23 AM
|
#9
|
|
LQ Veteran
Registered: Sep 2003
Location: the Netherlands
Distribution: lfs, debian, rhel
Posts: 8,703
|
Quote:
Originally Posted by raza.ajmi
thanks druuna i got the access to root but problem is still problem
root@raza-Inspiron-1564:~# sudo chroot "$LFS" /tools/bin/env -i \
> HOME=/root \
> TERM="$TERM" \
> PS1='\u:\w\$ ' \
> PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
> /tools/bin/bash --login +h
chroot: cannot change root directory to : No such file or directory
now
|
Do not use sudo, use su - to become root and then follow the book to the letter.
|
|
|
1 members found this post helpful.
|
12-13-2012, 09:27 AM
|
#10
|
|
Member
Registered: Dec 2012
Location: Lahore,Pakistan
Distribution: Ubuntu 12.10
Posts: 35
Original Poster
Rep: 
|
i tried without sudo but same situation 
|
|
|
|
12-13-2012, 09:51 AM
|
#11
|
|
LQ Veteran
Registered: Sep 2003
Location: the Netherlands
Distribution: lfs, debian, rhel
Posts: 8,703
|
What is the output of the following command (as root) I'm guessing it is empty, and it should print /mnt/lfs (or whatever you decided to use). This was told right here (the moment you started using root to execute commands): 5.34. Changing Ownership
Quote:
|
Also, double check that $LFS is set in root's environment.
|
Please read the book more carefully.
|
|
|
1 members found this post helpful.
|
12-14-2012, 01:34 AM
|
#12
|
|
Member
Registered: Dec 2012
Location: Lahore,Pakistan
Distribution: Ubuntu 12.10
Posts: 35
Original Poster
Rep: 
|
this is shit how can i forget this :@
thank you very much for help 
Last edited by raza.ajmi; 12-14-2012 at 01:35 AM.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 11:22 PM.
|
|
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
|
|