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.
|
 |
05-31-2005, 01:07 PM
|
#1
|
Member
Registered: Mar 2005
Distribution: slackware, LFS
Posts: 204
Rep:
|
can't chroot back into LFS after install
I want to chroot back in to LFS from slackware 10, and install BLFS software. (via cutting and pasting code instead of manually typing it to be error free.)
When I do:
Code:
chroot "$LFS" /usr/bin/env -i \
HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
PATH=/bin:/usr/bin:/sbin:/usr/sbin \
/bin/bash --login
it says:"chroot: cannot change root directory to : No such file or directory"
Does anyone know what to do?
Or, know of another way to install BLFS software error free?
|
|
|
05-31-2005, 01:10 PM
|
#2
|
Senior Member
Registered: Nov 2002
Location: British Columbia, Canada
Distribution: Gentoo x86_64; FreeBSD; OS X
Posts: 3,764
Rep:
|
Looks to me like your $LFS variable is set to "" ie: it has no value.
Try "LFS=/path/to/lfs" and try your chroot command again...
|
|
|
05-31-2005, 06:28 PM
|
#3
|
Member
Registered: Mar 2005
Distribution: slackware, LFS
Posts: 204
Original Poster
Rep:
|
Thanks, I understand the error now I think that means I can do:
Code:
export LFS=/mnt/lfs
to fix the problem like in " LFS, Chapter 4. Final Preparations".
And then mount it, right?
|
|
|
05-31-2005, 06:31 PM
|
#4
|
Member
Registered: Jul 2004
Distribution: LFS, I felt the itch and scratched it
Posts: 227
Rep:
|
Quote:
Originally posted by shotokan
Thanks, I understand the error now I think that means I can do:
Code:
export LFS=/mnt/lfs
to fix the problem like in "LFS, Chapter 4. Final Preparations".
And then mount it, right?
|
That's correct.
|
|
|
05-31-2005, 08:41 PM
|
#5
|
Member
Registered: Mar 2005
Distribution: slackware, LFS
Posts: 204
Original Poster
Rep:
|
Ok, I looked the book over again and I think these are the commands I'm going to need to do to have every thing working as if I booted in LFS.
Code:
export LFS=/mnt/lfs
mount /dev/[xxx] $LFS
mount -t proc proc $LFS/proc
mount -t sysfs sysfs $LFS/sys
chroot "$LFS" /usr/bin/env -i \
HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
PATH=/bin:/usr/bin:/sbin:/usr/sbin \
/bin/bash --login
login then:
Code:
/tools/sbin/udevstart
ln -s /proc/self/fd /dev/fd
ln -s /proc/self/fd/0 /dev/stdin
ln -s /proc/self/fd/1 /dev/stdout
ln -s /proc/self/fd/2 /dev/stderr
ln -s /proc/kcore /dev/core
mkdir /dev/pts
mkdir /dev/shm
mount -n -t ramfs none /dev
mount -t devpts -o gid=4,mode=620 none /dev/pts
mount -t tmpfs none /dev/shm
Is all this neccesary?
|
|
|
06-01-2005, 12:56 AM
|
#6
|
Member
Registered: Apr 2005
Location: Finland
Posts: 196
Rep:
|
Yes, it is necessary, but there is a shell script in the udev source tarball that does the udev setup for you. Find a file named start_udev and install it to $LFS/sbin. Then you can run that script instead of the commands listed after chroot.
|
|
|
06-01-2005, 10:53 AM
|
#7
|
Member
Registered: Mar 2005
Distribution: slackware, LFS
Posts: 204
Original Poster
Rep:
|
Thanks, all I do is copy it to sbin right? (to install it)
Also, will it cause problems when actually booting LFS at startup? (Will it conflict with the bootscripts?)
|
|
|
06-01-2005, 11:40 AM
|
#8
|
Member
Registered: Apr 2005
Location: Finland
Posts: 196
Rep:
|
Quote:
Thanks, all I do is copy it to sbin right? (to install it)
|
Copy and set ownership and permissions.
Quote:
Also, will it cause problems when actually booting LFS at startup? (Will it conflict with the bootscripts?)
|
It shouldn't cause any problems. In fact you don't need it anymore when your system is bootable, so you can remove it then.
|
|
|
06-01-2005, 03:09 PM
|
#9
|
Member
Registered: Mar 2005
Distribution: slackware, LFS
Posts: 204
Original Poster
Rep:
|
Quote:
It shouldn't cause any problems. In fact you don't need it anymore when your system is bootable, so you can remove it then.
|
It's already bootable.
This is to make it so I can use Slackware 10 to do things my LFS can't currently do namely copy, and paste code. (to install blfs programs)
Also, does the start_udev script use udevstart like S10udev does? (as mentioned in "Linux From Scratch - Version 6.0 Chapter 7. Setting Up System Bootscripts")
If not, should I use S10udev, and if so where do I find it in LFS?
(assuming it's installed like the book says)
|
|
|
All times are GMT -5. The time now is 07:55 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
|
|