CLASS="article" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" >

Partition-Mass-Storage-Dummies-Linux-HOWTO

Revision History
Revision 62009-04-05 08:38:51Revised by: jdd
adding forgotten HOWTO header for wiki
Revision 52009-04-05 08:35:01Revised by: jdd
adding link to the Partitions-and-mass-storage-HOWTO
Revision 42009-03-30 18:34:19Revised by: jdd
remove headers to render to docbook
Revision 32009-03-30 18:07:40Revised by: jdd
Revision 22009-03-30 17:58:09Revised by: jdd
Revision 12009-03-30 17:54:21Revised by: jdd
title change from sub page to full page (done with copy/paste)

Table of Contents
1. Partition-Mass-Storage-Dummies-Linux-HOWTO
2. Licence
3. Definitions
3.1. Disks
3.2. Partitions
4. Making Room for Linux
4.1. Using Windows
4.2. Using Linux
5. Images of the partitionning tools
5.1. Windows XP
5.2. Parted Magic
5.3. openSUSE
5.4. Mandriva
5.5. Fedora
5.6. Ubuntu Desktop
5.7. Debian
5.8. Others

1. Partition-Mass-Storage-Dummies-Linux-HOWTO

copyright (c) 2009 Jean-Daniel Dodin

This HOWTO is about partitionning usual mass storage that can be magnetic rotating hard drives or Solid State Drives (SSD - including flash cards or USB keys).

Writing the Partition HOWTO, I noticed that, as of year 2009, at least, partitionning is very complicated. However, most partitionning tasks can be done very easily with the appropriate tools, so this HOWTO for any people that want to understand the partitionning without going too deeply inside.

A more complete partition use description can be found on the Partitions-and-mass-storage-HOWTO, available for example here


2. Licence

      Permission is granted to copy, distribute and/or modify this
      document under the terms of the GNU Free Documentation License,
      Version 1.2 or any later version published by the Free Software
      Foundation; with no Invariant Sections, no Front-Cover Texts and
      no Back-Cover Texts.  A copy of the license is included in the
      section entitled "GNU Free Documentation License".

GNU Free Documentation License


3. Definitions

3.1. Disks

Disks are usually made of rotating plates, read by magnetic heads. Tracks are circular parts of the plates. As we may have several plates, a stack of plate is seen as a cylinder. All the heads are moved at the same time, reading each it's track. All the tracks read at the same time are a cylinder as well.

Each track is divided as sectors that can be 512 or 4k bytes long.

So Mass Storage disks are nearly always described as "CHS", that is Cylinders number, Heads number, Sectors by track number, and the product of all these numbers gives the visible disk size.

However, this have no meaning for SSD and even with true rotating hard drive, the CHS have absolutely no more any meaning! It keeps using only by inertia... so don't worry too much about these numbers, and if possible ignore them.


3.2. Partitions

Partition is from "part". A partition is a part of a drive with some special attributes.

Computers makers seems pretty dumb when seeing how they keep underestimating the possible next disk size, so each year they have to issue a new standard. Disks firmware are buggy, so the software tools have to fix them - and do quite well the job.

That is to say that understanding fully why the Partitionning tool choose to create the partitions the way they do is very complex. It's explained fully (or mostly) on the Partitions-and-mass-storage-HOWTO, you probably won't read and don't have to now.

Windows makes little use of partitions. One can install as many Windows version he wants on the same partition (and often do). It may even proove difficult to install Windows on just an other drive on the same computer.

Nor Unix nor Linux have any such problem. Just on the contrary, Linux love to use at least three partitions. This mean you can have as many Linux on your drive as you want, each on it's special part(ition) of the drive, erase the partition without losing your data (backup first is still better) for example. The two main Linux partitions are used for the system ("/" or "root") and the users data ("home"). The third ("swap") is used to add some more memory and is written directly sector by sector by the system. You usually don't even see it.


4. Making Room for Linux

4.1. Using Windows

Most of the time, your computer come with a paid Windows. If you are not an experienced Linux User, it's probably better to keep this Windows, just for safety in case you have to show your computer to the vendor tech (If your vendor is Linux fiendly you are lucky!). So you have to make room for your prefered Linux.

If You have Windows XP, little luck. Most XP computers come with only one partition on the disk and XP don't know how to make it smaller (If you have two, see the next paragraph). What you have to do is to "defragment" the drive (look in disk properties, you will probably have to "verify" the drive first) - if the computer is brand new and never used, this is not necessary. The "defragmentation" makes the work easier for the Linux partitionner.

If you have Windows Vista, go to Control center, Administration tools, Disk tools to see the actual disk partitionning. If you have luck, may be there is yet a "data" partition. If so, you have just to look where is this partition located and what it's size is. It will be used for Linux.

If not, clic right on the system disk partition rectangle, you will see a resize option. Use it. Keep some room for Vista (50Gb, for example) and OK, you have now several partitions on your drive.

If you see in this screen a small partition (usually around 9Gb), be specially cautious. This is the "system restore partition" that holds the Windows Vista (or XP) original system. Your computer manual should explain how to copy this to two DVD's. Do this before any use of your computer. Make notice of the size and place of this partition (it can be at the very beginning of the drive or at the very end), try to not erase it right now. Don't erase it during the computer insurance time.


4.2. Using Linux

You, as a dummy Linux user, have better use a very well known Linux Distribution. There are more than a hundred Linux distributions and I don't have used all of them, of course, so I can't be sure some of them couldn't erase your drive if ever you don't understand a question.

However I'm rather sure Ubuntu, openSUSE, Mandiva, Red Hat Fedora, new Debian can be reasonably safe for a beginner.

So launch the Linux install. Probably you will have to insert a Cd or DVD and run. May be you will install immediately or launch a live system (Linux working from memory, not from drive), then install froms there.

Anyway, you will have to answer some basic questions and at a moment you will be asked if you want to keep windows or erase it. Beleive me, keep it for now, it will be easy to remove later.

At this moment you will be presented a screen with a graphic of the proposed disk partitions. Scan it to verify the Windows partition is not touched - not formatted. It is probably labelled "NTFS" or "Windows". Verify also that the Windows system backup partition is not touched. It may not have any identified label. In some partitionner, the partition table may be called Disklabel.

You may have to give Linux the name or position of the Vista partition created on the previous step. If your Windows is XP, you will be proposed to shrink the Windows Partition this is good.

Then accept the partitionning sheme your distribution proposes. Do not try to be an expert. At install time, no good Linux Partition tool should erase a Windows system partition. If it does, write me, I will include a notice here.

Modern Linux distributions are perfectly able to resize a Windows partition to make room to Linux. Let some room to Windows, though, if you plan to use it.

So, in summary, trust your Linux install. Most install problems are user's problem, not Linux Distribution problems!!

Do not try "LVM" or "RAID" for your first install. To use these things, read the hole Partitions-and-mass-storage-HOWTO.


5. Images of the partitionning tools

5.1. Windows XP

Here you can see the XP tool for partitionning (french version). The partition is the dashed c: rectangle. You can see the contextual menu (right clic) with no resizing - the resizing option can be seen only in the Vista similar menu.

If the computer used Windows for a while, you will have to verify and defragment the disk. This is found in the disk context menu, tab "tools". Defragmenting is re-organising the files in the disk. On the picture below, you see a badly fragmented disk. Vertical lines are files. To be able to shrink the partition with the Linux tools, you must have a large blank on the right of the rectangle on the defrag window. Even only one file on the right prevents resizing.

If you can't resize, you can only backup all your data, make the partitionning (with Parted magic, for example), deleting all the disk, reinstall XP then install Linux. Given you will probably have to reinstall Windows from time to time, you can use this moment to make room for Linux.


5.2. Parted Magic

Parted Magic is a CD or USB key utility extremely usefull if you have to deal with partitions (find it with web search Probably http://partedmagic.com/). It allows repartitonning, resizing of partitions (if possible), and even search for lost partitions if you happen to have trashed your partition table (experts only). Do not confuse Parted Magic (free and open source) with the proprietary program Partition Magic (expensive).

This tool is by far the more friendly. If you read this HOWTO you are probably not as Dummy as you may think, at least you are curious. So you may have benefits to use Parted magic at least to make one free partition the Linux installer will easily find and use (and certainly repartition again, that's normal).

Here is the booting screen, you should be able to boot any computer with this CD.

You start a graphical screen, as usual. You have icons at the bottom of the screen, clic to use. The partitionning tool is gparted, a very friendly tool. Notice gparted gives you immediately the free space in the Windows partition (the images here is that of a very small disk - only 8Gb).

Right clic on the desired partition gives you the needed options.

In the resizing window, you can resize with the mouse (moving the partition limit with the mouse), or give a numerical value.

Here is a view of a much bigger disk.

On the same Parted Magic CD, you have also other tools, like "Testdisk". This one is much less friendly, but also very powerfull (and being so allow easily to destroy your disk). You will be able to use it sometime in the future, not now.


5.3. openSUSE

openSUSE is a friendly Linux Distribution, trying to reduce as much as possible the risk of removing accidentally files on the disk while installing.

If you insert the openSUSE DVD in your drive when Windows is running, the DVD starts and propose to install Linux. It creates a special Windows starting menu and reboot to the install without any work to do for the user.

On this first image, openSUSE warns that it's not possible to resize the XP disk, you have to remove it entirely if you want to install Linux.

After I did quite a long cleaning work (including removing of unusefull files) on the XP disk, from inside XP, the diagnostic is better:


5.4. Mandriva

Mandriva is even simpler, the options are to remove Windows or to use part of the drive.

If you choose this solution, you have a windows to select what part of the disk is for XP, what part for Linux, as usual.


5.5. Fedora

Red Hat was the first really handy Linux Distribution, but for many years now, it's no more aimed to John Doe but to professionals (with the associated support and price). It's average user conterpart is Fedoraproject.

Fedora can be dowloaded as a live CD, you start it (no boot options) and then clic on an icon to begin the installation.

On the partitionning screen, Fedora give a drop down list of the choices possible, one is resizing (here the french screen)

The following screen is for the size, as usual.


5.6. Ubuntu Desktop

Ubuntu also have a friendly screen to resize partitions, but one have to go to "manual" to find it, what can be a little scary.

It's the "edit" button that allows resizing. Do not format the XP main partition! This would erase all the content.


5.7. Debian

Debian is now as pretty as most distributions. The boot menu (first CD) gives more options than many - this is not a live CD.

The partitionner. Choices are the same as Ubuntu does (Ubuntu is built upon Debian).

"Manual" have the resize option.

You have to give a number - no slide, no view of the free space.


5.8. Others

Many Linux distributions are availalble, for example from ibiblio. If any of these distributions uses gparted, it's possible very easily to partition a drive with them, as we could see with Parted magic. Here the example of Puppy Linux.

This distributions may be a bit more difficult to understand, but it installs is extremely low end hardware (256Mb ram for live cd, 2GB Hard drive).