LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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-02-2005, 07:24 AM   #1
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Rep: Reputation: 56
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

Last edited by satimis; 07-02-2005 at 07:25 AM.
 
Old 07-02-2005, 09:44 AM   #2
freegianghu
Member
 
Registered: Oct 2004
Location: somewhere in the street
Distribution: Window$
Posts: 192

Rep: Reputation: 30
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
 
Old 07-02-2005, 10:28 AM   #3
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
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
 
Old 07-02-2005, 10:55 AM   #4
freegianghu
Member
 
Registered: Oct 2004
Location: somewhere in the street
Distribution: Window$
Posts: 192

Rep: Reputation: 30
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
 
Old 07-02-2005, 02:25 PM   #5
kjordan
Member
 
Registered: Jul 2004
Distribution: LFS, I felt the itch and scratched it
Posts: 227

Rep: Reputation: 31
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.
 
Old 07-04-2005, 11:13 PM   #6
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
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
 
Old 07-05-2005, 02:25 AM   #7
kjordan
Member
 
Registered: Jul 2004
Distribution: LFS, I felt the itch and scratched it
Posts: 227

Rep: Reputation: 31
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.

Last edited by kjordan; 07-05-2005 at 02:27 AM.
 
Old 07-05-2005, 06:57 AM   #8
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
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
 
  


Reply



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
Red hat Install: "No valid devices found on which to create new file systems" Lucky_69 Linux - Software 1 02-06-2007 09:19 PM
Question on Mounting Virtual Kernel File Systems satimis Linux From Scratch 4 07-21-2005 09:04 PM
Mounting Virtual Kernel File Systems - Help Pls chakkaradeepcc Linux From Scratch 2 05-13-2005 06:53 AM
vsftpd - "real" vs. "virtual" users clau_bolson Linux - Networking 2 11-17-2003 06:22 AM
Can't locate object method "splitpath" via package "File::Spec" RobJohnston Linux - General 2 06-28-2003 09:59 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