Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Linux Rough Edges
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
metalh34d
Tux's lil' helper
Tux's lil' helper


Joined: 04 Feb 2004
Posts: 126

PostPosted: Sat Apr 24, 2004 5:24 am    Post subject: Linux Rough Edges Reply with quote

I've been running linux for a year or so now and have gotten more and more satisfied. I like the idea of light weight window managers and I am currently running Kahakai. I started on Blackbox, migrated to fluxbox and then gave kahakai a chance for its eye candy. FVWM is next on my list seein how Kahakai is now a dead project.

Anyway... I run Gentoo on my 2.4C P4 desktop and a slackware clone (vector linux) on my P-mobile MMX Laptop. So I'm very satisfied right now but the little things that I just never learned are starting to get to me. I'll make a list and hopefully people can help me out so when I wipe out my MS hard drive (which I never really boot into anymore) and replace it with reiser4 file system :D I can make my desktop clean and completely functional.

1) Why is it that my clock is 100% nonstable and never keeps its time current.

2) How can I check my partition Free Space/Used Space/Total Space? I've been using df, but it does blocks and not the user friendly gb or mb. Also, I don't know how to check the size of certain files.

3) Is there anyway to create a uniform to the way my apps install? Maybe there is and I haven't seen the pattern yet. So far I've noticed things will either install to /opt/ or /usr/lib/. Any others? How can I tell what app would categorize it to which directories.

4) I noticed a lot of people make a root partition and a /home partition. I've been making just the one root partition but having an extra /home partition would just make things seem a lot more easier when reinstalling the base system. What I think would go on is you set the minimum amount of space needed to install the OS and then when the installation is done basically you mount the /home partition to / thus everything installed and downloaded is done on the /home parition instead leaving the root partition nice and clean and when you decide you need to format you don't lose any of your data or compiled installs. Is that the right idea or a bad idea??? The other idea was that people mounted their /home partitions to /home and /opt. But that goes back to my earlier question on having a uniform to installations...


Feel free to add on, never hurts to know more =)
Back to top
View user's profile Send private message
Plastic
l33t
l33t


Joined: 24 Mar 2004
Posts: 649

PostPosted: Sat Apr 24, 2004 5:48 am    Post subject: Reply with quote

Quote:
1) Why is it that my clock is 100% nonstable and never keeps its time current.
I would also like to know this.
Quote:
3) Is there anyway to create a uniform to the way my apps install? Maybe there is and I haven't seen the pattern yet. So far I've noticed things will either install to /opt/ or /usr/lib/. Any others? How can I tell what app would categorize it to which directories.
Most distros (including Gentoo) like to install applications into /usr/lib, but compiled apps will install into /usr/local/lib by default. As for /opt, some apps prefer to be installed there, so the distro sets it up that way.
Back to top
View user's profile Send private message
Given M. Sur
l33t
l33t


Joined: 03 Feb 2004
Posts: 648
Location: No such file or directory

PostPosted: Sat Apr 24, 2004 5:55 am    Post subject: Re: Linux Rough Edges Reply with quote

metalh34d wrote:

1) Why is it that my clock is 100% nonstable and never keeps its time current.
Search the forums. You'll find your answer.
metalh34d wrote:

2) How can I check my partition Free Space/Used Space/Total Space? I've been using df, but it does blocks and not the user friendly gb or mb. Also, I don't know how to check the size of certain files.
df -h
metalh34d wrote:

4) I noticed a lot of people make a root partition and a /home partition. I've been making just the one root partition but having an extra /home partition would just make things seem a lot more easier when reinstalling the base system. What I think would go on is you set the minimum amount of space needed to install the OS and then when the installation is done basically you mount the /home partition to / thus everything installed and downloaded is done on the /home parition instead leaving the root partition nice and clean and when you decide you need to format you don't lose any of your data or compiled installs. Is that the right idea or a bad idea??? The other idea was that people mounted their /home partitions to /home and /opt. But that goes back to my earlier question on having a uniform to installations...
I'm a little confused as to what you're asking here, but I'll attempt to answer it.

Having a seperate /home partition can be very useful for future reinstalls, but it is obviously not necessary. To do this you need a seperate partition to use as the /home, and then you edit your /etc/fstab so that the partition is mounted to /home at boot. The installation docs explain how to do this in detail.

As for your third question, I have no idea. But, if you search the forums you will likely find an answer.
_________________
What is the best [insert-type-of-program-here]?
Back to top
View user's profile Send private message
s3ntient
Guru
Guru


Joined: 13 Apr 2003
Posts: 304
Location: Lyon, France

PostPosted: Sat Apr 24, 2004 6:06 am    Post subject: Re: Linux Rough Edges Reply with quote

metalh34d wrote:
1) Why is it that my clock is 100% nonstable and never keeps its time current.


Probably because Linux stores time in UTC whereas Windows stores it as local time. So switching from Windows to Linux you'd never get the time right. You can fix this by editing /etc/rc.conf to read "local" where it says UTC.
_________________
http://blog.chaostrophy.org
Back to top
View user's profile Send private message
sak102010
Tux's lil' helper
Tux's lil' helper


Joined: 08 Jun 2003
Posts: 82

PostPosted: Sat Apr 24, 2004 6:17 am    Post subject: Re: Linux Rough Edges Reply with quote

metalh34d wrote:
I've been running linux for a year or so now and have gotten more and more satisfied. I like the idea of light weight window managers and I am currently running Kahakai. I started on Blackbox, migrated to fluxbox and then gave kahakai a chance for its eye candy. FVWM is next on my list seein how Kahakai is now a dead project.

Congrats on sticking with Linux. I've been with it now for about five years, and it's definitely been worthwhile. Here's what I can answer about your questions...
metalh34d wrote:

1) Why is it that my clock is 100% nonstable and never keeps its time current.

I've seen a number of different reasons why clocks drift, but the simple fact remains that they do. I'd suggest looking into NTP so that you can sync your clock with a timeserver and it'll stay current.
metalh34d wrote:

2) How can I check my partition Free Space/Used Space/Total Space? I've been using df, but it does blocks and not the user friendly gb or mb. Also, I don't know how to check the size of certain files.

Try this...
Code:

df -h

...which tells it to outupt in human readable format. Check the man page for 'df', and you might also find that 'du' is pretty handy as well.
metalh34d wrote:

3) Is there anyway to create a uniform to the way my apps install? Maybe there is and I haven't seen the pattern yet. So far I've noticed things will either install to /opt/ or /usr/lib/. Any others? How can I tell what app would categorize it to which directories.

I've often wondered about this as well, and I just don't have any answer but my own speculation. I'll save you that torture. A lot of this type of organization comes from the distribution, though.
metalh34d wrote:

4) I noticed a lot of people make a root partition and a /home partition. I've been making just the one root partition but having an extra /home partition would just make things seem a lot more easier when reinstalling the base system. What I think would go on is you set the minimum amount of space needed to install the OS and then when the installation is done basically you mount the /home partition to / thus everything installed and downloaded is done on the /home parition instead leaving the root partition nice and clean and when you decide you need to format you don't lose any of your data or compiled installs. Is that the right idea or a bad idea??? The other idea was that people mounted their /home partitions to /home and /opt. But that goes back to my earlier question on having a uniform to installations...

Setting up separate partitions is actually very ideal for a lot of different situations. There are good reasons for creating a separate partition for /var and /tmp if your running a server. But your own observations on a separate partition for /home is right on. I've always used one, even if for no better reason than when I want to backup all of my stuff it's very easy. In the case of something tragic happening to your system, you can still rescue your data. Performance increases, etc., etc. There are just a million reasons why it's a good idea.

Anyway, stick to it. You've got to use Linux to love it, and you've got to love Linux to use it.
_________________
Thanks,
Sak
Back to top
View user's profile Send private message
VolcomPimp
Tux's lil' helper
Tux's lil' helper


Joined: 11 Mar 2004
Posts: 135
Location: Newark, CA

PostPosted: Sat Apr 24, 2004 8:53 am    Post subject: Re: Linux Rough Edges Reply with quote

metalh34d wrote:

1) Why is it that my clock is 100% nonstable and never keeps its time current.

2) How can I check my partition Free Space/Used Space/Total Space? I've been using df, but it does blocks and not the user friendly gb or mb. Also, I don't know how to check the size of certain files.

3) Is there anyway to create a uniform to the way my apps install? Maybe there is and I haven't seen the pattern yet. So far I've noticed things will either install to /opt/ or /usr/lib/. Any others? How can I tell what app would categorize it to which directories.

4) I noticed a lot of people make a root partition and a /home partition. I've been making just the one root partition but having an extra /home partition would just make things seem a lot more easier when reinstalling the base system. What I think would go on is you set the minimum amount of space needed to install the OS and then when the installation is done basically you mount the /home partition to / thus everything installed and downloaded is done on the /home parition instead leaving the root partition nice and clean and when you decide you need to format you don't lose any of your data or compiled installs. Is that the right idea or a bad idea??? The other idea was that people mounted their /home partitions to /home and /opt. But that goes back to my earlier question on having a uniform to installations...


Feel free to add on, never hurts to know more =)

1) edit rc.conf and change the setting w/ UTC to local time and it should
track what time your bios is using. It's late so I forget the setting UTC is under.

2) I use konqueror for a file manager because it allows you to tab windows
so you can be in multiple folders at once. You can goto properties
under a folder (or root) and you can see how much space is being used.

3) I'm sure there's a good reason for the structure used for installing linux programs.
I didn't understand it much when I first started out but after a while it's easy to find
out where stuff is. Some programs are retarded and the developers will keep changing
where certain things are located (ex. gdm keeps changing where sessions are located)
but for the most part it's easy to figure that stuff out w/ out documentation or reading
the man or the dev's site.

4) I'm really confused about your last question, partly cause I'm tired but I think
you've got the wrong idea about /home. /home is used for storing user files
which can be settings (for the most part) and I guess ppl like to keep movies and
stuff there or whatever files you'd feel like saving or creating... (docs, pics etc)
that way if you lose your root partition, all your important, non-program stuff and settings
get saved so you're not starting over from scratch. I havn't gotten into this habbit
personally but it's a good practice.
Back to top
View user's profile Send private message
Flammie
Retired Dev
Retired Dev


Joined: 02 Jun 2003
Posts: 633
Location: Dublin, Ireland

PostPosted: Sat Apr 24, 2004 2:23 pm    Post subject: Reply with quote

3) As far as I remember the gentoo policy is to install binary packages to /opt and others to /usr/lib.
Back to top
View user's profile Send private message
teilo
Apprentice
Apprentice


Joined: 20 Jun 2003
Posts: 276
Location: Minneapolis, MN

PostPosted: Sat Apr 24, 2004 4:22 pm    Post subject: Reply with quote

Flammie wrote:
3) As far as I remember the gentoo policy is to install binary packages to /opt and others to /usr/lib.


That's the official story. However, it isn't always the case. Often, /opt is also used to store the compiled version of a package that is more often installed as a -bin package. The foremost example of this is Ximian-OpenOffic. Both the binary, and the compiled versions of the build install the package to the same location. For instance, give that /opt/Ximian-OpenOffice has become the standard location where this is installed, it will cause more trouble than it is worth to change this to /usr/lib/Ximian-OpenOffice. Say you had the binary package installed, and you finally managed to compile the source version (which in the case of Ximian-OpenOffice, is no small feat). It makes far more sense to keep the location the same, so that you do not have to update all your configs.
_________________
Teilo who is called Teilo
Back to top
View user's profile Send private message
zez
Apprentice
Apprentice


Joined: 13 Jun 2002
Posts: 256
Location: Oregon, United States

PostPosted: Sat Apr 24, 2004 5:11 pm    Post subject: Reply with quote

Concerning the clock drift issues, I remember that once my software clock in linux somehow became out of sync with the BIOS clock, which resulted in major drift issues (ie. off by a few hours each time the comp rebooted). IIRC the solution ended up being to set the linux software clock properly and then immediately set the BIOS clock according to linux's clock. This can be done using the following command as root:

Code:
# hwclock --systohc


Linux syncs the software clock with the hardware upon bootup and shutdown, but not right after one sets the time. I might've also deleted the /etc/adjtime file for good measure (that file stores time compensation values?). I'm not sure if this is relevant at all, but maybe it'll help someone out.
Back to top
View user's profile Send private message
Locke
n00b
n00b


Joined: 02 Aug 2002
Posts: 50
Location: Baton Rouge, LA, US

PostPosted: Sat Apr 24, 2004 5:34 pm    Post subject: Re: Linux Rough Edges Reply with quote

metalh34d wrote:
3) Is there anyway to create a uniform to the way my apps install? Maybe there is and I haven't seen the pattern yet. So far I've noticed things will either install to /opt/ or /usr/lib/. Any others? How can I tell what app would categorize it to which directories.


Sometimes this depends entirely on the software. Other times, it depends on how you install (probably best to let emerge do its own thing). If you're using configure scripts, you can do

Code:
./configure --prefix=/some/directory


and it will install libs to /some/directory/lib, binaries to /some/directory/bin, etc.

Quote:
partition stuff


While my partition setup probably isn't ideal, I find that it keeps things organized across installs pretty well. Since I no longer use Syllable I'll be backing up and repartitioning/reinstalling soon though.

hda1 5GB NTFS (C: )
hda2 100MB ext2 (/boot)
hda3 250MB Reiser (/)
hda5 16GB Reiser (/usr; /opt is a symlink to /usr/opt)
hda6 2GB swap
hda7 15GB NTFS (D: )
hda8 1GB Reiser (/var)

hdb1 8GB ext2 (unused, free for future use)
hdb2 15GB AFS (Syllable partition, no longer used)
hdb3 50GB ext3 (/home)
hdb4 1GB Resier (/tmp)

Zyklon wrote:
Probably because Linux stores time in UTC whereas Windows stores it as local time. So switching from Windows to Linux you'd never get the time right. You can fix this by editing /etc/rc.conf to read "local" where it says UTC.


I do this, and it still doesn't work right. Some apps (gdesklets clock) work fine, but others (irssi, date command) are 5 hours behind. Since I'm GMT-5 right now (CDT), I guess it's doing the calculation twice... I just can't figure out why :?
Back to top
View user's profile Send private message
VolcomPimp
Tux's lil' helper
Tux's lil' helper


Joined: 11 Mar 2004
Posts: 135
Location: Newark, CA

PostPosted: Sat Apr 24, 2004 11:41 pm    Post subject: Reply with quote

zez wrote:
Concerning the clock drift issues, I remember that once my software clock in linux somehow became out of sync with the BIOS clock, which resulted in major drift issues (ie. off by a few hours each time the comp rebooted). IIRC the solution ended up being to set the linux software clock properly and then immediately set the BIOS clock according to linux's clock. This can be done using the following command as root:

Code:
# hwclock --systohc


Linux syncs the software clock with the hardware upon bootup and shutdown, but not right after one sets the time. I might've also deleted the /etc/adjtime file for good measure (that file stores time compensation values?). I'm not sure if this is relevant at all, but maybe it'll help someone out.


if set to UTC that won't help
Back to top
View user's profile Send private message
Nate_S
Guru
Guru


Joined: 18 Mar 2004
Posts: 414

PostPosted: Sun Apr 25, 2004 8:39 pm    Post subject: Reply with quote

When I first started out with linux, I remember reading a standard on the way the unix file tree is set up. I don't remember the site anymore but I'll try to give appliciable parts from memory.

/home is for users home directorys. Any user modified documents are supposted to go here because the only directorys that need to be mounted in a write mode are /tmp /home and /var, for security reasons.

/bin is for basic executiables that come with the system eg. cp

/sbin is for executables that only the superuser can use.

/usr is where applications are supposted to be installed.
/usr/bin is for program executable commands, to run the program eg. mozilla. often just a wrapper script.
/usr/lib is where programs are supposted to install their libraries. Sometimes the main executable goes here as well if it's started by a wrapper script.

/etc is for all config files.

/tmp is temp space that is non-persistant. it is supposted to be able to be safely deleted on shutdown, if you so desire.

/var is temp space that is persistant. this one you can't delete on shutdown, but is the place where apps store temp files that are not user-specific, and do need to stay between sessions. Also, some web servers install here.

/opt is almost synonimus with /usr/share. they both are for programs that are either pre-compiled, or, for one reason or another, they need there files stored in such a way that breaks compatibility with the above system. /opt vs /usr/share is more a distro specific thing, and I think gentoo tends to use /opt.

Hope that helps and sorry for my horrid spelling,
Nate
Back to top
View user's profile Send private message
sapphirecat
Guru
Guru


Joined: 15 Jan 2003
Posts: 376

PostPosted: Mon Apr 26, 2004 2:36 pm    Post subject: Reply with quote

Nate_S wrote:
/home is for users home directorys. Any user modified documents are supposted to go here because the only directorys that need to be mounted in a write mode are /tmp /home and /var, for security reasons.

A nice theory, but what about /etc? chfn, chsh, passwd, and mount write to various files there.

Quote:
/usr/lib is where programs are supposted to install their libraries. Sometimes the main executable goes here as well if it's started by a wrapper script.

And being full of executables, /usr/lib is arch-dependent. /usr/share is where arch-independent files go, like pixmaps and message translations.

Quote:
/opt is almost synonimus with /usr/share.

Not really. /opt can have arch-dependent code in it. Generally /opt is used by packages which don't want to install in a standard hierarchy (bin lib share ...) for some reason.

* * *

Also it might be worth pointing out the roles of /usr vs. /usr/local. According to the Linux standard, /usr is for files managed by the package manager (portage) and hand-compiled stuff goes to /usr/local.
_________________
Former Gentoo user; switched to Kubuntu 7.04 when I got sick of waiting on gcc. Chance of thread necro if you reply now approaching 100%...
Back to top
View user's profile Send private message
metalh34d
Tux's lil' helper
Tux's lil' helper


Joined: 04 Feb 2004
Posts: 126

PostPosted: Thu May 13, 2004 4:28 am    Post subject: Reply with quote

lots of help was put in here and all of it was greatly appreciated and absorbed. I know how to check the hard drive free space and ect now in human terms, but I don't know how to check individual files sizes still. Any input on that?
Back to top
View user's profile Send private message
Given M. Sur
l33t
l33t


Joined: 03 Feb 2004
Posts: 648
Location: No such file or directory

PostPosted: Thu May 13, 2004 4:55 am    Post subject: Reply with quote

metalh34d wrote:
I don't know how to check individual files sizes still. Any input on that?

To see the size of a particular file you can use:
Code:
ls -sh filename

Or, to see the size of all the files (except hidden ones) in the directory you can just use
Code:
ls -sh

And, if you also want to see the hidden ones, use
Code:
ls -ash

More info can be found with "man ls"
_________________
What is the best [insert-type-of-program-here]?
Back to top
View user's profile Send private message
Nate_S
Guru
Guru


Joined: 18 Mar 2004
Posts: 414

PostPosted: Thu May 13, 2004 6:52 am    Post subject: Reply with quote

Thanks, Sapphirecat, for the corrections; as I mentioned, that was from the top of my head. As to the /opt vs /usr/share, that was a typo on my part, I meant it was similar to /usr/local, but you are right in that they are somewhat different.

As far as I know, all files in etc are supposed to be written to only optionally, during normal use. Mount, for example, has a /etc/mtab file, to list currently mounted filesystems, but usually /proc/mounts can be used as a substitute. I don't know what files chfn, chsh, and passwd write to in /etc, but I'm thinking it might be something similar, or only for root to change anyways. You would of course have to mount it rw to install new packages, and the like, but since only root can do that, it provides one extra layer of security against users trashing config files. Not for everyone, nor usually necessary, but could be usefull for a desktop at an office or something.

-h, short for --human-readable is a standard GNU option, so it should work with just about any program that displays sizes in bytes. man {ls,df,...}

I googled for the origional page I refrenced, so here it is
Filesystem Hierarchy Standard
http://www.pathname.com/fhs/
Also while searching, I found this page, a bit less technical, possiably easier to understand
http://www.taylexson.org/sag/HTML/c270.htm

-Nate
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things 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