Partitions
BOF
bof
Mon May 17 11:28:30 PDT 2004
Randy Donohoe wrote:
>I'm going to set up a notebook with a 6GB HD this weekend. Windows 2000
>Server is getting 3GB and Red Hat 7.2 is getting 3GB. The Red Hat side
>will be divided into /, home, swap, var, and temp. Swap will get 250MB.
>How should I divide the remaining 2.5GB between /, home, var, and temp?
>
This is a question that can be answered entirely differently by everyone
who does, because it is entirely a matter of opinion and experience and
personal preference: you may, in the immediate future, regret having
posted it <g>. Having warned you, here is my scheme for a 3.2 disk with
128 MB RAM.
Make sure you install Windows first. Windows likes to reside in the
first partition, and will overwrite the boot sector. It's easier to get
RH to see it than the other way around.
One option, which you have apparently rejected, is install simply using
a swap and a / partition. This eliminates problems if you choose the
wrong size for a partition, but is not as good as partitioning. As you
may know, partitioning imposes a size limit on what can go into the
partition, so that if you have a runaway program, it will fill, say
/temp or /var and then fail. Without partitions, it will fill up the
entire hard disk. Also, partitioning is more secure, since it allows
permissions (like NOSUID or RO) to be assigned to the partitions in the
/etc/fstab.Your choice of what you want to use as a scheme is a good
choice, but I thought I would mention the swap and / as an alternative
in case you had not considered it.
I prefer to chose the "custom" setup during installation, as it allows
more latitude in paritioning and chosing what is installed. Prior to
7.2, this was the only way that you could customize the disk
partitioning, but with 7.2, if you choose the laptop option, it should
allow you to manually partition the hard drive. Also note that the
workstation and laptop options will not install any xinetd services
(like telnet, ftp, finger or talk. You can still use these get out of
the system, but the daemons will not run, and no one will be allowed in.
This is for security).
RH 7.2 uses swap space more aggressively than previous versions, and so
recommends that you allocate twice your physical memory for the swap
space, depending upon the amount of memory. I tend to follow this.
You don't need to use one, but I recommend a /boot partition. The RH
Installation Guide recommends 50 MB for this, but I have used as little
as 7 and been OK. 10 - 15 MB will be fine. Note that I use LILO, and so
the kernel (vmlinuz file) resides here, and so you will have to allow
for this if you want to boot multiple kernels. My kernel tends to about
800 MB. If you choose too little, the installer will complain, and I
believe that 7.2 will suggest about 20.
I like to use a multiple of my memory (128 MB RAM) for /var and /temp.
There is no reason for this, but I just do. 64 MB for /var should be OK;
128 - 192 for /tmp. I use /tmp as the location from which to install
software packages, uncompressing them and running the installation. I
have been bitten once or twice with too little /tmp space, so I tend to
fo a little larger and use 192. If you don't plan on doing a lot of the
"make install" type of installations, and stick with .rpm-ing, then you
might get by with as little as 64 MB. Also you can link to /var/tmp to
/tmp and save some space there.
Of the remaining space, I think you will need at least 1.5 GB for /, and
2 would be better. Again, it depends upon how much additional
third-party software (like Star Office or games) you plan on installing
above what RH installs. I like to err on the large side, as the last
thing I was is a full / partition. I personally also like to use a
/usr/local partition for installing my third-party software (like Open
Office, Port Sentry, Tripwire and WordPerfect) to avoid having to
reinstall these programs if I update my system or reinstall it. This is
a matter of preference, and with a hard disk this small, there isn't
much room so I may not do this and just use a / partition.
What is left over after you allocate everything else is what you
available for /home.
Thus with my 3.2 GB drive, and 128 MB RAM, this is what I ended up with
swap 256 MB
/boot 10 MB
/var 64 MB
/tmp 192 MB
/ 2000 MB
/home 500 MB or so --- whatever is left over
The 500 MB for home is OK but doesn't allow a lot of room if you like to
download images or music files. You'll have to be very judicious in your
pruning, and move what you want to keep, but don't use, to floppy, zip,
or CD.
The scheme I have suggested above is OK , if you are installing RH to
learn it. If you are installing RH to use it as your primary OS and
need to keep Windows, you might want to buy a bigger HD. A good 20 MB
IBM is now about $120.
If you chose the wrong partition sizing scheme, the worst thing that can
happen is that you run out of space during installation and have to
reinstall. The second worst thing is that you finish the installation
and find that you have allocated too little space for the / partition.
So, once you have gotten through the installation process, and can log
on as root, then run "df -h" to see how much of each partition you have
used. If it looks like you allocated too little space based on the
percentage used, you can immediately reinstall to adjust the size.
Reinstalling costs about an hour in time, most of it waiting for the
installation to write the programs to the disk. It is better to
reinstall immediately than later, after you've set everything up. (The
latter is free advice, based upon experience <g>).
Hope this helps.
BOF
More information about the Linux-users
mailing list