Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Basic Explanation needed[given]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
shouldbesleeping
Tux's lil' helper
Tux's lil' helper


Joined: 10 Feb 2005
Posts: 147

PostPosted: Wed Mar 09, 2005 3:39 am    Post subject: Basic Explanation needed[given] Reply with quote

I have installed the gentoo system and I'm onto the GUI headaches now, but what I want to know is why the commands I used worked, and what they did. I knew DOS backwards and forwards I knew what everything did. But with linux I was typing just because the manual said to, I didn't understand alot of what was going on.

Like, what is mounting, I know I mounted directories to different physical locations on my hard drive, So is mounting something that DOS did automatically? I'm used to DOS so I don't really understand that concept.

What is the proc file system? is that part of the kernel? I successfully installed gentoo, and I used all of these linux commands, I have practially memorized the steps to install gentoo, but I want to know what all these commands actually mean.

I am almost to the point of buying a linux book at barnes and noble, and I'd rather not, because none of them mention GENTOO! Is there an online guide that can explain this to me?

thanks
_________________
Being on the lower end of geniuses, I have to try a little bit harder than most of them. It still beats being a supreme moron.


Last edited by shouldbesleeping on Wed Mar 09, 2005 7:05 am; edited 1 time in total
Back to top
View user's profile Send private message
moocha
Watchman
Watchman


Joined: 21 Oct 2003
Posts: 5722

PostPosted: Wed Mar 09, 2005 4:06 am    Post subject: Reply with quote

http://tldp.org/
http://tldp.org/guides.html
http://tldp.org/LDP/intro-linux/html/index.html
http://www.gentoo.org/doc/en/index.xml
_________________
Military Commissions Act of 2006: http://tinyurl.com/jrcto

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety."
-- attributed to Benjamin Franklin
Back to top
View user's profile Send private message
Budro
Tux's lil' helper
Tux's lil' helper


Joined: 17 Aug 2002
Posts: 91
Location: MD, USA

PostPosted: Wed Mar 09, 2005 4:18 am    Post subject: amazing docs out of the gentoo camp, eh? Reply with quote

Wow.... where to start..

Lots of documentation everywhere .... now that you have gentoo running and installed, take all those commands that you used during the install process and put the man(manual) or even the info pages to use.

login to your newly built gentoo box and give the delivered docs a chance to answer your questions

man fdisk --- lots to read
info fdisk --- same thing as man page
man mount --- even more to read
info mount --- overkill
info tar --- etc. etc. you get the picture buy now

Also, most commands can be run using --help as an argument which will give you the command line switches
Code:

zippy $ cd --help
-bash: cd: --: invalid option
cd: usage: cd [-L|-P] [dir]

zippy $ mkdir --help
Usage: mkdir [OPTION] DIRECTORY...
Create the DIRECTORY(ies), if they do not already exist.

Mandatory arguments to long options are mandatory for short options too.
  -m, --mode=MODE   set permission mode (as in chmod), not rwxrwxrwx - umask
  -p, --parents     no error if existing, make parent directories as needed
  -v, --verbose     print a message for each created directory
      --help     display this help and exit
      --version  output version information and exit

Report bugs to <bug-coreutils@gnu.org>.


zippy $ mount --help
Usage: mount -V                 : print version
       mount -h                 : print this help
       mount                    : list mounted filesystems
       mount -l                 : idem, including volume labels
So far the informational part. Next the mounting.
The command is `mount [-t fstype] something somewhere'.
Details found in /etc/fstab may be omitted.
       mount -a [-t|-O] ...     : mount all stuff from /etc/fstab
       mount device             : mount device at the known place
       mount directory          : mount known device here
       mount -t type dev dir    : ordinary mount command
Note that one does not really mount a device, one mounts
a filesystem (of the given type) found on the device.
One can also mount an already visible directory tree elsewhere:
       mount --bind olddir newdir
or move a subtree:
       mount --move olddir newdir
A device can be given by name, say /dev/hda1 or /dev/cdrom,
or by label, using  -L label  or by uuid, using  -U uuid .
Other options: [-nfFrsvw] [-o options] [-p passwdfd].
For many more details, say  man 8 mount .


a quick google found websites:
http://www.tuxfiles.org
http://linux-newbie.sunsite.dk/


That is pretty good that you know very little about linux and were able to install gentoo. That says a lot for the install docs.
Back to top
View user's profile Send private message
vhg119
n00b
n00b


Joined: 14 Dec 2004
Posts: 15

PostPosted: Wed Mar 09, 2005 5:44 am    Post subject: Reply with quote

Mounting is mapping a directory to a filesystem or storage device.

Just keep at it. You'll learn sooner or later through consistent exposure.
Back to top
View user's profile Send private message
Sith_Happens
Veteran
Veteran


Joined: 15 Dec 2004
Posts: 1807
Location: The University of Maryland at College Park

PostPosted: Wed Mar 09, 2005 6:38 am    Post subject: Reply with quote

In DOS, primary partitions and logical volumes are read by DOS and automatically assigned drive letters. Each drive is in a sense it's own root directory, C:\, D:\, etc. This is a seemingly simple way of going about things, but it is actually in some ways more complicated and certianly less flexible than the way things work in *nix. In *nix in general, and therefore Gentoo GNU/Linux, There is one root directory, /. Within this directory, there can be many hard drives, ramdiscs, removable media.

In DOS, you had to have one physical partition which was your system partition. However in linux, / can be broken up into as many physical partitions across as many devices as you want, because this heterogentity is transparent to any programs you run (i.e. a program sees /etc as /etc whether or not it is on the same partition or even the same device as the root directory). The real key to wrapping your mind around the *nix filesystem is this. In DOS/Windows, you had drives which contained directories. In *nix you have one directory, which contains everything. It's almost zen really :? . Well almost.

This creates the need to mount drives, or assign a directory within the root directory for the filesytems contained on the partitions to reside. When you mount a device in the root filesystem, lets say for instance you mount the boot partition at /boot, the directory /boot becomes a link in a sense to the physical boot partiton. Which may lead you to ask "if /dev/hda1 is my boot partition, and I mount it at /boot, then what is /dev/hda1?". The answer is it is a device node, which I will explain a little more about that later. You'll also notice that when you unmount the boot partition, it still contains files. These files exist on the root partition, so even if you mount the boot directory at /boot, those files don't dissappear, the /boot directory simply stops pointing to thier location on the root partition (this is all very abstract, so please don't post corrections saying that this is not exactly true).

The proc filesystem is an example of another advantage of the *nix directory structure. The proc filesystem doesn't exist on a hard disk, it exists in ram, and contains files concerning the state of the kernel and running processes (proc stands for processes, see :) ). Go ahead and look around in /proc. You'll notice that there are numbered directories, and if you run ps -e, you'll also notice that the numbers of these directories match the PID's of your running proccesses (at least they should, otherwise you might have a LKM trojan 8O ). Inside the directories you'll see files containing information on the process and it's status.

In fact, programs read from the proc filesystem all the time to give you information on the status of your system. lspci for example reads from /proc/pci. Don't belive me? Type cat /proc/pci, look familiar? Even ps which you used just a minute ago reads from /proc to give you a list of running processes.

What's really cool about /proc though is that, despite the fact it exists in ram, you can look at it as if they were files on your hard drive. Pretty cool eh? /dev and /sys are other examples of virtual filesystems which exist in ram, but are mounted within the root directory.

When we say /dev/hda1 for example, we are reffering to a device node hda1 contained within /dev, which points to or represents the first partition on the first hard disk. The device node itself however is not the drive, it exists in ram. It is also not the same as a mountpoint. The device node is a file which represents the physical drive, where as the mount point could be said to represent the filesystem contained on the drive. If you need me to clarify that more I can, but hopefully your starting to get it.

/dev also contains other interesting device nodes. For instance, it contains the always fun /dev/urandom, which is the node for the random number generator. Just do cat /dev/urandom and you should get a random and infinite garble or characters filling your screen.

There are also nodes which represent your tty's or virtual terminals and pts's which are your xterms/aterms/eterms/whateverterms. For example start X and open two xterms or whatever terminal emulator you prefer. Then in the first term you opened, type echo Hello Dave > /dev/pts/1. "Hello Dave" should be printed to the second terminal.

Then there is /dev/null, which is like the "black hole" device node. Anthing you send to /dev/null will dissapear forever 8O . My location used to read UMD a.k.a. /dev/null :) . Not very funny eh? Well I'm a nerd what do you expect. I got rid of it because it is very un-original.

Hope that answers some of your questions, I'd be happy to answer any more if I can. :D
_________________
"That question was less stupid; though you asked it in a profoundly stupid way."
I'm the brains behind Jackass! | Tutorials: Shorewall


Last edited by Sith_Happens on Wed Mar 09, 2005 7:10 am; edited 3 times in total
Back to top
View user's profile Send private message
shouldbesleeping
Tux's lil' helper
Tux's lil' helper


Joined: 10 Feb 2005
Posts: 147

PostPosted: Wed Mar 09, 2005 7:05 am    Post subject: Reply with quote

Thanks Sith Happens! and everyone else it really is kind of zen like and mind expanding!

It's like taking the red pill...I just noticed how compiling looks like matrix code

whoa!

thanks again!
_________________
Being on the lower end of geniuses, I have to try a little bit harder than most of them. It still beats being a supreme moron.
Back to top
View user's profile Send private message
Sith_Happens
Veteran
Veteran


Joined: 15 Dec 2004
Posts: 1807
Location: The University of Maryland at College Park

PostPosted: Wed Mar 09, 2005 7:07 am    Post subject: Reply with quote

Sure thing. Linux is pretty cool. Just call me Morpheus. 8) Although I would say cat /dev/urandom probably looks more like matrix code than compiling IMHO. Read it again though, because I was probably editing it while you were reading it the first time.
_________________
"That question was less stupid; though you asked it in a profoundly stupid way."
I'm the brains behind Jackass! | Tutorials: Shorewall
Back to top
View user's profile Send private message
Bob P
Advocate
Advocate


Joined: 20 Oct 2004
Posts: 3355
Location: Jackass! Development Labs

PostPosted: Sat Mar 12, 2005 4:34 pm    Post subject: Reply with quote

that is a nice post. :wink:
_________________
.
Stage 1/3 | Jackass! | Rockhopper! | Thanks | Google Sucks
Back to top
View user's profile Send private message
Gripp
Tux's lil' helper
Tux's lil' helper


Joined: 02 Mar 2005
Posts: 99

PostPosted: Thu Mar 17, 2005 7:23 am    Post subject: Reply with quote

holy piss sith!
you just answered almost every "huh?" i had during the install in one simple, but very concise... swoop!
this should spend more time @TT

so... ^^TTT^^
Back to top
View user's profile Send private message
Sith_Happens
Veteran
Veteran


Joined: 15 Dec 2004
Posts: 1807
Location: The University of Maryland at College Park

PostPosted: Thu Mar 17, 2005 3:09 pm    Post subject: Reply with quote

Maybe I'll expand on this and put it into the Documentation forum. It seems to be very helpful to some people.
_________________
"That question was less stupid; though you asked it in a profoundly stupid way."
I'm the brains behind Jackass! | Tutorials: Shorewall
Back to top
View user's profile Send private message
Budro
Tux's lil' helper
Tux's lil' helper


Joined: 17 Aug 2002
Posts: 91
Location: MD, USA

PostPosted: Thu Mar 17, 2005 4:51 pm    Post subject: One thing I remember about DOS drive letters Reply with quote

I think since Windows 2000 you could remap partitions to drive letters but not in Win 98 and below so the disk orders for dos/win for "drive letter assignements" is that it looks at the first partition of each pysical disk for drive letter.

Hope I am gettings this correct...

For this scenario:
-----------------------
Primary master - one full partition = C:
Primary secondary - CDROM = E:
Secondary master - one full partition = D:

Splitting it up thhe disks:
------------------------------
Primary master -- two partitions = C: E:
Primary secondary - CDROM = G:
Secondary master -- two partitions = D: F:

Something like that....
Back to top
View user's profile Send private message
Gripp
Tux's lil' helper
Tux's lil' helper


Joined: 02 Mar 2005
Posts: 99

PostPosted: Thu Mar 17, 2005 5:49 pm    Post subject: Reply with quote

i have a bit of a question for you about swap partitiions...

my understanding of it is that it acts as extra RAM... not completely sure tho
i would guess that as it resides on the HD it would be slower than normal ram, but atleast stops possible limitations...
if i'm wrong, maybe you could explain??

this leads to my real question... you showed that the /proc folder is basically reading directory from memory... is that the hardware RAM or the swap "RAM" or both?
if it isn't both, which does the /proc folder read? and how can you view the contents of the other???
if it is both, how can one differentiate which process is running from which location??

also, i was wondering about the directoy structure below the /mnt/gentoo point...
does only exist as a "figment" of the computers' imagination while having the boot disk loaded?? or are those folders always there, only hidden?
i guess that could be anwsered by saving a file to say /mnt then rebooting without the disk, then rebooting again with the disk and seeing if the file is still there
if it does still exist during normal use, how would one access that file without using the boot disk?
Back to top
View user's profile Send private message
Sith_Happens
Veteran
Veteran


Joined: 15 Dec 2004
Posts: 1807
Location: The University of Maryland at College Park

PostPosted: Thu Mar 17, 2005 6:37 pm    Post subject: Reply with quote

Gripp wrote:
my understanding of it is that it acts as extra RAM... not completely sure tho
i would guess that as it resides on the HD it would be slower than normal ram, but atleast stops possible limitations...
if i'm wrong, maybe you could explain??
Well you are exactly right that swap has the same purpose as RAM, to provide memory for actively used and actively changing information. You are also correct in that since it resides on the hard drive, the data transfer rate is much much slower than RAM, and that it's purpose is to allow additional memory beyond RAM.
Gripp wrote:
this leads to my real question... you showed that the /proc folder is basically reading directory from memory... is that the hardware RAM or the swap "RAM" or both?
if it isn't both, which does the /proc folder read? and how can you view the contents of the other???
if it is both, how can one differentiate which process is running from which location??
Well the /proc filesystem is an attempt to provide information about the kernel and running processes in a heirarchical manner. It is not however showing all the data contained in ram. The proc filesystem itself does exist in RAM, not in swap. There are programs that allow you to read data stored at a particular address in RAM (grub for instance has this ability), however such data is really only useful for the writing and debugging of code. A particular process can have runtime data stored in both ram and swap, you can see how much a process is using of each using top. However, unless you run out of RAM, your swap is not going to be used. My computer for instance, has a gig of ram, and I have 1 gig low mem support enabled in my kernel, so I never run out of RAM.

You might however notice that Linux seems to use more RAM than Windows for example. This arises however because of a difference in the way Linux and Windows handle RAM. Windows only shows memory that is currently being used by running processes, where as Linux shows memory taken up by libraries that have been loaded into memory by previously running processes, and stay resident in memory in case they are needed again later. This isn't a bad thing however, and it doesn't involve a performance hit. If that memory is needed later by a running process, then the "used" memory can be reallocated. For example, when I used to use KDE, I would have nigh on 800 megs of RAM being "used" after I had been running it for a day or two. With fluxbox it stays around 250-300 megs.
Gripp wrote:
also, i was wondering about the directoy structure below the /mnt/gentoo point...
does only exist as a "figment" of the computers' imagination while having the boot disk loaded?? or are those folders always there, only hidden?
i guess that could be anwsered by saving a file to say /mnt then rebooting without the disk, then rebooting again with the disk and seeing if the file is still there
if it does still exist during normal use, how would one access that file without using the boot disk?
The directories below /mnt/gentoo exist on your root partition. As I explain above, a mount point isn't the drive itself, it is simply a directory within the root filesystem which "contains" the filesystem on some device. When you boot with the live-cd, or any boot disc for that matter, it loads an image of a root filesystem into ram. So I guess you could say the live-cd's root filesystem exists as a "figment of the computers imagination", since it exists only in RAM and not in physical memory. This is done sort of like the /proc filesystem, only now the entire filesystem exists in ram.. So before you chroot bash, / actually exists in ram.

When you mount your root partition at /mnt/gentoo, the directory /mnt/gentoo points to the root partition, as opposed to a location in RAM. Then, when you untar the stage, all the data and directories contained within exist on the root partition. So, if you were to unmount the root partition during the install, it would seem that all data that used to be in /mnt/gentoo dissapeared, however it still exists on the root partition, /mnt/gentoo however now points to an emptry location in RAM rather than the root partition. If you remount the root partition at /mnt/gentoo, you'll see the data is still there. However, if you don't mount a hard drive parition at /mnt/gentoo, and you save a file there, it will be saved into RAM. If you were to reboot, then that data would dissapear as soon as the RAM was reset. If that isn't clear I would be happy to explain it a little more. :)
_________________
"That question was less stupid; though you asked it in a profoundly stupid way."
I'm the brains behind Jackass! | Tutorials: Shorewall
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum