SWAP Partition

Plunk that CD/DVD in your computers drive. Okay. Now is the moment of truth. We've got the CD/DVD in the drive, and we're ready to go.

Restart the computer.

One Big Partition?
This should now boot the Linux kernel located on your CD ROM. What you'll have to do first is partition the hard drive. There is an easy way to do this. You can dedicate the whole hard disk or non-Windows partition (depending on the type of install you're doing).

There is a better alternative?
Yes. The better alternative is to partition your hard disk even further and put "parts" of Linux on separate partitions.

For example, this is the scheme that works for me: Let's take a 1 Terabyte hard drive as an example.

First, you should see how much RAM you have. From this figure, you create what's known as a SWAP partition. This is simply a way that Linux uses to get an extra memory when it runs out of free memory. Physical RAM is very very fast. Many times faster than your hard drive I/O. Your computer will put things in and out of RAM as it needs too. However, if you run out of RAM, then your computer will start to use your hard drive to temporarily save information too. This is called "SWAPPING", and is generally a bad condition to be in. Systems that are "swapping", are not able to take advantage of the very very fast RAM, and instead rely on slow disk I/O. Thus, slowing down the entire system.

It is recommended that the amount of SWAP space that is allocated to a system is twice the amount of physical memory (RAM) that is installed in a computer. Of course, this depends upon the amount of hard disk space available for the system (although this "recommendation" dates way back and doesn't apply so well on modern systems).

So if you've got 8 gigabytes of RAM, the feel free to make an 16 gigabyte swap partition. In today's world, hard disk space is so plentiful, that you really can't go wrong with over doing it...


Then my partition scheme ends up looking like this:

Partition Location      Size
------------------------------
swap /dev/hda2 20 gb
/ /dev/hda1 80 gb
/usr /dev/hda3 300 gb
/home /dev/hda4 600 gb


The nice folks over a Ubuntu have written up a wonderful SWAP-FAQ. Feel free to pop over to them and read all about how to change swap sizes, and what they recommend you use when setting up a swap partition.

Assign partitions to look like this. Don't worry about the /usr and /home parts. That will come after. You must indicate here that you want / to be the bootable partition. /usr will contain most of the programs that will run on your machine. /home will contain your personal files. This kind of a partition scheme may come in handy if you have problems with your hard disk. You may be able to save information if it's located in different partitions easier than if it were only one big partition.
Before we actually assign the other partitions their places and functions, we need to initialize and activate the swap partition. Do this now.

Now you should initialize the / partition - the one that will boot the Linux kernel.

Now, there is what I consider a little glitch in the Debian install. It doesn't really take into account that you want to initialize /usr and /home partitions. Don't go to the next step yet. You should go back and initialize these partitions now before proceeding.

  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

Adding a range/block of ips

As an example to add a /24 253 ips to a linux server follow these setups. We'll use...

How can I check my hard disk usage in Linux?

Once you are connected to the server via SSH, run the following command:# df -hThis will output...

Test If Linux Server SCSI / SATA Hard Disk Going Bad

One of our regular sends us a question: How can I test if my hard disk is going bad? I see few...

How to Find Out Hard Disk Specs / Details on Linux

Linux comes with various commands to find out information about your hard drive. I recommend...

Monitoring Hard Drive Health on Linux with smartmontools

S.M.A.R.T. is a system in modern hard drives designed to report conditions that may indicate...

Powered by WHMCompleteSolution