Future-Proofed Partitioning: Best Advice 4 Lucid



Ubuntu's lucid lynx 10.04 LTS logo

Build a healthy PC with separate partitions for your data and system files as well as for other operating systems. Here's how.

Pre-OS-install, mapping out data/system demands for optimal disk segmentation saves headaches down the road.

.. 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.

Setup Unmanaged VPS (4 Noobs!) ... with vpsBible
Secure WordPress. Properly. ... with wpCop, the platform's dedicated security website
Olly 'the_guv' Connelly's vpsBible.com site and 'WordPress 3 Ultimate Security' book.

For instance, you may require space for:-

  • the boot manager (the first thing on the disk, a few mB)
  • Lucid Lynx operating system
  • documents & settings (in your /home directory)
  • another OS
  • yet another OS
  • downloads
  • music
  • movies
  • pics
  • websites
  • special projects
  • backup or a (partial) disc image, ideally on another hard drive
  • swap (in case you need more RAM)
  • whatnot!

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

Partition Planning 101

The only must is for any operating systems to be separated to their own partitions, as should the swap file.

Furthermore, while optional, backup should be in its own location and, sensibly, not just on a separate partition but on an independent hard drive.

It is desirable also to separate user data, in your /home folder, to its own partition.

What is a Partition?

Think of your hard drive as a house. Walls separate rooms – or partitions – each with their own functions. Set fire to a room and the others are unaffected.

But what if the house collapses? Ie, total disc failure. That's why backup should be on a separate volume.

What is SWAP?

Should you need more RAM a slice of your disk, the SWAP partition, can take the slack. With Windows, they call that virtual memory.

Partition Planning: Examples

At the least, IMHO, you need partitions for:-

  • the Lucid Lynx operating system
  • another operating system *
  • personal documents & settings (/home)
  • backup **
  • swap (RAM overflow)

* Alternatively, use VirtualBox within Ubuntu and host Windows or whatever in there. Search this site for the setup guide.

** Better still (by far) and my strong recommendation due to the possibility of disc failure, backup not merely to a separate partition but to a separate hard drive.

.. so, of the primary 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.

Alternatively, the barest possible partitioning would comprise:-

  • Lucid Lynx 10.04, 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.

TIP: If you want to share docs between, say, Windows and Linux, you can, despite the fact they sport different file systems (ntfs for Windows and ext4 or ext3 for Lucid). You'll have to Google how but, so far as your partition strategy is concerned, this is no longer an issue.

Should I Install Lucid 10.04 Before Windows?

No. When Linux installs, it recognizes other operating systems and allows you to boot to a choice of those on disk. Windows is less usefully inclined. Install Windows first, then Lucid.

What if I want Lucid as my First Partition?

So you've already got, or will have, Windows installed first? 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 superior to 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.

While you're about, using GParted, create your other planned partitions for Lucid, the SWAP file and whatever else you want to separate.

And now run the Lucid installer. When it comes to the Partition Manager section, specify those reserved partitions you created already – see this Bible's section on Installing Lucid 10.04 for the detail on using the Partition Manager (all we're doing here is planning.)

Installing Lucid 10.04 & Windows – Ideally

My advice:-

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

How Much Space To Allow For Each Partition

Hmmn, for your docs (/home), 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.

Partition Planning: VirtualBox

A typical partition scenario has one for Windows and another for Ubuntu: a dual boot setup.

For most, I'd recommend binning the Windows partition and, instead, devoting that extra space to the partition where your Lucid /home directory is located.

.. That way, when you discover Linux' superiority and realise you only ever use Windows as a small part of your productivity (maybe for Dreamweaver or Photoshop, for instance, which as far as I can tell is all Windows is good for, apart from realising it's time to log off and head down to the pub instead, ‘hem) when you do require Windows it's little different to kicking up any old app. No need to save all those open Linux docs, reboot into Windows, shout a bit then reboot back into Linux. Life just got easier (and possibly longer!)

So how?

Cue VirtualBox, with which you can seamlessly emulate virtual operating systems within a regular OS. You can read about setting it up in Emulate Virtual OSes with VirtualBox and, if I've published it yet, there'll be a specific Lucid/VirtualBox tutorial linked from the Lucid Bible index below. Read that.

From the point of view of partition planning, as with allowing for a dual boot system, again your virtual OS strategy is best planned in advance.

Each virtual OS needs space and, by default, is installed in the hidden /VirtualBox directory within your Lucid's /home folders.

Say you want to run a bare bones virtual Windows machine, that means you'll need to set aside about 15gB. If you want to install, say, OpenSuse as well as XP then that's around another 10gB again.

.. The exact sizes depend on your specific needs, of course: allow for whatever additional applications and how much data you envisage adding to your virtual OS'es. Then again, we have much more flexibility now: with a set Windows partition you have to specify a size and, if you want to be safe and not have to resize later, have to waste space; now though, we can devote that wasted space to our /home directory where you really want it and, as for the virtual machine itself, it can be set up to be sized with flexibility. Win win.

So. Now, on mapping out your partition strategy, add this required space to the size of your Linux /home partition or, if you don't want a specific /home partition, then allow for the extra space in your overall Linux partition.

.. And when everything is set up and you're saving lots and lots (and did I say lots) of time, don't forget to Digg this tutorial 😛

OMG! Just Give Me a Solution, Guv!!

I know, for noobs and even intermediates, partitioning is the scary bit. That's only because you don't want to cock things up or have to start over. Almost certainly, properly researched, you won't mess up, and you won't redo for a good long while. Stay chilled. Take tea!

Here is a partition suggestion that does allow for Windows (begrudgingly) as well as backup to a secondary disk. It's not perfect because there is no one-size-fits-all. Like I say, it's a case-by-case thing, but is the step that should take you longer to consider than anything else in Guvnr's Lucid Bible:-

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

Got extra space? Split it between your Windows and Linux personal data partitions or consider adding additional partitions for a rainy day, else for those mp3s.

Then, on a second hard drive, segment it in two:-

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

OK. Armed with the theory and hopefully a maturing partition plan, I'd suggest you read Guvnr's Installing Lucid tutorial with particular consideration of the Partition Manager section. Following that you'll be ready to install 10.04 before tuning it up.

0


About the Author:

Olly Connelly (yeah, that's me) blogs at guvnr.com, polices WordPress security at wpCop.com and helps noobs build web servers at vpsBible.com, so if you've got sleeping problems you know where to come.

Add a Comment