LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Space requirements and Partition scheme (https://www.linuxquestions.org/questions/linux-newbie-8/space-requirements-and-partition-scheme-191180/)

linmix 06-08-2004 01:59 PM

Space requirements and Partition scheme
 
I'm trying to figure out how much space I'm going to need for my Linux installation(s), partly because I'm using a dual boot system and also because I'd like to try out some distros.

The mag my SuSE 9.0 CD1 came with said 2GB was the minimum required, but when I started installing I filled those up in no time (what is a good percentage of free space on any Linux partition? with 192MB ram how big a swap file should I create?). Now I'd like to know which directories (apart from /home) I might want to move to a different partition and how to do that after installation. Also where would you suggest I install (make) programs that do not come with the distro originally?

I know linux is nothing like windoz but just to give you an idea of along which lines I'm thinking. I've currently got Win98 on C with 2GB, programs on D with 7GB, a web folder for offline reading and projects (E) of 4GB and a huge F for personal files (linked into my linux /home directory)

m_yates 06-08-2004 02:41 PM

There is no perfect way to partition. You'll probably get lots of opinions. I think 5 GB is enough for your main installation. I've heard that a good rule of thumb is to double your RAM with swap space, so maybe a 200 MB swap partition is enough. It is a very good idea to keep your /home directory in its own partition. That way you can re-install your operating system if needed without overwriting your data in /home. There are also some security advantages of having /boot on a dedicated partition, but I don't do that for my desktop (Maybe I should?)

Good partitioning information is available from Gentoo: http://www.gentoo.org/doc/en/handboo...?part=1&chap=4

In my case, I have a 120 GB drive that has 3 partitions. I gave 20 GB for / directory, 1 GB for Swap, and the rest of the drive for /home directory. I don't ever use the swap space that I have, so it could be much smaller, but I have a big drive, so I have it if needed. I currently have gnome, kde, openoffice, mozilla, several kernel versions, and a host of other applications installed on my Debian box and I use 3.3 GB in my / directory.

jschiwal 06-09-2004 05:54 PM

Besides /home, a directory that takes up a lot of space is the /usr directory. This is were the new programs that are installed go, so if you don't have a seperate /usr partition, make sure your root (/) partition is large enough ( about 2/3 the size of your /home directory ). If you have a seperate /usr directory, the root directory can be relatively small.

The /usr directory will contain both packaged programs you install, as well as the programs and libraries installed from the source tarballs. This includes the documentation and manpages. The /usr partition contains a similar hierarchy as the main system ( /usr/bin, /usr/sbin/, /usr/lib, etc ) and anything installed later (with the exception of /etc and your user directories) go into the cooresponding /usr subdirectory.

The /tmp directory may be used for the temporary .iso files produced if you use k3b to burn cd's. If you plan to burn dvd's you may need to plan an extra 5 GB in the partition that contains this directory. (Although it is possible to change were the temporary image is stored in the k3b setup).

If you add a new hard drive in the future, and you want to move your home partition there, you can copy files from the /home partition to this drive (after formatting it of course ) and then edit the /etc/fstab file so the /home directory is mounted on the new partition. You may need to reboot afterwards (rather than remounting), to make sure that all processes are using the new /home directory.

Hint: read the 'man tar' page. There is an example near the end on how to pipe through tar to preserve permissions and copy entire partitions, even between two networked machines. Since you would be using the same computer in this case, you don't have to worry about invalid file or group ownerships.

linmix 06-10-2004 08:31 AM

Thanks for the tips. I'm still trying to fgure out which distro to use so yesterday I tried installing Mandrake 8.0 (from a promotional CD - cd1 of the pachage) and even though I specified a /usr partition it tried to install everything to the / partition. Why would it do that? What may I have done wrong, or don't all non OS programs (I mean anything that isn't needed to run the OS) go into /usr? What's the difference between /usr and /usr/local?

btmiller 06-10-2004 09:22 AM

Mandrake 8.0 is fairly old -- you probably want something a bit more current. People seem to be having good results with Mandrake 10.0 official.

What do you mean when you say it tried to install everything to the / partition? Linux just installs things in the proper directories (e.g. /usr/bin, /usr/lib, etc.). If /usr is on a separate partition, stuff installed into /usr goes onto that partition. It's not like Windows where there's a C drive, D drive, etc. -- everything is integrated into one directory tree. Also, some programs go into /bin and some libraries into /lib, because the OS needs them from the start, even before the /usr partition gets mounted. For example, the init program itself (the program that runs first after the kernel is done initializing and mounts all of the other partitions) obviously needs to reside on the / partition.

Generally, packages installed by your distro's package manager go into /usr whereas ones you have compiled yourself go into /usr/local. There's no hard and fast rule for this, and it doesn't matter that much if both /usr/bin and /usr/local/bin are in your PATH.

linmix 06-10-2004 12:47 PM

I see what you mean, but maybe you can straighten a few things out for me:
  • You say /usr/bin and /usr/local/bin must be in my PATH. But what IS my PATH
  • When I said / I meant Mandrake gave me the option asign a /+sth to the directories I was going to use for installation, so I assigned / to one and /usr to another. 'Spose that's not the way then?

Dunno if I want to use Mandrake 10 'cos I have Linmodem (got it working last time i tried on Mandrake 8.0) and it appears there's no drivers for Kernel 2.6 which I believe Mandrake 10 comes with.

As for windows not being like Linux, I think I understand why you say so, but the thing is that I tweaked it to put my programs in a different partition and my documents in yet another. I'd like to do something similar with my linux installation, so I want to know how to do that and then of course where I should put everything.


All times are GMT -5. The time now is 02:08 AM.