LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Problem in "Mounting Virtual Kernel File Systems" (https://www.linuxquestions.org/questions/linux-from-scratch-13/problem-in-mounting-virtual-kernel-file-systems-339314/)

satimis 07-02-2005 07:24 AM

Problem in "Mounting Virtual Kernel File Systems"
 
Hi folks,

I'm now held on

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

[satimis@localhost ~]$ su -
Password:
[root@localhost ~]# mkdir -p $LFS/{proc,sys}
[root@localhost ~]# mount -t proc proc $LFS/proc
mount: proc already mounted
[root@localhost ~]# mount -t sysfs sysfs $LFS/sys
mount: sysfs already mounted or /sys busy
mount: according to mtab, none is already mounted on /sys

$ 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
........
......

[root@localhost ~]# umount /mnt/lfs
[root@localhost ~]# mkdir -p $LFS/{proc,sys}
[root@localhost ~]# mount -t proc proc $LFS/proc
mount: proc already mounted
[root@localhost ~]# mount -t sysfs sysfs $LFS/sys
mount: sysfs already mounted or /sys busy
mount: according to mtab, none is already mounted on /sys

Please help. TIA

B.R.
satimis

freegianghu 07-02-2005 09:44 AM

Re: Problem in "Mounting Virtual Kernel File Systems"
 
Quote:

Originally posted by satimis
Hi folks,

I'm now held on

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

[satimis@localhost ~]$ su -
Password:
[root@localhost ~]# mkdir -p $LFS/{proc,sys}
[root@localhost ~]# mount -t proc proc $LFS/proc
mount: proc already mounted
[root@localhost ~]# mount -t sysfs sysfs $LFS/sys
mount: sysfs already mounted or /sys busy
mount: according to mtab, none is already mounted on /sys

$ 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
........
......

[root@localhost ~]# umount /mnt/lfs
[root@localhost ~]# mkdir -p $LFS/{proc,sys}
[root@localhost ~]# mount -t proc proc $LFS/proc
mount: proc already mounted
[root@localhost ~]# mount -t sysfs sysfs $LFS/sys
mount: sysfs already mounted or /sys busy
mount: according to mtab, none is already mounted on /sys

Please help. TIA

B.R.
satimis

Code:

[root@localhost ~]# mount /mnt/lfs
[root@localhost ~]# export LFS=/mnt/lfs
[root@localhost ~]# mkdir -p $LFS/{proc,sys}
[root@localhost ~]# mount -t proc proc $LFS/proc
[root@localhost ~]# mount -t sysfs sysfs $LFS/sys


satimis 07-02-2005 10:28 AM

Re: Re: Problem in "Mounting Virtual Kernel File Systems"
 
Hi freegianghu,

Tks for your advice.

Quote:

Code:

[root@localhost ~]# mount /mnt/lfs
[root@localhost ~]# export LFS=/mnt/lfs
[root@localhost ~]# mkdir -p $LFS/{proc,sys}
[root@localhost ~]# mount -t proc proc $LFS/proc
[root@localhost ~]# mount -t sysfs sysfs $LFS/sys


They worked for me. But I made a mistake to login as

"su"
NOT
"su -"

Would it matter?

Steps performed as follows;
[satimis@localhost ~]$ su
Password:
[root@localhost satimis]# mount /mnt/lfs
mount: /dev/hda6 already mounted or /mnt/lfs busy
mount: according to mtab, /dev/hda6 is already mounted on /mnt/lfs

[root@localhost satimis]# echo $LFS
No print out
[root@localhost satimis]# export LFS=/mnt/lfs
[root@localhost satimis]# mkdir -p $LFS/{proc,sys}
[root@localhost satimis]# mount -t proc proc $LFS/proc
[root@localhost satimis]# mount -t sysfs sysfs $LFS/sys
All went through without complaint.

[root@localhost satimis]# printevn
Code:

bash: printevn: command not found
[root@localhost satimis]# printenv
SSH_AGENT_PID=4392
KDE_MULTIHEAD=false
HOSTNAME=localhost.localdomain
TERM=xterm
SHELL=/bin/bash
HISTSIZE=1000
GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/satimis/.gtkrc-2.0:/home/satimis/.kde/share/config/gtkrc
GS_LIB=/home/satimis/.fonts
GTK_RC_FILES=/etc/gtk/gtkrc:/home/satimis/.gtkrc:/home/satimis/.kde/share/config/gtkrc
WINDOWID=44040199
KDE_FULL_SESSION=true
USER=satimis
LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
XCURSOR_SIZE=
LFS=/mnt/lfs
SSH_AUTH_SOCK=/tmp/ssh-caSHJQ4391/agent.4391
KDEDIR=/usr
SESSION_MANAGER=local/localhost.localdomain:/tmp/.ICE-unix/4494
KONSOLE_DCOP=DCOPRef(konsole-4622,konsole)
PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/satimis/bin
DESKTOP_SESSION=default
MAIL=/var/spool/mail/satimis
PWD=/home/satimis
INPUTRC=/etc/inputrc
KONSOLE_DCOP_SESSION=DCOPRef(konsole-4622,session-1)
LANG=en_US.UTF-8
GDM_LANG=en_US.UTF-8
GDMSESSION=default
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
SHLVL=4
HOME=/root
XCURSOR_THEME=default
LOGNAME=satimis
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-GQaMzXdAWK
LESSOPEN=|/usr/bin/lesspipe.sh %s
DISPLAY=:0.0
G_BROKEN_FILENAMES=1
XAUTHORITY=/root/.xauthzqIoYD
COLORTERM=
_=/usr/bin/printenv

[root@localhost satimis]# whoami
root

Shall I logout and relogin as "su -"
to repeat following commands
Code:

export LFS=/mnt/lfs
mkdir -p $LFS/{proc,sys}
mount -t proc proc $LFS/proc
mount -t sysfs sysfs $LFS/sys

TIA

B.R.
satimis

P.S. a further question. Shall I comment out following line on /etc/fstab
Code:

....
.....
....
/dev/hda6              /mnt/lfs                ext3    defaults        1 2
.....

to avoid mounting /mnt/lfs automatically on booting FC3

freegianghu 07-02-2005 10:55 AM

I dont know why you have to "su" or "su -" over and over again. In my experiences you should su once at start (export $LFS && mount $LFS ), and su - lfs in chapter 5. Thats all!!!

Cheers,
GH

kjordan 07-02-2005 02:25 PM

Quote:

Originally posted by freegianghu
I dont know why you have to "su" or "su -" over and over again. In my experiences you should su once at start (export $LFS && mount $LFS ), and su - lfs in chapter 5. Thats all!!!

Cheers,
GH

Exactly, you were root when you did a switch user to lfs and so $LFS should already be set, just type exit when you're done with your lfs user part and then you'll be back as root with all the necessary environmental variables set.

satimis 07-04-2005 11:13 PM

Hi freegianghu and kjordan,

Tks for your advice.

This PC (FC3) is for testing purpose. Each time before leaving it I have to turn it off. That is why having to repeat 'su' or 'su -' often

I'm not still very clear on the different between 'su' and 'su -' (some folks termed it as 'Super Root'). The only notice coming to my recognition is some commands must be executed on 'su -' (Super Root). 'su' does not work.


Please, one further question;
If I turn off the PC at end of "Section 6.2. Mounting Virtual Kernel File Systems"
http://www.sg.linuxfromscratch.org/l...06/kernfs.html

on next boot to continue building LFS on "Section 6.3. Entering the Chroot Environment"
http://www.sg.linuxfromscratch.org/l...06/chroot.html

whether I have to re-run "Section 6.2. Mounting Virtual Kernel File Systems"

TIA

B.R.
satimis

kjordan 07-05-2005 02:25 AM

Quote:

Originally posted by satimis
Hi freegianghu and kjordan,

Tks for your advice.

This PC (FC3) is for testing purpose. Each time before leaving it I have to turn it off. That is why having to repeat 'su' or 'su -' often

I'm not still very clear on the different between 'su' and 'su -' (some folks termed it as 'Super Root'). The only notice coming to my recognition is some commands must be executed on 'su -' (Super Root). 'su' does not work.


Please, one further question;
If I turn off the PC at end of "Section 6.2. Mounting Virtual Kernel File Systems"
http://www.sg.linuxfromscratch.org/l...06/kernfs.html

on next boot to continue building LFS on "Section 6.3. Entering the Chroot Environment"
http://www.sg.linuxfromscratch.org/l...06/chroot.html

whether I have to re-run "Section 6.2. Mounting Virtual Kernel File Systems"

TIA

B.R.
satimis

The - makes it so it seems like the user is logged in directly. I'm not sure Super Root is the best term, although it does allow you to become root, but then again you can become any user if you have the password, thus switch user is a better acronym for it that super-user (which is what it's referred to as in the top of the man page).

Yes, you will need to redo 6.2 if you stop anywhere in the book.

satimis 07-05-2005 06:57 AM

Hi kjordan,

Quote:

.......I'm not sure Super Root is the best term, although it does allow you to become root, but then again you can become any user if you have the password, thus switch user is a better acronym for it that super-user (which is what it's referred to as in the top of the man page).
Noted with thank.

Quote:

Yes, you will need to redo 6.2 if you stop anywhere in the book.
Tks. This advice is important to me in continue on the remaining Sections.

B.R.
satimis


All times are GMT -5. The time now is 07:45 PM.