LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-24-2005, 07:19 AM   #1
kingtas
Member
 
Registered: Sep 2004
Distribution: RH9
Posts: 36

Rep: Reputation: 15
What exactly lies in /


Hi,

I'm planning on using a second drive to cp all of my directories into for non-critical backup (dev. etc, usr, home...).

So in case of failure, all I have to do is reload the OS and cp the directories back into place.

Is there anything wrong with doing it this way?

And what is is the /? Is this just the Kernal, or is there something else there?

Thanks,

Tom
 
Old 01-24-2005, 07:47 AM   #2
atom
Member
 
Registered: Feb 2004
Location: Slovenia
Distribution: archlinux
Posts: 271

Rep: Reputation: 31
ok. Big explaining to do here (not that i'm bothered )

in short, / contains EVERYTHING you have on your computer, even devices (yes, your soundcard is there also! in /dev/ folder. And even the state of your processor is written in /proc/) interesting, isn't it?

In long, there is a bit more detailed explanation.

Here is what a ls command throws out on my machine.
Code:
atom@saturn / $ ls --all -1
.
..
bin
boot
dev
etc
home
lib
media
mnt
opt
proc
root
sbin
sys
tmp
usr
var
atom@saturn / $
Ok, so here's the explanation.
ls --all -1 The command to list the files in directory, list all of them and list them in a column, rather than using less space and listing them in paralel.
. and .. they both lead to /, since this is the topmost directory in the filesystem
bin there are most of the commands here. Since the commands are standard, there is no need to back them up, they get included with every distro
boot the kernel is in here, just as is the boot loader. you might want to back that up, especially if it works .
dev no files here, just devices. (i'm actually wrong here, because everything on unix is a file, even your graphics card, but for simplicity...)
etc this is an important place to start backing up if you have made any changes to the configuration of your sistem. All configuration files should be kept here, in one centralised place.
home this direcory contains all user's files, personal profiles, histories, program options, configuration, etc. This is the only place that is a must to backup
lib the meaning of this directory is somewhat unclear to me, but it's name tells it keeps system libraries. Never backed it up and i'm still alive.
media i've left this one in on purpose, even though it's non-standard. It contains all the files my users share (presentations, music...)
mnt nothing to back up here, contains the external devices you have mounted as filesystems (cdroms, windows partitions, floppies...)
opt optional... software. No need to back up IMHO, but it might be a good idea if you have anything you have dug up over the centuries saved there. (i'd have that in my home anyway)
proc this is a filesystem that is truly imaginary. It has the current computer state saved in there and it has absolutely no value to back up
root the root user's home directory. You should back that up or have your account deleted by the angry administrator... wait, that's you
sbin the root user's special chest of tools. No need to backup
sys don't really know what's in there, but i guess that's because only programs need it, and not you. no backup.
tmp like the name tells, temporary files. No need to backup imho.
usr programs. the /usr most closely resembles the c:\Program Files on windows. Unless you are a psycho and want to preserve every single file on your comp you do not back that up. You reinstall the updated programs.
var if you are running a server it might be a good idea to back this up, because apache, mail servers and most of the others keep their files here. If you are running a strictly office workstation there might be no need to back it up.

I'm not 100% in all of these, but I stand behind my word. This is how i would have done my backup (and have done) and it never failed yet. Some users might have different experiences but this is mostly it.

Hope some of this comes in useful,


Gasper

Last edited by atom; 01-24-2005 at 07:53 AM.
 
Old 01-24-2005, 07:57 AM   #3
atom
Member
 
Registered: Feb 2004
Location: Slovenia
Distribution: archlinux
Posts: 271

Rep: Reputation: 31
+ you might not want to just [back up the entire system], i'd really just start over from the beginning
(copy over the /boot/, and consult my world file in /etc/ to see what software I have installed,
and just say emerge world. On gentoo it works so well ...
Then copy over the user files and the system would be up and running better than it was.)

If you want to make a thorough copy though, i'd recommend norton ghost or something like that, make an image of the partition and just paste the image back,instad of the whole system.
 
Old 01-24-2005, 08:28 AM   #4
kingtas
Member
 
Registered: Sep 2004
Distribution: RH9
Posts: 36

Original Poster
Rep: Reputation: 15
Thanks for the detailed explanation, Atom. That went further than the Redhat Linux 9 Bible that I have.

But, does anything live in the / besides the directories you mentioned - is the Kernal there? Where is the Kernal, the OS - like the Windows directory in Windows that houses all the nasty DLLs?

I thought that the / was the root directory - why have a sub directory called root?

Tom
 
Old 01-24-2005, 08:37 AM   #5
atom
Member
 
Registered: Feb 2004
Location: Slovenia
Distribution: archlinux
Posts: 271

Rep: Reputation: 31
ok, there is something we have to clarify here.

root is the user that has all the permissions. /root is his home directory
'/' is also called root, but that is short for the "root of the filesystem", meaning it's the topmost directory. The description for this place has become it's name.

the /boot directory has the kernel. There are no such things as the nasty dll's in windows folder. Such things are called kernel modules and i really don't know where they might be, other than the kernel itself.

the /boot directory also houses the boot manager.

the Kernal that you speak about with such respect is a typo . it's called the kernel and it resides in /boot (yes, the kernel is what i was talking about). it's name on my computer is /boot/kernel-2.6.10-gentoo-r4 and it is the hart of the OS. It actually is linux. On other systems it might also be called bzImage, vmlinuz, etc.

Gasper
 
Old 01-24-2005, 10:36 AM   #6
kevinalm
Member
 
Registered: Oct 2003
Location: Iowa
Distribution: LFS 5.0, building 6.3, win98se, multiboot
Posts: 288

Rep: Reputation: 30
There are several directories, notably /proc and /dev, that should not be cp'd while active. (Trust me, bad things happen. ) You can cp them when the are inactive, say by booting off a live cd. Be sure to use options to preserve permisions and ownerships.
 
Old 01-24-2005, 10:45 AM   #7
kornerr
Member
 
Registered: Dec 2004
Location: Russia, Siberia, Kemerovo
Distribution: Slackware
Posts: 893

Rep: Reputation: 35
One of the best sites for complete newbies: http://www.thelinuxbox420.com
______
That's not mine.
 
Old 01-24-2005, 10:48 AM   #8
kornerr
Member
 
Registered: Dec 2004
Location: Russia, Siberia, Kemerovo
Distribution: Slackware
Posts: 893

Rep: Reputation: 35
And PEOPLE!!!!!
Use Slackware Linux. It teaches you console the first week u have it. Why do use easy distros??? Windows is for lazy guys. But we are not, are we?
 
Old 01-24-2005, 11:06 AM   #9
MylesCLin
Member
 
Registered: Sep 2004
Location: Texas, USA
Distribution: Slack 9.1 with slackware-current packages...
Posts: 164

Rep: Reputation: 30
I agree with Korner, Slackware teaches quickly. (That being no insult or relation to other distros)
 
Old 01-24-2005, 03:39 PM   #10
kingtas
Member
 
Registered: Sep 2004
Distribution: RH9
Posts: 36

Original Poster
Rep: Reputation: 15
Thanks Atom,

That's what I wanted to know - the Kernel resides in /boot.

And the only thing in / is all the aformentioned directories.

And when I'm SU as root user - I'm getting this allowance from /root.
 
Old 01-25-2005, 08:51 AM   #11
atom
Member
 
Registered: Feb 2004
Location: Slovenia
Distribution: archlinux
Posts: 271

Rep: Reputation: 31
slax people, i really don't want to insult your fav distro, and don't want to get into a distro war here, but I really want to mention Gentoo linux. It teaches you as quick as slax, or you never get it up and running. Agreed?
 
Old 01-25-2005, 09:15 AM   #12
kornerr
Member
 
Registered: Dec 2004
Location: Russia, Siberia, Kemerovo
Distribution: Slackware
Posts: 893

Rep: Reputation: 35
__________
Will try someday... but first Slack.
 
  


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
partition and format unpartitioned hard disk which lies on an external usb case odysseus.lost Linux - General 1 08-09-2005 06:03 PM
Where the Difference Lies ? Daejavu Linux - Distributions 20 07-23-2005 03:43 PM
here lies a challenge!!!! jayboogie Linux - Newbie 7 12-20-2004 09:41 PM
software patents and corporate lies yocompia General 24 09-02-2003 04:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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