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 10-01-2012, 03:13 AM   #1
k84834
Member
 
Registered: Aug 2012
Posts: 142

Rep: Reputation: Disabled
some concepts


Hi
I want to know the meaning of below red part

Code:
mknod -m 600 $LFS/dev/console c 5 1
mknod -m 666 $LFS/dev/null c 1 3
I read some text about /dev/null and /dev/console
but if you know about them and can tell me clearly, make me happy

Last edited by k84834; 10-01-2012 at 03:16 AM.
 
Old 10-01-2012, 04:42 AM   #2
k84834
Member
 
Registered: Aug 2012
Posts: 142

Original Poster
Rep: Reputation: Disabled
in section 6.5 of lfs-7.2 use install command for create root and tmp and var/tmp directories.
I want to know exactly why we use install command vs mkdir
I saw install man and my question is :
Code:
SYNOPSIS
install [OPTION]... SOURCE DEST (1st format)
install [OPTION]... SOURCE... DIRECTORY (2nd format)
install -d [OPTION]... DIRECTORY... (3rd format)  
DESCRIPTION

In the first two formats, copy SOURCE to DEST or multiple SOURCE(s) to the existing DIRECTORY, while setting permission modes and owner/group. In the third format, create all components of the given DIRECTORY(ies). 
what is the meaning of red part ?
 
Old 10-01-2012, 04:44 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,838

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
see here: http://linux.die.net/man/1/mknod
c means create a character special file, 5 1 and 1 3 are the major/minor addresses.
About major and minor "numbers" see here: http://www.win.tue.nl/~aeb/linux/lk/lk-11.html
(Devices have a number, the device number, a combination of major and minor device number. Traditionally, the major device number gives the kind of device, and the minor device number is some kind of unit number. However, there are no rules - it is best to consider a device number a cookie, without known structure.)
 
Old 10-01-2012, 06:14 AM   #4
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Quote:
Originally Posted by k84834 View Post
in section 6.5 of lfs-7.2 use install command for create root and tmp and var/tmp directories.
I want to know exactly why we use install command vs mkdir
I saw install man and my question is :
Code:
SYNOPSIS
install [OPTION]... SOURCE DEST (1st format)
install [OPTION]... SOURCE... DIRECTORY (2nd format)
install -d [OPTION]... DIRECTORY... (3rd format)  
DESCRIPTION

In the first two formats, copy SOURCE to DEST or multiple SOURCE(s) to the existing DIRECTORY, while setting permission modes and owner/group. In the third format, create all components of the given DIRECTORY(ies). 
what is the meaning of red part ?
Install is used because it can set permissions and create parent directory's depending on the options used, try
Code:
install -d /tmp/x/y/z
as you can see the folders /tmp/x /tmp/x/y and /tmp/x/y/z are created this is the same as
Code:
mkdir -p /tmp/x/y/z
but mkdir doesn't set permissions

Last edited by Keith Hedger; 10-01-2012 at 06:16 AM.
 
Old 10-06-2012, 05:31 AM   #5
k84834
Member
 
Registered: Aug 2012
Posts: 142

Original Poster
Rep: Reputation: Disabled
thank you keith hedger and pan64
your guidance be more helpful
I have another question .
can anyone tell me what is ld-new and why we didn't use it from the beginning?
can anyone explain to me what is the meaning of doing these?
Code:
make -C ld clean
make -C ld LIB_PATH=/usr/lib:/lib
cp -v ld/ld-new /tools/bin
Code:
mv -v /tools/bin/{ld,ld-old}
mv -v /tools/$(gcc -dumpmachine)/bin/{ld,ld-old}
mv -v /tools/bin/{ld-new,ld}
ln -sv /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld
 
Old 10-06-2012, 08:44 AM   #6
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Quote:
Originally Posted by k84834 View Post
thank you keith hedger and pan64
your guidance be more helpful
I have another question .
can anyone tell me what is ld-new and why we didn't use it from the beginning?
can anyone explain to me what is the meaning of doing these?
Code:
make -C ld clean
make -C ld LIB_PATH=/usr/lib:/lib
cp -v ld/ld-new /tools/bin
Code:
mv -v /tools/bin/{ld,ld-old}
mv -v /tools/$(gcc -dumpmachine)/bin/{ld,ld-old}
mv -v /tools/bin/{ld-new,ld}
ln -sv /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld
What chapter of what book is this? I don't remember doing this.
 
  


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
Are there new concepts in Slackware? igadoter Slackware 16 12-06-2010 12:00 PM
new concepts vendtagain Programming 4 10-03-2009 12:45 AM
Guide me please: regarding HA concepts sir_com Linux - Newbie 1 11-12-2008 02:21 AM
USB Concepts nesta Linux - Hardware 2 02-28-2007 08:31 PM
Installation concepts plnelson Linux - Newbie 5 10-11-2004 07:24 AM

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

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