Filing cabinets 101 - An introduction to disk partitions

21 October 2007

Your computer contains a round hunk of metal called a 'hard disk'. This bit of metal spins around inside a drive, a bit like an old-fashioned record player. This is one of the two main reasons your computer makes a noise when it is on (the other reason being the cooling fans).

Thanks to Surachit at the Wikimedia Commons for the following diagram:

Diagram of hard disk

The hard disk is where your computer stores information, the classical metaphor is of a filing cabinet. If your computer is an office (i.e. somewhere that you do work), then your hard disk is the filing cabinet; it is the place where the important papers and documents are stored.

An office may have just one little filing cabinet that just has one draw. Or it might have one full-sized filing cabinet that has lots of draws. Or it might even have several filing cabinets.

So imagine you are the manager and you need to make space in an office for a new worker but there is already one person there in the office. You have three choices:

  • You add another filing cabinet for the new worker (if there is room).
  • You can throw out the existing worker and give the existing filing cabinet to the new worker.
  • You could arrange to share the existing filing cabinet between them both. Imagine one of those Swedish modular storage systems where you can easily change the number and size of draws to partition it into different sections. You might make one draw for the existing worker and another draw for the new worker.

So your computer (the office) might already have an operating system (the existing worker), such as Microsoft Windows. You have three choices of what to do:

  • If it is a desktop computer, then you might be able to add another hard-drive for Linux. This is easier than it sounds, you will need a screwdriver and an extra hard-drive, there are lots of websites that explain this. This will not be possible on a laptop.
  • You can get rid of Windows and devote the entire existing hard disk to Linux.
  • You can share the disk between Windows and Linux. You will create one 'partition' for Windows and one 'partition' for Linux. This is normally achieved by shrinking the existing partition to make space for an extra one. Hard disks are so big these days that normally there is plenty of room.
Dual booting

The choice is up to you. Nothing is permanent in software. For example, you might start with different partitions for Linux and Windows and then later ditch Windows completely when you are happy with Linux.

Again, different people do different things. Some people just like Linux and don't want Windows taking up space that can be used for storing more music or videos on. If you are a naughty boy or girl and have an unauthorised copy of Windows software, then you should think strongly about going legit by just having Linux.

A web developer might have both operating systems so he can easily test his websites on Windows as well. Likewise a high-end gamer might keep Windows around as not all high-end expensive games are available for Linux. For me, there are enough games, but if you want a particular game then you might need Windows for that.

For example, Enemy Territory: QUAKE Wars, Tremulous and Halo 3 are all first- person shooter video games. The first two are available for Linux, the third is not. If you are happy with any first-person shooter then Linux has many, but if for some reason you want Halo 3 in particular then you should keep Windows (even though Enemy Territory is better ;).

There are also more modern setups like 'virtualisation' where you run both operating systems at the same time and in the same partition, for example, you might have Windows running inside a window on your Linux computer, that is a topic for another day.

What is the partition naming scheme?

Linux has a partition naming scheme allows us, but more importantly, the computer software, to tell the partitions apart. The naming scheme is very simple:

Disk Type | Disk Letter | Partition Number

There are basically two types of hard disk, SD and HD, which are explained later (for people who really care). Then each disk has a letter. For example, say you have lots of hard disks in your computer, then the first might be called SDA, the second will be SDB, the third SDC and so on. Lastly, each partition has a number. So SDA1 is the first partition on the first disk, SDA2 is the second partition, SDA3 is the third partition and so on.

So you may end up with Windows on SDA1 and Linux on SDA2. Sometimes people will use more partitions, this is optional. On a server, multiple partitions have important uses, but not really so much for a basic desktop setup.

A 'Swap partition' is the most common. This is used for if your computer runs of of memory; rather than queuing tasks, it can use part of the hard-disk for extra memory. Swap space is slightly irrelevant in really modern desktops that have several gigabytes of memory.

What are the types of disk?

This is somewhat academic for our needs at the moment, but I might as well cover this for completeness.

  • SCSI (commonly called Scuzzy) are used on servers and very high-end workstations from the late 1980s through to today.
  • Parallel ATA (PATA - also commonly called IDE, short for Integrated Drive Electronics), these were the standard PC hard disk type from the late 1980s through to the early 2000s, being much cheaper to produce than SCSI disks.
  • Serial ATA (SATA) - this is the newer type of disk, first introduced in 2003 and now the main type in brand new computers. SATA is also starting to give SCSI a run for its money on commodity/low-end servers.

Scuzzy and SATA disks are called SD, PATA disks are called HD.

Discuss this post - Leave a comment

1 Bug says...

Memory Sticks - SD IDE drives on Archlinux - SD as well [Don't ask me why they started to do that, maybe for easier sorting if people forget if it's hd or sd because they got those and those...].

Posted at 7:24 a.m. on October 22, 2007


2 Jonas says...

"Scuzzy and SATA disks are called SD, PATA disks are called HD"

Not necessarily. My PATA disk is (usually) also named SDx, this is in Kubuntu Gutsy. And the SATA disk sometimes get called HDx.

Posted at 8:51 a.m. on October 22, 2007


What do you have to say?

Show Editing Help

About

Hello, my name is Zeth, I'll be your host here.

Command Line Warriors is about taking control of your own technology, it looks at our experiences of computing; especially using GNU/Linux, the Python programming language, the command-line and issues such as techno-ethics, best practices and whatever is cool now. If you take control of your technology then you are a Warrior too!

This site is your site too which means that you can contribute and get involved. You can leave comments using the facility provided. For me, the comments and discussions are by far the best part of the site. So please do have your say!

Latest Discussions

http://kratosellas.blogspot.com

September 8, 2010
http://kratosellas.blogspot.com ?????????? ?????????
Bremen Travel Snaps

kristengreen

September 8, 2010
Hello,http://www.jumancuso.info - May i sex dating with you?
OOXML Vote Coverage

play solitaire online

September 8, 2010
Thanks for sharing this link, but unfortunately it seems to be down... Does anybody have a mirror or another source? Please answer to my post if you do! I would ...
Better Python Console 0.2.5

tixartich

September 7, 2010
http://thesecretstofarmville.com - Farmville Cheats
Burning an iso to CD on Windows

kristengreen

September 7, 2010
Hello,http://www.jumancuso.info - May i sex dating with you?
5 Homebrew Python Games

Johnathon Alston

September 7, 2010
hello great forum lots of helpful people just what i need can anybody tell me how they have built there list for people interested in marketing hopefully this is just ...
OOXML Vote Coverage

thrhtrurth

September 7, 2010
epvmqyauvloxitvmszkrv. http://www.acnetreatment2k.com/ - acne treatment npympx
Introducing Soturi - yet another Django blog application

nexium uk

September 7, 2010
Nexium Latest News: Nexium <a target="_blank" class="ext" href=http://mysoccerspace.ning.com/profiles/blogs/generic-nexium-generic-nexium>cheap generic nexium</a> Nexium <a target="_blank" class="ext" href=http://www.wfmtintroductions.com/profiles/blogs/buy-generic-nexium-buy-generic>buy nexium 40mg</a> Nexium <a target="_blank" class="ext" href=http://www.interdojo.com/profiles/blogs/buy-cheap-nexium-buy-cheap>nexium buy cancun</a> Nexium <a target="_blank" class="ext" href=http://www.translatorsgroup.com/profiles/blogs/nexium-generic-buy-nexium>nexium generic ...
SFTP in Python: Paramiko

payclickk

September 7, 2010
?????? ???????? ????????? ??? ???????????: http://pay-click.ru/?ref=3871 - http://pay-click.ru/?ref=3871
SFTP in Python: Really Simple SSH

Erotikalia

September 6, 2010
Ihr habt eine schoene Webseite hier, und vielciht schaut Ihr euch auchmal meine an, ok Sex im Internet ist nicht jedermans Sache, aber eben meine erste Homepage. Danke und macht ...
Introducing Soturi - yet another Django blog application

SonIntuivetut

September 5, 2010
I enjoyed reading your blog. Keep it that way.
The Pirate Bay Trial Begins

hgfllkj

September 4, 2010
?????????? ???? ?????????? ??? ???????????, ???? ?????????? ?????????, ?????????? ???? ??????????, ???? ???? ?????????, ?e?? ??a??????a ?e? ?e?????a???, ???? ?????????? ??? ???????????, ???? ?????????? ??? ???. ???? 24lux.ru
Include ODF support in the Linux Standard Base?

SemeRuppy

September 3, 2010
JACKELINE HERMINE you go, there's an KAREY
PyCon UK 2008 this September

neffeengard

September 3, 2010
LYN NOVELLA learned how to forgive those people and let it go, SHANON
PyCon UK 2008 this September

Essex Web Design

September 3, 2010
A lot of contract providers give you free internet usage now, but if you have Pay As You Go, then you are going to be paying heavy prices.
Calling time on mobile internet nonsense?

Krasochka

September 2, 2010
Hack again?!
Adding more terminals to your function keys

GenryFlorist

September 2, 2010
<b>Cheap flowers delivery around the world!</b> Celebrate summer with our gorgeous flowers. They?re the perfect gift for any summer occasion. From birthdays to anniversaries, we offer beautiful flowers, lush plants, ...
Burning an iso to CD on Windows

auto-financing.co.cc

September 2, 2010
auto-financing
ReStructuredText tables and doctests

rubaxa

September 1, 2010
FTP = NOT RANDOM software Dominated hands postflop suckout often on all-ins. EX. AK vs. A9 or KQ vs. K6. Both players hit top pair. Bad player goes all in ...
Burning an iso to CD on Windows

empodayaddelm

September 1, 2010
Sorry admin - my post is test
This Week: Heroes and Monsters