LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 06-26-2005, 07:18 PM   #1
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Rep: Reputation: 56
Advice on creating new directory


Hi folks,

I have 'LFS' partition permanently mounted as;

# cat /etc/fstab
Code:
# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/                 /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
none                    /dev/pts                devpts  gid=5,mode=620  0 0
none                    /dev/shm                tmpfs   defaults        0 0
/dev/hda5               /home                   ext3    defaults        1 2
none                    /proc                   proc    defaults        0 0
none                    /sys                    sysfs   defaults        0 0
/dev/hda3               swap                    swap    defaults        0 0
/dev/hda6               /mnt/lfs                ext3    defaults        1 2
/dev/hda7               /mnt/livecd             ext3    defaults        1 2
/dev/hdd                /media/cdrom            auto    pamconsole,exec,noauto,f
........
......
# df -T
Code:
Filesystem    Type   1K-blocks      Used Available Use% Mounted on
/dev/hda2     ext3    20161204   7329548  11807516  39% /
/dev/hda1     ext3      101086     11461     84406  12% /boot
none         tmpfs      127744         0    127744   0% /dev/shm
/dev/hda5     ext3     9621848   1704152   7428920  19% /home
/dev/hda6     ext3     5771468     44256   5434028   1% /mnt/lfs
/dev/hda7     ext3     1802600     35496   1675536   3% /mnt/livecd
According to following URL
http://www.sg.linuxfromscratch.org/l.../mounting.html

I proceeded
# mkdir -p $LFS /mnt/LFS
# mkdir /mnt/LFS/$LFS/usr

# ls -al /mnt/LFS/
Code:
total 24
drwxr-xr-x  3 root root 4096 Jun 27 07:40 .
drwxr-xr-x  8 root root 4096 Jun 27 07:39 ..
drwxr-xr-x  2 root root 4096 Jun 27 07:40 usr
Only /usr is there, '$LFS' not found. Whether /mnt/LFS is '$LFS'?

TIA

B.R.
satimis

Last edited by satimis; 06-27-2005 at 09:24 AM.
 
Old 06-27-2005, 12:56 AM   #2
kjordan
Member
 
Registered: Jul 2004
Distribution: LFS, I felt the itch and scratched it
Posts: 227

Rep: Reputation: 31
If you did an "export LFS=/mnt/lfs" then yes, $LFS is /mnt/lfs. I'm not sure where you're getting this extra stuff from, it explicitly says mkdir $LFS and not mkdir /mnt/lfs $LFS. Although it would seem your LFS variable isn't set if you're able to do mkdir -p /mnt/lfs/$LFS/usr and not have it end up as /mnt/lfs/mnt/lfs/usr, since if it isn't set, it will just end up as /mnt/lfs//usr.

Last edited by kjordan; 06-27-2005 at 12:57 AM.
 
Old 06-27-2005, 01:19 AM   #3
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Hi kjordan,

Tks for your advice.

I ran following commands on Konsole;
$ echo $lfs
Empty output
$ echo $LFS
Empty output
$ echo LFS
LFS
$ echo lfs
lfs

I thinks I have to repeat
2.4. Mounting the New Partition on
http://www.sg.linuxfromscratch.org/l.../mounting.html

$ cat /etc/fstab
Code:
# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/                 /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
none                    /dev/pts                devpts  gid=5,mode=620  0 0
none                    /dev/shm                tmpfs   defaults        0 0
/dev/hda5               /home                   ext3    defaults        1 2
none                    /proc                   proc    defaults        0 0
none                    /sys                    sysfs   defaults        0 0
/dev/hda3               swap                    swap    defaults        0 0
/dev/hda6               /mnt/lfs                ext3    defaults        1 2
/dev/hda7               /mnt/livecd             ext3    defaults        1 2
/dev/hdd                /media/cdrom            auto    
......
Shall I delete following line from /etc/fstab
Code:
/dev/hda6               /mnt/lfs                ext3    defaults        1 2
TIA

# ls -l /mnt/
Code:
total 32
drwxr-xr-x  2 root root 4096 May 22 22:52 cdrom
drwxr-xr-x  2 root root 4096 May 22 22:52 cdwriter
drwxr-xr-x  2 root root 4096 May 22 22:53 floppy
drwxr-xr-x  3 root root 4096 Jun  2 11:41 lfs
drwxr-xr-x  3 root root 4096 Jun  2 11:41 livecd
# ls -l /mnt/lfs
Code:
total 16
drwx------  2 root root 16384 Jun  2 11:41 lost+found
B.R.
satimis
 
Old 06-27-2005, 01:49 PM   #4
kjordan
Member
 
Registered: Jul 2004
Distribution: LFS, I felt the itch and scratched it
Posts: 227

Rep: Reputation: 31
The line in your fstab is alright if you want it automatically mounted at boot time when your host distro starts up. Also, you only need to mkdir the usr directory if you are wanting to mount a separate partition into /mnt/lfs/usr, otherwise it will be created later. All you really need to do is set your LFS variable, which is the top instruction "export LFS=/mnt/lfs"
 
Old 06-27-2005, 08:34 PM   #5
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Hi kjordan,

Quote:
The line in your fstab is alright if you want it automatically mounted at boot time when your host distro starts up.......
Noted with thanks

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
Need advice on creating an alias thorney Linux - General 2 11-27-2005 07:33 PM
Creating a network with FC3 and FC4, Need advice A6Quattro Linux - Networking 1 07-21-2005 08:21 AM
Need advice..How should my /home/<user>/ directory be organized? glenn69 Linux - Newbie 4 06-02-2004 02:29 PM
Creating a login for a directory Renaxgade Linux - Software 2 10-18-2003 12:16 AM
Creating ramdisk for directory tree. vaibhavk Linux - General 0 01-16-2002 11:29 PM

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

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