LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Advice on creating new directory (https://www.linuxquestions.org/questions/linux-from-scratch-13/advice-on-creating-new-directory-337446/)

satimis 06-26-2005 07:18 PM

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

kjordan 06-27-2005 12:56 AM

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.

satimis 06-27-2005 01:19 AM

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

kjordan 06-27-2005 01:49 PM

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"

satimis 06-27-2005 08:34 PM

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


All times are GMT -5. The time now is 12:15 PM.