Partitioning for Linux - part 1: the why

Posted by: Rea Maor In: Linux and Unix - Tuesday, June 5th, 2007

This time, let’s really get to the bottom of this. So, here’s a shot at partitioning and what it means to Linux, BSD, and other Unix systems, with no computer-scientist babble.

What partitioning is, is the act of figuratively breaking a hard drive up into many smaller drives. Partitioning is what you could call a kludge, in the sense that it’s a work-around to solve a problem that could have been avoided if only we’d planned this whole computer revolution better.

See, originally, PC-type computers were built to have one small disk, and use all of that disk. A 300MB hard drive would not have needed partitioning. Then hard drives got bigger and bigger. Meanwhile, motherboard manufacturers kept programming their BIOS the same old way. Nobody at the time dreamed you’d ever want to run anything but DOS or OS/2 on a desktop PC. Unix was still chugging away on mainframes in the server room - a million miles from the home computer market.

Having hard drives expand in size from hundreds of Megabytes to hundreds of Gigabytes (and Terabytes are just around the corner!) while the rest of the computer keeps the same basic design principles since 1992, introduces all kinds of new logistical problems:

  • Access speed: the bigger the disk, the bigger the master file table (which is like the index in the back of a book). Seeking through 30 Gigabytes of data looking for the beginning of the file you want takes longer.
  • Data safety: In the old days, 300MB equated to 250MB for the software, plus a few MBs of your files. If the disk goes bad, your files could be backed up to floppies and your still have the original disks your system came on, so you’re out nothing - with some luck - or very little if you were unlucky. But 300GB is enough to store your whole life! When a 300GB disks bites it, you could conceivably lose so much more; if you have 20GB of stored MP3 movies, are you telling me you have backups for all of that on your shelf right now? Hence the problem.
  • Special purpose data storage: Now that our PCs are these howlin’ multimedia boxes, it no longer makes sense to treat a 2-hour movie and an office text document the same way. As we keep coming up with newer and niftier things to do with a computer, we have to find more efficient ways to use that hardware.
  • Dual-boot set-ups: Since IDE controllers come two-to-a-motherboard, and each of them can handle two disks, that’s four disks right there. The ability to have multiple disks eventually led to demand to be able to boot more than one operating system from the same machine. This is actually a dead necessity in the IT industry: if you want to write a program that will run on several systems, you’ll want to test that program out on each system.
  • Retro hardware: Many PCs still have motherboards where the BIOS comes up, beeps, and looks for the first byte of data on the hard drive. It finds it and says, “That must be the operating system; I’ll pass control over to that and be done.” Thus, many machines still need to keep their boot partition on sector one of the disk - which can be a “bootloader” which can point the operation to several disk sectors down the line which each have their own system.

All of these problems are solved, more or less, by partitioning. A typical example of a partition scheme may be thought of this way:

|–boot–|-swap-|——Windows——|—-Linux—-|—-BSD—-|

So, the computer behaves as if disk one were actually five disks. ‘Boot’ just brings the computer into a barely usable state and most likely asks which system to chain execution to. The Windows partition will be formatted in NTFS, perhaps. The Linux partition may be formatted in ext3, and the BSD partition in FFS. All of these different file systems are native to their respective operating systems; there is no standard and hence they’re all incompatible! But by partitioning, we can safely tell the machine to keep hard boundaries which isolate all actions to the small area of the disk we want to work with now.

Hopefully, you have a better understanding of why we have to deal with partitioning. Next installment, we will discuss the ‘how’, as well.


Related Posts:


3 Responses to “Partitioning for Linux - part 1: the why”

  1. Coop Search Says:

    can you tell a way by which i can have apache web server on the same windows installation as my net connection.

    My net connection uses a proxy..so when install apache with port 80 access it gives an error on start up.I am trying to teach myself some perl CGI scripting..So presently i am using another windows installation on another partition just to use apache server.I want to reduce the burden on my hard dis due to the new windows install.

  2. Rea Maor Says:

    You dont actually need any connection to the net to use it,
    you can just install it locally and use 127.0.0.1:80 (or your local network address) to load it up
    also you can change the default port, to whatever you want.

  3. Coop Search Says:

    actually i am using it on a separate windows installation that does not have net software installed. But when i try to install it on the windows installation on which the net connection is installed by creating a home network it says a server is al dready installed and apache cant start.it then exits. I dont want to remove the other server, but still want to use apache.Hope i made sense..

    the error i get is

    Only one usage of each socket address is normally petmitted. :make_sock could not bound to address:0.0.0.0:80
    no listening sockets available , shutting down
    Unable to open logs

    But i could not find the process that was using the socket address to stop it. I don’t want to use port 8080. I was unable to run my programs with that option.

Leave a Reply