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 have made the /tools directory as said in the book using
Code:
mkdir -v $LFS/tools
and the $LFS is set to /mnt/lfs. Directory is created successfully. After that i have to make symlink of the /tools directory directory by using
Code:
ln -sv $LFS/tools /
. I want to ask that in starting we make a separate partition for LFS (named sd8 in my case) so this symlink have to be in sda8 ? if yes, then when i performed the symlink command the symlink is made in my host / partition, why? and now how to fix it.
please help.
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,152
Rep:
the symlink is in / and points to $LFS/tools this is only needed for building the tool chain and can/should be removed after the tool chain has been completed
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,152
Rep:
the partition is where you will build your lfs system the tools folder which is where the symlink points to is where you will build the tempory tool chain.
I have done upto chapter 5 of LFS7.7 . I think upto now there is no use of that partition as every thing done is in the source and tools directory which are under /mnt/lfs. My new partition has to be empty till now na ?
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,152
Rep:
NO!
Your /mnt/lfs directory holds tools and when you builkd the proper LFS system it wil hold the entire file system, please ggo back and read the book from scratch.
As Keith mentioned, reread the book to understand what the symlink does and if you are worried about harming your host system, better switch to a VM instead.
Sarthak, the LFS partition is supposed to be mounted at /mnt/lfs (or whatever $LFS is for you), as explained in the book.
Your entire LFS system is built in that partition (because it's supposed that you will want to boot from it when it's finished).
As to why the /tools link is needed, the explanation is in the book, right below the command to create the link.
EmaRsk
i want to ask that when we make a new partition as said in the book the $LFS variable is set to that partition or the /mnt/lfs of the host system
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,152
Rep:
Quote:
Originally Posted by Sarthak
EmaRsk
i want to ask that when we make a new partition as said in the book the $LFS variable is set to that partition or the /mnt/lfs of the host system
The partition number is irelevent the LFS variable poinmts to the mount point of where the partition is mounted, eg if ( in your case /dev/sda8 ) is mounted at /mnt/lfs then the LFS vairable is "/mnt/lfs" , if you mount /dev/sda8 to /opt/mnt/mypartition then the LFS variable should be set to "/opt/mnt/mypartition"
Please read the previous answers and read the book that explains all this, and I also think you need to study some basic linux stuff, like mount points,partitions,bash variables etc, do the basic stuff first and the more complex stuff comes later.
So far here I don't think there's any proof that anything is wrong. Here are some things you can do at this point to find out.
1. When not mounted to anything, the /mnt/lfs directory (aka mount point) in the host system should be completely empty.
Code:
$ sudo umount /mnt/lfs
$ ls /mnt/lfs
$ _
2. When the /dev/sda8 partition is mounted on /mnt/lfs, then /mnt/lfs should contain the /sources and /tools directories.
Code:
$ sudo mount /dev/sda8 /mnt/lfs
$ ls /mnt/lfs
sources tools
If that stuff was proper, then nothing is wrong IMO. You might just be slightly confused about partitions and mount points. I would proceed.
Any other result will mean something went wrong somewhere. Back up and start again would be my recommendation. If /mnt/lfs had contents while it was not mounted, then either clean it out or recreate it.
P.S.: Regarding that tools symlink, you should see it listed ( with ls / ) in the root directory of your host system. Listing it ( with ls /tools) will show the contents (if any at this point) of /mnt/lfs/tools. That's all there is to that.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.