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.
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.
I do believe you mean "why are binutils and gcc compiled three times...." (twice in chapter 5 and once in chapter 6)
What is unclear about what is said about it in the LFS documentations (especially in chapter 1.1)?
Both are compiled twice in chapter 5 because the toolchain changed (chapter 5.8) and both need to be (re)compiled against this newly created toolchain.
In chapter 6 of lfs-6.5 every time we have to mount file systems onto respective directories in /mnt/lfs.. So I created a shell script to cut off this overhead as follow...
Code:
#!/bin/sh
`sudo mount -t ext3 /dev/sda5 /mnt/lfs`
`sudo mount -v --bind /dev $LFS/dev`
`sudo mount -vt devpts devpts $LFS/dev/pts`
`sudo mount -vt tmpfs shm $LFS/dev/shm`
`sudo mount -vt proc proc $LFS/proc`
`sudo mount -vt sysfs sysfs $LFS/sys`
`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`
This gives upon execution as foolow...
Code:
./lfs_com.sh: 4: /dev: Permission denied
./lfs_com.sh: 5: devpts: not found
./lfs_com.sh: 6: shm: not found
Can someone help me in solving this small problem.. please
Why the use of sudo, you need to do this from a "real" root account?
Become root first and then type/parse these commands. If you want to use a script to do this, parse it instead of executing it. I.e:
file contains:
mount -t ext3 /dev/sda5 /mnt/lfs
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
Parse it using: . filename (that is a dot followed by a space)
Now I am going through the bootscripts chapter that is chapter 7 in lfs-6.5... In the previous chapters everything is given in the book.. You have to just follow the instructions and go ahead.. Understand the commands , copy , paste and execute Thats all..
But I am not getting the approach of how to set up the bootscripts by making their config files.. Do I need to check out my system configurations and go ahead accordingly.. If yes than how to cope up all this..
- 7.2 - Like before, just unpack source and install using make install,
- 7.3 - Informational, explains the bootscript process,
- 7.4 - Setclock. Only thing you need to know is the UTC setting (0 if bios shows localtime, can always be changed afterwards),
- 7.5 - Console/Locale settings. Settings depend on your location, the examples should get you going. If you do not set this up, nothing will break but you will loose some special character support (euro sign for example),
- 7.6 - Sysklogd. You can do this at a later point after reading the sysklogd man page. The defaults are probably ok for you,
- 7.7 - Inputrc. Just copy and paste. Fine-tuning, if at all needed, can be done at a later stage,
- 7.8 - Bash Shell Startup (Locale). See remark for 7.5,
- 7.9 - Device and Module Handling. Informational, do read!
- 7.10 - Creating Custom Symlinks to Devices. Do read, could be of interest but you probably don't need to do anything (could be done at a later stage if needed),
- 7.11 - Configuring the localnet. replace <lfs> with the name of your host,
- 7.12 - Customizing the /etc/hosts. Follow the correct steps, only 2 possibilities 1) you have a network card, 2) you don't,
- 7.13 - Configuring the network. You only need to do this if you have a network card. A lot of info is given and asked, most of it is explained in the text. This can also be done at a later stage.
Most steps are probably doable without to much problems. 7.13 might be the exception, if you face any problems there we tackle them when you get there
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.