Hard Drives and Partitions
The main storage device on a PC is a hard drive. There may be
one
or more, though it is rare to have more than two. That is the
physical arrangement.. "But my Windows system shows 4 HDs" someone
says. Each hard drive may be divided up into sections called
partitions. Windows treats the partitions as separate HDs
labelling them C, D, E, F for instance, as if they were physically
separate units.
There
is no basic limit to
the number of sections or partitions that may be created on a drive but
for historical reasons the way these are arranged is far from
straightforward. Partitions are not all created equal - you
can't
just create say 10 partitions of 10GB on a 100GB drive, unfortunately.
(Daft isn't it!). There are three different types
of
partition.
There
can be up to 4 primary
partitions on a hard drive and no more. If more
than four partitions are required an Extended Partition
must be created. Then within that a number of Logical Partitions
may be created. Note that an Extended Partition
is only a container for Logical
Partitions. That is how a drive may be divided
into a large number of sections (partitions) and Windows have umpteen
HDs apparently.
Windows
needs to be installed into a Primary
partition but Linux (and hence Ubuntu) is not fussy and works perfectly
well when installed into either a Primary or Logical Partition.
Partitions may be hidden in Windows and only visible using a
3rd
party partition editor (or viewer).
Many
PCs sold by the major outlets often have a hidden restore partition
on the HD rather than supplying Windows Installation CDROMs.
Here
the factory installation on the HD partition is copied as an image into
the hidden one. There may another partition containing
drivers
and bundled software for reinstalling in the event of problems.
Here's an example
showing the Windows Primary Partition, Driver and Apps
Partition and the factory set Restore Partition.
Linux drive and partition nomenclature.
Linux (and
hence Ubuntu) uses lower-case
letters to assign drives and numbers the partitions within each drive.
Also, drive partitions are treated the same as directories in
the filesystem. Thus drives and partitions appear in the /dev (for device) directory.
The first letter is the drive type - IDE (PATA) drives
are h,
serial drives such as SATA
and USB are
s.
Then d
for drive
Next the physical drive assigned in order - 1st is a, 2nd b etc.
Finally, the partitions are numbered sequentially in the
order they were created. Deleted partitions are not
reassigned (this would cause confusion). eg. /dev/sdb5 refers to device serial drive b (no. 2) partition 5. Mounted
partitions (and other devices) are referred to by their mount point
for data access. This will generally be a more user friendly
name and may be assigned anywhere convenient in the filesystem.
Partitioning for Installing
Ubuntu
An excellent article on partitioning for Ubuntu may be
found HERE
A
couple of examples of partitioning using the partition editor supplied
on the Ubuntu Live CD may be of interest :-
Resizing
partition using Gnome Partition Editor
This process uses
Ubuntu from the Live CD.
Boot
from Live CD
- for more
info on this see Running
the Live CD
Go to System > Administration > GNOME Partition Editor
If
you have more than one hard drive select the drive from the box on the
top right of the dialog. Then click on the partition to be
resized to select it. That will enable the editing options.
Here
is an example, Then click on the Resize/Move
icon to display the Resize Dialog.
This shows the selected
partition as a box with a slider control - a small black triangle on
the right of the box. This can be used to resize the box by
clicking and dragging. Alternatively, below the box are
numerical
controls to set the new size. These show the new size and the
amount of space freed up by resizing.
Resize Dialog
after setting the new size. Click the Resize button to
confirm resizing the partition. you are
then returned to the main dialog with the Apply
button now available. The changes to apply are shown in the
box
at the bottom while the partition layout now shows the reduced
partition and the free space (in grey). Click Apply and the
confirmation dialog is displayed - Apply
operations to harddisk. Click Apply here to
actually do the resizing.
Having
made some empty space you can either set up partitions now of leave it
until installation, when the partitioner will be run again.
In
this case you can tell the installer to automatically create partitions
in the free space.
See Manual Partitioning page for installing with Manual partitioning.
Updated 9 Februay 2008