Linux From ScratchThis 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.
Hello,
I am building LFS for the first time using the book and the Livecd 6.0
I finally got through installing glibc at chapter 6 after
a few tries and retries and now I have a problem at installing binutils in chapter 6.13.1
At the expect -c "spawn ls" command I get the error that is in the book "the system has no more ptys"
I looked at some of the posts here but I did not find a solution that I can apply to my case
The book says that the chroot environment is not set up for proper PTY operation.
Can someone expand on that to point me in the right direction.
Is it a certain part of the environment ?
Is there a way to check how many ptys the system needs or has ?
The worst case scenario is recompiling the host system's kernel which isn't too bad.
Cheers
***EDIT***
Hang on a sec you're using the live cd ... that's odd the live cd should be set up properly.
Well you cant recompile the live cd so if the "mknod" instructions don't work then you may want to try the latest version of the live cd (6.2 I believe)
Hello,
It seems a little bit confusing to me at the moment.
In the book at chapter 5.13.1 Re-innstallation of GCC when the expect command is used for the first time it says that if I get that message "the system has no more ptys" it says that the HOST does not have it's ptys set up properly.
I did not get that message at that time so I am assuming that the host has
enough ptys or it has the ptys set up properly
So now that I am running the expect command in the chroot environment
at chapter 6.13.1 and I get that message the book says that " the CHROOT environment is not set up for proper pty operation"
What does pty need for proper operation ?
Is there a way to look at the host to see how the pty is set up just for me to get an idea of what a proper pty should look like ?
So from that I am assuming that the host pty is ok or it's not even checking
it although there is no way to tell where it is looking for the ptys.
So I am just guessing here but that link is for the first use of expect
I mean if it was fixed once in chapter 5 why would it happen again or if
it happens now why would I need to fix the host ptys if it worked before ?
So it seems that it has something to do with the chroot environment and not the host I just don't know where or what to look for.
Hello,
Actually something did happen after entering the "mount --bind /dev $LFS/dev"
command.
I have a lot of ttys (about 63) and a bunch of other files none of which I had before
Is that normal ?
Also the ptmx was created which I did not have before.
"Well according to the instructions" Is this from 6.2 also ? I don't hav that in 6.0
I just want to make sure I understand your instructions.
So after entering chroot are those the only commands I should enter or are those in addition to what I am supposed to enter according to 6.0 ?
If this is in addition to the commands in 6.0 this may or may not be important but do I enter those commands before or after the
"mount -n -t ramfs none /dev" command ?
Because it tends to hide the mknod files if I enter it before.
Hello,
Well those last instructions seem to have worked.
I put in only those commands an tried it and it worked but if I add the rest of the commands it doesn't work again just as I suspected because everything is hidden by the "mount -n -t ramfs none /dev" command
So I am not sure if I need the rest of the commands from the book or maybe just a few.
"Well according to the instructions" Is this from 6.2 also
Sorry I guess my post was a bit ambiguous, to clarify, these were from the lfs FAQ, not the book, it's the link I gave when I first replied.
Quote:
Originally Posted by me
This assumes you have gone through all the necessary steps to enter the chroot environment, in particular fake mounting devpts
.
Again sorry, I could have been more specific.
There are certain commands to run EVERYTIME you want to enter the chroot environment.
This is direct from the 6.0 version:
Before chrooting:
Code:
mount -t proc proc $LFS/proc
mount -t sysfs sysfs $LFS/sys
mount -f -t ramfs ramfs $LFS/dev
mount -f -t tmpfs tmpfs $LFS/dev/shm
mount -f -t devpts -o gid=4,mode=620 devpts $LFS/dev/pts (This is the fake mounting of devpts)
After chrooting go through 6.8.1 and 6.8.2 again to populate dev properly
Quote:
If this is in addition to the commands in 6.0 this may or may not be important but do I enter those commands before or after the
"mount -n -t ramfs none /dev" command ?
You would want to do it after that (after doing section 6.8.2 in fact)
Hello,
Yes it was clear up to the point of entering chroot . I do those EVERYTIME
It's at 6.8.1 and 6.8.2 that I wanted to make sure I put it in the right order
So I understand that I would have to enter those commands EVERYTIME also ?
"(after doing section 6.8.2 in fact)"
Ammm... I already have a "mount -t devpts -o gid=4,mode=620 none /dev/pts"
as part of 6.8.2.
Should I just skip over that line and place it at the end ?
I imagine I would have to skip over "mkdir /dev/pts" also .
1. In original Linux system, log on as root,and check the mount list. for example:
Code:
[root@lfstest local]# mount
/dev/hda1 on / type ext3 (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
none on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/hda3 on /mnt/lfs type ext3 (rw)
Obviously, no directory on $LFS(which is /mnt/lfs in my system) has been mounted. Now you should to double check if all virtual kernel file system on $LFS have been mounted. If not,
Code:
mount -v --bind /dev $LFS/dev
mount -vt devpts devpts $LFS/dev/pts
mount -vt tmpfs shm $LFS/dev/shm
mount -vt proc proc $LFS/proc
mount -vt sysfs sysfs $LFS/sys
Now, check again:
Code:
[root@lfstest local]# mount
/dev/hda1 on / type ext3 (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
none on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/hda3 on /mnt/lfs type ext3 (rw)
/dev on /mnt/lfs/dev type none (rw,bind)
devpts on /mnt/lfs/dev/pts type devpts (rw)
shm on /mnt/lfs/dev/shm type tmpfs (rw)
proc on /mnt/lfs/proc type proc (rw)
sysfs on /mnt/lfs/sys type sysfs (rw)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.