LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 05-17-2012, 08:35 AM   #1
roshgorg
LQ Newbie
 
Registered: May 2012
Posts: 20

Rep: Reputation: Disabled
Second attempt after rebooting at chapter 6


Hello, I am using LFS version 7.1, and my host is a Debian installation.
I was at chapter 6.8 when my power supply was gone, and so, as the note at chapter 6.4 say, i have to remount everything in 6.2.2 and 6.2.3 .

When i tried to remount them, the following was my output.

Code:
root@debian:/home/roshan# mount -v --bind /dev $LFS/dev
/dev on /dev type none (rw,bind)
root@debian:/home/roshan# mount -vt devpts devpts $LFS/dev/pts
devpts on /dev/pts type devpts (rw)
root@debian:/home/roshan# mount -vt tmpfs shm $LFS/dev/shm
shm on /dev/shm type tmpfs (rw)
root@debian:/home/roshan# mount -vt proc proc $LFS/proc
mount: proc already mounted
root@debian:/home/roshan# mount -vt sysfs sysfs $LFS/sys
mount: sysfs already mounted or /sys busy
mount: according to mtab, sysfs is already mounted on /sys
root@debian:/home/roshan#
Please see where I went wrong.
 
Old 05-17-2012, 08:43 AM   #2
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Stretch
Posts: 612

Rep: Reputation: 125Reputation: 125
When the PS failed, proc and sysfs was not unmounted. The entry is still in $LFS/etc/mtab. Could you post the contents of $LFS/etc/mtab, or delete the lines starting with proc and sysfs before remounting.
 
Old 05-17-2012, 08:49 AM   #3
roshgorg
LQ Newbie
 
Registered: May 2012
Posts: 20

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by towheedm View Post
When the PS failed, proc and sysfs was not unmounted. The entry is still in $LFS/etc/mtab. Could you post the contents of $LFS/etc/mtab, or delete the lines starting with proc and sysfs before remounting.
I am a newbie. Can you explain the bolded part a bit more. I mean how to do it ?
Also, should i be the lfs user for applying these mount commands ?
 
Old 05-17-2012, 08:54 AM   #4
roshgorg
LQ Newbie
 
Registered: May 2012
Posts: 20

Original Poster
Rep: Reputation: Disabled
Code:
root@debian:/home/roshan# cat $LFS/etc/mtab
/dev/sda6 / ext4 rw,errors=remount-ro 0 0
tmpfs /lib/init/rw tmpfs rw,nosuid,mode=0755 0 0
proc /proc proc rw,noexec,nosuid,nodev 0 0
sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0
udev /dev tmpfs rw,mode=0755 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=620 0 0
fusectl /sys/fs/fuse/connections fusectl rw 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,noexec,nosuid,nodev 0 0
/dev /dev none rw,bind 0 0
devpts /dev/pts devpts rw 0 0
shm /dev/shm tmpfs rw 0 0
/dev /dev none rw,bind 0 0
root@debian:/home/roshan#
/dev/sda6 is my host
i am using /dev/sda8 for lfs

Last edited by roshgorg; 05-17-2012 at 08:56 AM.
 
Old 05-17-2012, 09:01 AM   #5
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Stretch
Posts: 612

Rep: Reputation: 125Reputation: 125
The file '/etc/mtab' keeps a record of all mounted filesystems. For example, on my host system this is my /etc/mtab:
Code:
/dev/md1 / ext4 rw,errors=remount-ro 0 0
tmpfs /lib/init/rw tmpfs rw,nosuid,mode=0755 0 0
proc /proc proc rw,noexec,nosuid,nodev 0 0
sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0
udev /dev tmpfs rw,mode=0755 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=620 0 0
/dev/md0 /boot ext4 rw 0 0
/dev/md2 /home ext4 rw 0 0
/dev/md3 /home/towheed/VirtualMachines ext4 rw 0 0
/dev/md4 /home/towheed/Downloads ext4 rw 0 0
/dev/sdb12 /home/towheed/VirtualMachines/VM_1 ext4 rw 0 0
/dev/sdc12 /home/towheed/VirtualMachines/xp_home fuseblk rw,noexec,nosuid,nodev,allow_other,blksize=4096 0 0
/dev/sdc13 /home/towheed/VirtualMachines/xp_pro fuseblk rw,noexec,nosuid,nodev,allow_other,blksize=4096 0 0
fusectl /sys/fs/fuse/connections fusectl rw 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,noexec,nosuid,nodev 0 0
none /proc/fs/vmblock/mountPoint vmblock rw 0 0
This is a record of all mounted filesystems on my host. Now, I did LFS on /dev/sda1 and when I mount it with:
Code:
mount /dev/sda1 /mnt/lfs
my new /etc/mtab is:
Code:
/dev/md1 / ext4 rw,errors=remount-ro 0 0
tmpfs /lib/init/rw tmpfs rw,nosuid,mode=0755 0 0
proc /proc proc rw,noexec,nosuid,nodev 0 0
sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0
udev /dev tmpfs rw,mode=0755 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=620 0 0
/dev/md0 /boot ext4 rw 0 0
/dev/md2 /home ext4 rw 0 0
/dev/md3 /home/towheed/VirtualMachines ext4 rw 0 0
/dev/md4 /home/towheed/Downloads ext4 rw 0 0
/dev/sdb12 /home/towheed/VirtualMachines/VM_1 ext4 rw 0 0
/dev/sdc12 /home/towheed/VirtualMachines/xp_home fuseblk rw,noexec,nosuid,nodev,allow_other,blksize=4096 0 0
/dev/sdc13 /home/towheed/VirtualMachines/xp_pro fuseblk rw,noexec,nosuid,nodev,allow_other,blksize=4096 0 0
fusectl /sys/fs/fuse/connections fusectl rw 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,noexec,nosuid,nodev 0 0
none /proc/fs/vmblock/mountPoint vmblock rw 0 0
/dev/sda1 /mnt/lfs ext4 rw 0 0
Notice the entry on the last line now for the mounted filesystem on /dev/sda1.

You do not need be the lfs user to delete the entries. Mount you lfs filesystem (assuming it's on /dev/sda1 and the mount point is /mnt/lfs:
Code:
mount /dev/sda1 /mnt/lfs
Now open the /mnt/lfs/etc/mtab file with your favorite text editor and delete the lines starting with proc and sysfs, copy the contents and post it.
 
Old 05-17-2012, 09:07 AM   #6
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Stretch
Posts: 612

Rep: Reputation: 125Reputation: 125
You can also try to unmount them if you're not comfortable with editing the file:
Code:
umount $LFS/proc
umount $LFS/sys
If the umount command gives a 'not mounted error', then you will have to delete the lines.
 
Old 05-17-2012, 09:24 AM   #7
roshgorg
LQ Newbie
 
Registered: May 2012
Posts: 20

Original Poster
Rep: Reputation: Disabled
So, I am going to perform the mounting of lfs again using
Code:
mount /dev/sda1 /mnt/lfs
and the performing the following mounts
Code:
mount -v --bind /dev $LFS/dev
mount -vt devpts devpts $LFS/dev/pts
mount -vt tmpfs shm $LFS/dev/shm
mount -vt proc proc $LFS/proc
mount -vt sysfs sysfs $LFS/sys
And then continuing from where I were.

What do you suggest ?
 
Old 05-17-2012, 09:30 AM   #8
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Stretch
Posts: 612

Rep: Reputation: 125Reputation: 125
No, for me it was /dev/sda1. For you it will be /dev/sda8. You posted while I was typing. If you did not unmount /mnt/lfs or rebooted, then you do only have to mount proc and sysfs.

Last edited by towheedm; 05-17-2012 at 09:32 AM.
 
Old 05-17-2012, 09:39 AM   #9
roshgorg
LQ Newbie
 
Registered: May 2012
Posts: 20

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by towheedm View Post
No, for me it was /dev/sda1. For you it will be /dev/sda8. You posted while I was typing. If you did not unmount /mnt/lfs or rebooted, then you do only have to mount proc and sysfs.
By just giving the commands for mounting proc and sys, i got the errors like sysfs is busy or /sys is already mounted, and proc is already mounted. That is why I remounted again from mount /dev/sda1 /mnt/lfs
 
Old 05-17-2012, 11:30 AM   #10
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Hi

If it was me I would reboot the system and do chapter 2.4 mounting the new partition as you did earlier, then chapter 6.2.2 and 6.2.3 then 6.4
 
Old 05-17-2012, 12:14 PM   #11
roshgorg
LQ Newbie
 
Registered: May 2012
Posts: 20

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by spiky0011 View Post
Hi

If it was me I would reboot the system and do chapter 2.4 mounting the new partition as you did earlier, then chapter 6.2.2 and 6.2.3 then 6.4
Yeah man, you are right. Only after mounting the partition again, it worked.

Another question. Do we have to delete all the extracted directories and the <package>-build directories in chapter 9 ? I haven't read anywhere to keep those directories till now .
 
Old 05-17-2012, 12:31 PM   #12
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Yes That is the end there if your system boots ok you wont be needing them anymore. Next move is onto blfs which uses completly different packages.
 
Old 05-18-2012, 02:14 AM   #13
roshgorg
LQ Newbie
 
Registered: May 2012
Posts: 20

Original Poster
Rep: Reputation: Disabled
Network Configuration doubt

I did the instructions as given in chapter 7.2.2 of the book, and for chapter 7.2.3 (Creating the /etc/resolv.conf File), for
Code:
nameserver <IP address of your primary nameserver>
, I specified 255.255.255.0 . Is this correct.? If not what should be done ?

Is it possible to undoe changes done in network configuration and start with correct network configurration ? If so, how ?
 
Old 05-18-2012, 02:49 AM   #14
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
How is the pc connected to the internet. If it gpse through a router you wont need that part
 
Old 05-18-2012, 02:59 AM   #15
roshgorg
LQ Newbie
 
Registered: May 2012
Posts: 20

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by spiky0011 View Post
How is the pc connected to the internet. If it gpse through a router you wont need that part
I use GPRS connection for accessing net. Currently, I have followed the book chapter 7.2.2 and 7.2.3 . I get to know they are not meant for my configuration. Is it possible to undo those steps I did, and continue from chapter 7.4 ?

At chapter 7.5, Where should the command prompt be ?
 
  


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
LFS chapter-by-chapter complete commands with notes DrinkinHomeBrew Linux From Scratch 6 03-16-2012 01:57 AM
LFS 6.3, messed up somewhere prior to chapter 6.12 (gcc), how to restart chapter 6? Funkster Linux From Scratch 2 12-24-2008 06:30 AM
Hack Attempt? keysorsoze Linux - Security 6 05-18-2007 11:32 PM
Attempt#2: Help...?? lostinpurdy Linux - Newbie 17 10-17-2005 08:23 PM
Need some help for first attempt at install Hayter Linux - Newbie 4 11-29-2003 09:40 PM

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

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