.

Plan Hard Drive Partition Strategy [KARMIC KOALA BIBLE #3]

English   English (change)
  • Digg
  • Twitter
  • Technorati
  • del.icio.us
  • Facebook
  • MySpace
  • Reddit
  • StumbleUpon
  • LinkedIn
  • email

Dividing the Hard Drive: Food for Thought

ubuntu karmic koala

Pre-OS-install, mapping out data/system demands for optimal disk segmentation saves headaches down the road. Here's a heads-up to help.

You don't have to, but it is a mighty good idea to put pen to paper, ring-fencing the departmental demands you will have on your overall hard disk, or disks.

For instance, you may require space for:-

the_guv's sistasite: Setup The Ultimate VPS

"Blank box to top-notch web server"

  • plain English copy/paste tutorials with video
  • written for VPS beginners and Linux newbies
  • perfect for multiple sites, blogs & more
  • Fast. Secure. Future-proofed. Cheap-as-chips!
  • "Wow!!" "godsend!!" "GREAT!!!" "awesome"

Ubuntu & Debian, Nginx (beats Apache), MySQL, PHP-FPM, Xcache, WordPress, WP MU, Drupal etccccc

Set Up & Enhance Ubuntu 9.10 .. KARMIC KOALA BIBLE

In simple copy/paste steps .. from zero to hero.

Scroll down for the full series index.

Wake up and smell the Ubuntu! Hope it helps. the_guv

  • a boot manager (the first thing on the disk, a few mB)
  • the Karmic Koala operating system
  • your personal documents and settings, which generally are housed in your /home directory
  • another operating system
  • and maybe another again
  • a downloads location
  • a location for your music collection
  • another for your movies
  • and another for pics
  • maybe one for websites/special projects
  • a place for backup, else an image of all the above, ideally on a separate hard drive
  • swap (RAM overflow)
  • you get the idea!

How you divvy up the drive is a personal thing, but split it up you will, easily enough, the key partitions being created during the installation process, else prior to that if you use a tool like GParted.

The only must is for any operating systems to be separated, as should the swap file. Furthermore, backup should be in its own location, ideally not just on a separate partition but on an independent hard drive. It is recommendable also to separate user data, housed in the /home folder, to its own partition.

What is a Partition?

Think of your hard drive as a very solid building. Impermeable walls separate the rooms, or partitions, each with their own purposes. If you set fire to one room, the others will be unnaffected.

It is due to the risk of total disk failure (the building collapses!) that you should store backup on a separate volume altogether.

What is SWAP?

If you run out of RAM, a small slice of your disk is called to temporarily take the slack. With Windows, they call that virtual memory.

At it's barest, IMHO, your partition plan should comprise:-

  • the Karmic Koala operating system
  • another operating system (if you want another)
  • your personal documents and settings (/home) to include all personal media
  • backup, but on a separate hard drive
  • swap (RAM overflow)

.. so, of the primary or only hard drive, you have partitions for each of those sections, with backup on another disk. OK, you don't have another disk and really don't want to buy one? This is not good advice, but you can have backup on another partition on the same drive too, or risk all and don't even backup (that is terrible advice!)

Alternatively, the barest possible would look like this:-

  • the Karmic Koala operating system, including your /home directory
  • another operating system (only if you want another)
  • swap (RAM overflow)

.. so that's two partitions, plus one for each subsequent OS.

If you are considering your first future-proof multi-partition setup, and really want to get it right, I suggest you Google a lot. If you want to share docs between, say, Windows and Linux, there are methods to allow you to do that too, so Google again. (For any Windows system, your personal docs should be on a separate partition too, especially as the damn thing always breaks).

Should I Install a Linux System Before Windows?

To save headaches, no. When Linux installs, it recognises other operating systems and allows you to boot to a choice of those on disk. Windows is less usefully inclined. Install Windows first, then Karmic.

What if I want Karmic as my First Partition?

Good call! In that case, rather than using Ubuntu's Partition Manager to resize and/or segment your disk, download and run GParted from boot. (It's better than anything else I've tried, including Acronis' Disk Director and Partition Magic.) You can resize and even move your Windows' partition, although that can (rarely) lead to you having to reinstall Windows as well.

My advice:-

  • plan your pie
  • back up from existing Windows
  • using GParted, format the entire drive and partition as required
  • install Windows on the second partition, then Linux on the first

But. That's an opinion, and there are many others! Google it to gauge what works for you because there is no right nor wrong, just sometimes poor planning or bad luck.

How Much Space To Allow For Each Partition

Hmmn, for your docs, at least, how long is a piece of string? Then again, so far as Ubuntu is concerned, they say:-

"The [operating system] takes between 3-4gB hard drive space, and 8-10gB will be needed to run comfortably."

.. That doesn't take into account much in the way of personal documents and media, nor additional software installations, so allow for that on top.

Regarding the Linux SWAP size, the jury is permanently out, but it is generally reckoned you should allow for a separate partition of two to three times your hardware's RAM size. I've got 2gB RAM in this laptop, for example, and 4gB SWAP. Is that naughty? Dunno, but it works.

OMG! Just Give Me a Solution, Guv!!

I know, for noobs and even intermediates, this is the hardest bit. That's only because you don't want to cock things up or have to redo. Almost certainly, if you research a bit, you won't cock up, and you won't redo for a good long while. Stay chilled. Have a cup of tea!

Here is a partition suggestion, but merely a suggestion, that allows for Windows (begrudgingly) and backup on a separate disk. It's not ideal, just a basic idea. Like I say, it's a personal thing, and a step that should take you longer to consider than anything else in this guide:-

Partition gB File system Purpose Notes
1 25 Ext4 Karmic system
2 30 ntfs Windows system begrudgingly!
3 100 Ext4 /home - docs
4 50 ntfs Windows docs can be used by Linux
5 4ish swap swap is shared between Linux systems

If you have extra space, divide it between your Windows and Linux docs partitions, or consider adding additional partitions for a rainy day, else those mp3s.

Then, on a separate drive, divide in two:-

1 big! Ext4 Linux docs backup
2 big! ntfs Windows data backup

Allow for Virtual Operating Systems with VirtualBox

One last consideration. In this guide, for those that want to emulate other systems such as Windows or other Linux systems, I'll show you how to add and configure VirtualBox in the imaginatively titled Part 25 - Emulate Virtual OSes with VirtualBox.

In fact, using VirtualBox, you can realistically have a 100% Linux box with a copy of Windows, or whatever system, sitting pretty within.

If you think you may want that option, read Part 25 now so you can best prepare for the extra bulk of those operating systems it allows you to virtualize.

For instance, if you'll be wanting a virtual Windows 7, plus another for, say, OpenSUSE, allow for an extra 25gB for each (to include a bunch of programmes plus rattle space) in your /home directory. Then again, these virtual OSes, undeveloped, will be much smaller at around 10gB each. Just be aware and plan ahead for whatever eventualities are likely to affect you and your biz.


If you liked that ...
  • The Karmic Koala Installation Process

    The setup is quick and easy, with the exception of the Partitioning Manager which, for noobs, can confuse. This tutorial helps manage the process. Before you begin, I suggest you read all of this section, with [...]
  • NGINX VPS ADMIN SERIES UNDERWAY - And I Thought It Was Beer-O-Clock!

    When I started this series I figured I'd cover it in maybe 7 or 8 posts. I had more hair in those days, and you were younger too. Apart from underestimating the subject, fact is, with the intended audience for the [...]
  • Set Up Previous VirtualBox Machines in Minutes

    Problem: After a fresh install of VirtualBox, perhaps in a new Linux installation, how can you seamlessly restore previous virtual operating systems, working as before? Here is how .. This works for VirtualBox [...]
  • INTRODUCTION: The 25-Part Ubuntu KARMIC KOALA BIBLE

    Detailing every aspect over 25 parts, this reference helps you to set up, enhance and use the ultimate installation of Ubuntu's superb new operating system. Stepped out in easy-read copy/paste detail, these how-to [...]
  • Stop Having to Mount Partitions Manually

    Here's how to stop password requests every time you need to mount media. Automate access of any media: partitions, internal/external drives, etc. One problem with having separate partitions or hard drives - for [...]
  • Add Windows & Other Systems with VirtualBox

    Here is how to use VirtualBox to install & emulate virtual operating systems to run in Linux. Launch Windows, for example, rather like any other application, with no reboot requirement. Hey, Windows even loads [...]
... maybe you'll like these?

.