LinuxQuestions.org
Visit Jeremy's Blog.
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-01-2005, 10:03 PM   #1
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Rep: Reputation: 56
Unable to create directories


Hi folks,

Following
6.2. Mounting Virtual Kernel File Systems
http://www.sg.linuxfromscratch.org/l...06/kernfs.html

[satimis@localhost ~]$ su - lfs
Password:
lfs:~$ echo $LFS
/mnt/lfs
lfs:~$ mkdir -p $LFS/{proc,sys}
Code:
mkdir: cannot create directory `/mnt/lfs/proc': Permission denied
mkdir: cannot create directory `/mnt/lfs/sys': Permission denied
I was not allowed to create directories. Whether I have to login as "su -" on FC3 host first as follows,

[satimis@localhost ~]$ su -
Password:
[root@localhost ~]# cd /mnt/lfs/

then to proceed

[root@localhost lfs]# mkdir -p $LFS/{proc,sys}

OR on which directory (/mnt/lfs/sources/) to run that command line. Please advise. TIA

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

Rep: Reputation: 33
what does
ls -lA $LFS
show?

Last edited by CroMagnon; 07-02-2005 at 12:41 AM.
 
Old 07-02-2005, 01:45 AM   #3
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Hi CroMagnon,

Tks for your advice.

Quote:
what does
ls -lA $LFS
show?
[satimis@localhost ~]$ su - lfs
Password:
lfs:~$ ls -lA $LFS
Code:
total 32
drwx------   2 root root 16384 Jun  2 03:41 lost+found
drwxrwxrwt  34 lfs  root  4096 Jul  1 12:54 sources
drwxr-xr-x  16 lfs  root  4096 Jul  1 12:57 tools
Before I read;
6. Installing Basic System Software
http://www.sg.linuxfromscratch.org/l...chapter06.html

Note:-
The remainder of this book is to be performed while
logged in as user root and no longer as user lfs.

I was a little bid confused there. Whether I must login as "su -"
(some folks term it as "Super Root" - the System
Admin of FC3 host".)

Then cd /mnt/lfs"
lfs:~$
to proceed.

If after login as "su -" on the FC3 host, then to "su
- lfs" on FC3 host, it won't ask for LFS root's
password and continues to login as;
lfs:~$


Would it confuse the FC3 host? TIA

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

Rep: Reputation: 33
Damn, I meant for that to be a lower case 'a', but it doesn't matter as you've found the solution - you should be running these commands as root. I'm not sure what you're asking at the end, but when you create files as root, they will be owned by the user "number 0" (usually called root). There shouldn't be any confusion between the systems, as that user will be "number 0" in both systems. Once you get to step 6.3 and start using the chroot command, things should become a bit more clear.
 
Old 07-02-2005, 03:42 AM   #5
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Hi CroMagnon,

Tks for your advice. I'm clear now.

Quote:
I'm not sure what you're asking at the end, .......
Because I had some confusion whether login as

"su -" (the Super Root - Admin)

of the FC3 host would damage the later (FC3 host) while building LFS if anything goes wrong

B.R.
satimis
 
Old 07-02-2005, 03:54 AM   #6
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
Ahh, I see now. No, as long as you make sure you are in the chroot environment before you run anything, your FC3 host shouldn't be affected in any way. If you log out or reboot, be sure to rerun the chroot command before you continue with LFS.
 
Old 07-02-2005, 04:05 AM   #7
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Hi CroMagnon,

Quote:
make sure you are in the chroot environment before you run anything,....
Whether you meant to run

[satimis@localhost ~]$ su - lfs

first. Tks.

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

Rep: Reputation: 33
Nope, you shouldn't need the lfs user any more (but don't delete it yet, in case I've forgotten something). The instructions for the chroot command are in 6.3, and once you reach that point, you should always make sure you re-run that command (as root, not lfs) before continuing with your LFS instructions.

In other words:
1) From this point on, ALWAYS log in as root, never as lfs (unless told otherwise)
2) When you get to section 6.3, bookmark it, and re-run the chroot command any time you've had to log in to continue your build, right up until you get your LFS system to boot.
 
Old 07-02-2005, 04:48 AM   #9
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Hi CroMagnon,

Quote:
From this point on, ALWAYS log in as root, never as lfs (unless told otherwise)
Tks, I'm clear now, always;

[satimis@localhost ~]$ su -
Password: (enter FC3 host's Root password)
[root@localhost ~]#

staying here (for the rest of this Section unless instructed)

Quote:
2) When you get to section 6.3, bookmark it, and re-run the chroot command any time you've had to log in to continue your build, right up until you get your LFS system to boot.
Noted with thanks.

6.3. Entering the Chroot Environment
http://www.sg.linuxfromscratch.org/l...06/chroot.html

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
Do we need to create the log and db directories by ourselves Niceman2005 Linux - Software 0 11-17-2004 09:08 PM
Can't create directories in /proc keripukki Linux - Software 3 09-03-2004 01:26 PM
Program to create playlists of directories Mikessu Linux - Software 2 06-28-2004 07:17 PM
Create several directories? AutOPSY Linux - Newbie 3 03-30-2004 07:51 PM
root unable to create directories in /home? cpv204 Solaris / OpenSolaris 6 11-25-2003 10:33 AM

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

All times are GMT -5. The time now is 03:32 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