Discussion:
[lfs-support] Problems in "4.2. Creating the $LFS/tools Directory"
miguel caldas
2018-03-02 10:56:14 UTC
Permalink
Hi,

When I trieed to create the tools symlink this way:

ln -sv $LFS/tools /

I always got a error message telling that "ln: failed to create symbolic link '/tools': File exists".
The only way I found to circumvent this was to give the create symlink command in the following way:
ln -sv $LFS/tools/ "link_name"
where "link_name" was something I created
My question is this, will this symlink creation format impact future steps of LFS? Can I leave as it is or must I create it exactly as it is on the book?

Thanks for all the help
Bruce Dubbs
2018-03-02 16:19:43 UTC
Permalink
Post by miguel caldas
Hi,
ln -sv $LFS/tools /
I always got a error message telling that "ln: failed to create symbolic
link '/tools': File exists".
That's because /tools exists. You probably ran the previous command
(mkdir -v $LFS/tools) as root without the variable LFS defined for the
root user.

See the caution on page 2.6. Setting The $LFS Variable

-- Bruce
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in
Bruce Dubbs
2018-03-02 18:45:32 UTC
Permalink
I'm sorry, it points to "/mnt/LFS.
​​
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
​​
Hi Bruce,
I just checked the LFS variable and it points to /mnt/tools, so that is not it. Do you have any idea what might have caused it, if not this?
1. Reply to the list.
2. Do not top post.


Do this as root:

rm -rf /tools
echo $LFS

mkdir -v $LFS/tools
ln -sv $LFS/tools /

The result should be:

/mnt/lfs
mkdir: created directory /mnt/lfs/tools
'/tools' -> '/mnt/lfs/tools'

-- Bruce
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki
Pierre Labastie
2018-03-02 16:21:03 UTC
Permalink
Post by miguel caldas
Hi,
ln -sv $LFS/tools /
I always got a error message telling that "ln: failed to create symbolic
link '/tools': File exists".
The only way I found to circumvent this was to give the create symlink
ln -sv $LFS/tools/ "link_name"
where "link_name" was something I created
My question is this, will this symlink creation format impact future
steps of LFS? Can I leave as it is or must I create it exactly as it is
on the book?
Short answer: yes. Don't deviate from the book.

Long answer:
The error message you get is fairly clear: /tools already exists, so you
cannot create it again... You should try to know what /tools is. A
possible command: "file /tools". If it is a symbolic link pointing to
$LFS/tools, you are done. If it is not, remove it, then run the command
as told in the book.

The instructions in the book have been thoroughly tested, and are known
to work. We may not be able to help you if you deviate from the book.

regards
Pierre
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
Hazel Russman
2018-03-02 16:48:58 UTC
Permalink
On Fri, 2 Mar 2018 17:21:03 +0100
Post by Pierre Labastie
Post by miguel caldas
Hi,
ln -sv $LFS/tools /
I always got a error message telling that "ln: failed to create symbolic
link '/tools': File exists".
The only way I found to circumvent this was to give the create symlink
ln -sv $LFS/tools/ "link_name"
where "link_name" was something I created
My question is this, will this symlink creation format impact future
steps of LFS? Can I leave as it is or must I create it exactly as it is
on the book?
Short answer: yes. Don't deviate from the book.
The error message you get is fairly clear: /tools already exists, so you
cannot create it again... You should try to know what /tools is. A
possible command: "file /tools". If it is a symbolic link pointing to
$LFS/tools, you are done. If it is not, remove it, then run the command
as told in the book.
The instructions in the book have been thoroughly tested, and are known
to work. We may not be able to help you if you deviate from the book.
regards
Pierre
You can also get this error if you build a new LFS using an existing one as your host and you forgot to delete the old system's tools directory at the end of the build. This frequently happens to me.
--
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thin
Loading...