LinuxQuestions.org
Help answer threads with 0 replies.
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 07-17-2005, 11:51 PM   #1
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Rep: Reputation: 56
ln: `//tools': File exists


Hi folks,

LFS 6.1
(FC3 Host)

4.2. Creating the $LFS/tools Directory
http://www.linuxfromscratch.org/lfs/...gtoolsdir.html

[root@localhost ~]# ln -s $LFS/tools /
ln: `//tools': File exists

I looked at
[root@localhost ~]# info coreutils ln
[root@localhost ~]# info coreutils ln 1

both looking more or less the same. I can't understand
Code:
File: coreutils.info,  Node: ln invocation,  Next: mkdir invocation,  Prev: link invocation,  Up: Special file types

12.2 `ln': Make links between files
===================================

`ln' makes links between files.  By default, it makes hard links; with
the `-s' option, it makes symbolic (or "soft") links.  Synopses:

     ln [OPTION]... TARGET [LINKNAME]
     ln [OPTION]... TARGET... DIRECTORY

   * If the last argument names an existing directory, `ln' creates a
     link to each TARGET file in that directory, using the TARGETs'
     names.  (But see the description of the `--no-dereference' option
     below.)

   * If two filenames are given, `ln' creates a link from the second to
     the first.

   * If one TARGET is given, `ln' creates a link to that file in the
     current directory.
.......
....
[root@localhost ~]# info coreutils ln(1)
-bash: syntax error near unexpected token `('
[root@localhost ~]# info coreutils ln (1)
-bash: syntax error near unexpected token `('

Please help me to understand it. Is it a error? TIA

B.R.
satimis

B.R.
satimis
 
Old 07-18-2005, 04:07 AM   #2
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
When you see something like this:

For info, see ln(1)

It is referring to the man page, not the info text. The (1) refers to the manual section, which you can specify like this: man 1 ln
This is only important when multiple sections might exist for the same word. "socket" is one such - you can see man 2 socket and man 7 socket are different.

For the error though, it appears that you already have a "tools" file or folder in your root directory. By any chance, is $LFS set to "/"? You should definitely NOT be using "/" to build your LFS system unless you are positive you know what you're doing.
 
Old 07-18-2005, 04:45 AM   #3
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Hi CroMagnon,

Tks for your advice.

Quote:
For the error though, it appears that you already have a "tools" file or folder in your root directory. By any chance, is $LFS set to "/"? You should definitely NOT be using "/" to build your LFS system unless you are positive you know what you're doing.
[root@localhost ~]# ls -l /tools
Code:
lrwxrwxrwx  1 root root 15 Jun 28 17:06 /tools -> //mnt/lfs/tools
It is symbolic linked to /tools. I'm building LFS 6.1 on its own partition, not on '/' of the FC3 Host

Move on and have further discovery;
4.3. Adding the LFS User
http://www.linuxfromscratch.org/lfs/...ddinguser.html

[root@localhost ~]# groupadd lfs
Code:
groupadd: group lfs exists
[root@localhost ~]# useradd -s /bin/bash -g lfs -m -k /dev/null lfs
Code:
useradd: user lfs exists
[root@localhost ~]# cat /etc/group | grep lfs
Code:
lfs:x:501:
It is already there. I think that this is another residue left behind during building LFS 6.0 previously

How to check the command "useradd -s /bin/bash -g lfs -m -k /dev/null lfs" ?

Can I skip "passwd lfs" and move on to
[root@localhost ~]# chown lfs $LFS/tools
[root@localhost ~]# chown lfs $LFS/sources
[root@localhost ~]# su - lfs
etc.

TIA

B.R.
satimis
 
Old 07-18-2005, 05:06 AM   #4
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
Yep, looks like you're right - you have some leftovers from an older build. You can "rm /tools" and re-run the ln command to get past that. You can choose to either remove and re-create the lfs user (userdel or deluser should work), or you can just edit /etc/passwd and make sure the home directory is set correctly for the new build.
 
Old 07-18-2005, 05:21 AM   #5
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Hi CroMagnon,

Tks for your advice. I'll leave them as they are.

Quote:
You can choose to either remove and re-create the lfs user (userdel or deluser should work), or you can just edit /etc/passwd and make sure the home directory is set correctly for the new build.
# cat /etc/passwd
Code:
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
adm:x:3:4:adm:/var/adm:/sbin/nologin
lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
......
....
operator:x:11:0:operator:/root:/sbin/nologin
gopher:x:13:30:gopher:/var/gopher:/sbin/nologin
ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
nobody:x:99:99:Nobody:/:/sbin/nologin
dbus:x:81:81:System message bus:/:/sbin/nologin
vcsa:x:69:69:virtual console memory owner:/dev:/sbin/nologin
nscd:x:28:28:NSCD Daemon:/:/sbin/nologin
rpm:x:37:37::/var/lib/rpm:/sbin/nologin
....
...
smmsp:x:51:51::/var/spool/mqueue:/sbin/nologin
pcap:x:77:77::/var/arpwatch:/sbin/nologin
....
...
gdm:x:42:42::/var/gdm:/sbin/nologin
....
lfs:x:501:501::/home/lfs:/bin/bash
"lfs:x:501:501::/home/lfs:/bin/bash" is there. I'll leave it untouched, skipping
[root@localhost ~]passwd lfs

and move on to
[root@localhost ~]# chown lfs $LFS/tools
[root@localhost ~]# chown lfs $LFS/sources
[root@localhost ~]# su - lfs
etc.

B.R.
satimis
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
file not found by glob? - file exists? rgdatit Linux - Newbie 2 07-29-2005 02:16 AM
SIOCADDRT: File exists SIOCCADDRT: File Exists Failed to bring up eth0. opsraja Linux - Networking 0 01-10-2005 08:29 AM
Linker problem: can't find a file, but the file exists atlep Programming 5 08-16-2004 06:15 AM
File already exists mickstaff Programming 3 05-13-2004 03:34 AM
file exists? raven Programming 7 10-26-2003 07:44 AM

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

All times are GMT -5. The time now is 06:53 PM.

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