LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
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


Reply
  Search this Thread
Old 10-04-2015, 05:53 AM   #1
Sarthak
LQ Newbie
 
Registered: Sep 2015
Posts: 25

Rep: Reputation: Disabled
about /tools symlink


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.
 
Old 10-04-2015, 07:30 AM   #2
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,152

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
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
 
Old 10-04-2015, 09:14 AM   #3
Sarthak
LQ Newbie
 
Registered: Sep 2015
Posts: 25

Original Poster
Rep: Reputation: Disabled
Then what is the use of that partition we made in starting of the LFS
 
Old 10-04-2015, 09:39 AM   #4
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,152

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
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.
 
Old 10-04-2015, 11:30 AM   #5
Sarthak
LQ Newbie
 
Registered: Sep 2015
Posts: 25

Original Poster
Rep: Reputation: Disabled
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 ?
 
Old 10-04-2015, 01:18 PM   #6
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,152

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
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.
 
Old 10-05-2015, 12:48 AM   #7
basica
Member
 
Registered: Nov 2011
Location: Australia
Distribution: Arch, LFS
Posts: 171

Rep: Reputation: 38
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.
 
Old 10-05-2015, 04:49 AM   #8
EmaRsk
Member
 
Registered: Mar 2006
Distribution: Mint, WSL Ubuntu
Posts: 134

Rep: Reputation: 32
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.
 
Old 10-05-2015, 08:23 AM   #9
Sarthak
LQ Newbie
 
Registered: Sep 2015
Posts: 25

Original Poster
Rep: Reputation: Disabled
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
 
Old 10-05-2015, 09:00 AM   #10
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,152

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Quote:
Originally Posted by Sarthak View Post
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.
 
Old 10-05-2015, 06:11 PM   #11
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 628

Rep: Reputation: 185Reputation: 185
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.

Last edited by stoat; 10-05-2015 at 07:04 PM.
 
Old 10-06-2015, 01:54 AM   #12
Sarthak
LQ Newbie
 
Registered: Sep 2015
Posts: 25

Original Poster
Rep: Reputation: Disabled
thank you stoat for understanding the exact problem.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[ANNOUNCE] - V-tools, a set of unix/linux command line tools veerain Linux - Software 6 05-18-2015 08:22 AM
[SOLVED] symlink to symlink confusion, Reprovo Linux - Newbie 2 11-18-2014 02:17 PM
Question How to get stat() of symlink and not of target of symlink ? ronbarak Programming 3 11-08-2010 12:14 PM
module-init-tools, initramfs-tools broken virgilhowardson Debian 1 03-08-2009 12:30 AM
cannot symlink /tools tyccea Linux From Scratch 5 08-18-2004 10:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 12:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration