If you are uncomfortable with partitioning, or just want to know more
details, see .
If a hard disk has previously used under Solaris, the partitioner may not
detect the size of the drive correctly. Creating a new partition table
does not fix this issue. What does help, is to zero
the
first few sectors of the drive:
# dd if=/dev/zero of=/dev/hdX bs=512 count=2; sync
Note that this will make any existing data on that disk inaccessible.
First you will be given the opportunity to automatically partition
either an entire drive, or available free space on a drive. This is
also called guided
partitioning. If you do not want to
autopartition, choose Manual from the menu.
Guided Partitioning
If you choose guided partitioning, you may have three options: to create
partitions directly on the hard disk (classic method), or to create them
using Logical Volume Management (LVM), or to create them using encrypted
LVM
The installer will encrypt the LVM volume group using a 256 bit AES key and
makes use of the kernel's dm-crypt
support.
.
The option to use (encrypted) LVM may not be available on all architectures.
When using LVM or encrypted LVM, the installer will create most
partitions inside one big partition; the advantage of this method is that
partitions inside this big partition can be resized relatively easily later.
In the case of encrypted LVM the big partition will not be readable without
knowing a special key phrase, thus providing extra security of your
(personal) data.
When using encrypted LVM, the installer will also automatically erase the
disk by writing random data to it. This further improves security (as it
makes it impossible to tell which parts of the disk are in use and also
makes sure that any traces of previous installations are erased), but may
take some time depending on the size of your disk.
If you choose guided partitioning using LVM or encrypted LVM, some changes
in the partition table will need to be written to the selected disk while
LVM is being set up. These changes effectively erase all data that is
currently on the selected hard disk and you will not be able to undo them
later. However, the installer will ask you to confirm these changes before
they are written to disk.
If you choose guided partitioning (either classic or using (encrypted)
LVM) for a whole disk, you will first be asked to select the disk you want
to use. Check that all your disks are listed and, if you have several disks,
make sure you select the correct one. The order they are listed in may
differ from what you are used to. The size of the disks may help to identify
them.
Any data on the disk you select will eventually be lost, but you will always
be asked to confirm any changes before they are written to the disk.
If you have selected the classic method of partitioning, you will be able to
undo any changes right until the end; when using (encrypted) LVM this is not
possible.
Next, you will be able to choose from the schemes listed in the table below.
All schemes have their pros and cons,
some of which are discussed in . If you are
unsure, choose the first one. Bear in mind that guided partitioning
needs a certain minimal amount of free space to operate with. If you don't
give it at least about 1GB of space (depends on chosen scheme), guided
partitioning will fail.
Partitioning scheme
Minimum space
Created partitions
All files in one partition
600MB
/, swap
Separate /home partition
500MB
/, /home, swap
Separate /home, /usr, /var and /tmp partitions
1GB
/, /home,
/usr, /var,
/tmp, swap
If you choose guided partitioning using (encrypted) LVM, the installer will also create
a separate /boot partition. The other partitions,
including the swap partition, will be created inside the LVM partition.
If you choose guided partitioning for your IA-64 system, there
will be an additional partition, formatted as a FAT16 bootable filesystem,
for the EFI boot loader.
There is also an additional menu item in the formatting menu to manually
set up a partition as an EFI boot partition.
If you choose guided partitioning for your Alpha system, an
additional, unformatted partition will be allocated at the beginning of
your disk to reserve this space for the aboot boot loader.
After selecting a scheme, the next screen will show your new partition
table, including information on whether and how partitions will be
formatted and where they will be mounted.
The list of partitions might look like this:
IDE1 master (hda) - 6.4 GB WDC AC36400L
#1 primary 16.4 MB B f ext2 /boot
#2 primary 551.0 MB swap swap
#3 primary 5.8 GB ntfs
pri/log 8.2 MB FREE SPACE
IDE1 slave (hdb) - 80.0 GB ST380021A
#1 primary 15.9 MB ext3
#2 primary 996.0 MB fat16
#3 primary 3.9 GB xfs /home
#5 logical 6.0 GB f ext3 /
#6 logical 1.0 GB f ext3 /var
#7 logical 498.8 MB ext3
#8 logical 551.5 MB swap swap
#9 logical 65.8 GB ext2
This example shows two IDE harddrives divided into several partitions;
the first disk has some free space. Each partition line consists of the
partition number, its type, size, optional flags, file system, and
mountpoint (if any). Note: this particular setup cannot be created using
guided partitioning but it does show possible variation that can be achieved
using manual partitioning.
This concludes the guided partitioning. If you are satisfied with the
generated partition table, you can choose Finish
partitioning and write changes to disk from the menu to
implement the new partition table (as described at the end of this
section). If you are not happy, you can choose to Undo
changes to partitions and run guided partitioning again, or
modify the proposed changes as described below for manual partitioning.
Manual Partitioning
A similar screen to the one shown just above will be displayed if you
choose manual partitioning except that your existing partition table will
be shown and without the mount points. How to manually set up your partition
table and the usage of partitions by your new Debian system will be covered
in the remainder of this section.
If you select a pristine disk which has neither partitions nor free
space on it, you will be asked if a new partition table should be
created (this is needed so you can create new partitions). After this,
a new line entitled FREE SPACE
should appear in the table
under the selected disk.
If you select some free space, you will have the opportunity to create a
new partition. You will have to answer a quick series of questions about
its size, type (primary or logical), and location (beginning or end of
the free space). After this, you will be presented with a detailed
overview of your new partition. The main setting is Use
as:, which determines if the partition will have a file
system on it, or be used for swap, software RAID, LVM, an encrypted
file system, or not be used at all. Other settings include
mountpoint, mount options, and bootable flag; which settings are shown
depends on how the partition is to be used. If you don't like the
preselected defaults, feel free to change them to your liking. E.g. by
selecting the option Use as:, you can
choose a different filesystem for this partition, including options
to use the partition for swap, software RAID, LVM, or not
use it at all. Another nice feature is the ability to copy data from
an existing partition onto this one.
When you are satisfied with your new partition, select
Done setting up the partition and you will
return to partman's main screen.
If you decide you want to change something about your partition,
simply select the partition, which will bring you to the partition
configuration menu. This is the same screen as is used when creating
a new partition, so you can change the same settings. One thing
that may not be very obvious at a first glance is that you can
resize the partition by selecting the item displaying the size of the
partition. Filesystems known to work are at least fat16, fat32, ext2,
ext3 and swap. This menu also allows you to delete a partition.
Be sure to create at least two partitions: one for the
root filesystem (which must be mounted as
/) and one for swap. If you
forget to mount the root filesystem, partman won't
let you continue until you correct this issue.
If you forget to select and format an EFI boot partition,
partman will detect this and will not let you continue
until you allocate one.
Capabilities of partman can be extended with installer
modules, but are dependent on your system's architecture. So if you can't
see all promised goodies, check if you have loaded all required modules
(e.g. partman-ext3, partman-xfs,
or partman-lvm).
After you are satisfied with partitioning, select Finish
partitioning and write changes to disk from the partitioning
menu. You will be presented with a summary of changes made to the disks
and asked to confirm that the filesystems should be created as requested.