Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




B.5. Debian Partitioning Programs

Several varieties of partitioning programs have been adapted by Debian developers to work on various types of hard disks and computer architectures. Following is a list of the program(s) applicable for your architecture.


Recommended partitioning tool in Debian. This Swiss army knife can also resize partitions, create filesystems (“format” in Windows speak) and assign them to the mountpoints.


The original Linux disk partitioner, good for gurus.

Be careful if you have existing FreeBSD partitions on your machine. The installation kernels include support for these partitions, but the way that fdisk represents them (or not) can make the device names differ. See the Linux+FreeBSD HOWTO


A simple-to-use, full-screen disk partitioner for the rest of us.

Note that cfdisk doesn't understand FreeBSD partitions at all, and, again, device names may differ as a result.

One of these programs will be run by default when you select Partition a Hard Disk. If the one which is run by default isn't the one you want, quit the partitioner, go to the shell (tty2) by pressing Alt and F2 keys together, and manually type in the name of the program you want to use (and arguments, if any). Then skip the Partition a Hard Disk step in debian-installer and continue to the next step.

If you will be working with more than 20 partitions on your ide disk, you will need to create devices for partitions 21 and beyond. The next step of initializing the partition will fail unless a proper device is present. As an example, here are commands you can use in tty2 or under Execute A Shell to add a device so the 21st partition can be initialized:

# cd /dev
# mknod hda21 b 3 21
# chgrp disk hda21
# chmod 660 hda21

Booting into the new system will fail unless proper devices are present on the target system. After installing the kernel and modules, execute:

# cd /target/dev
# mknod hda21 b 3 21
# chgrp disk hda21
# chmod 660 hda21

Remember to mark your boot partition as “Bootable”.

B.5.1. Partitioning for Intel x86

If you have an existing other operating system such as DOS or Windows and you want to preserve that operating system while installing Debian, you may need to resize its partition to free up space for the Debian installation. The installer supports resizing of both FAT and NTFS filesystems; when you get to the installer's partitioning step, select the option to partition manually and then simply select an existing partition and change its size.

The PC BIOS generally adds additional constraints for disk partitioning. There is a limit to how many “primary” and “logical” partitions a drive can contain. Additionally, with pre 1994–98 BIOSes, there are limits to where on the drive the BIOS can boot from. More information can be found in the Linux Partition HOWTO and the Phoenix BIOS FAQ, but this section will include a brief overview to help you plan most situations.

Primary” partitions are the original partitioning scheme for PC disks. However, there can only be four of them. To get past this limitation, “extended” and “logical” partitions were invented. By setting one of your primary partitions as an extended partition, you can subdivide all the space allocated to that partition into logical partitions. You can create up to 60 logical partitions per extended partition; however, you can only have one extended partition per drive.

Linux limits the partitions per drive to 15 partitions for SCSI disks (3 usable primary partitions, 12 logical partitions), and 63 partitions on an IDE drive (3 usable primary partitions, 60 logical partitions). However the normal Debian GNU/Linux system provides only 20 devices for partitions, so you may not install on partitions higher than 20 unless you first manually create devices for those partitions.

If you have a large IDE disk, and are using neither LBA addressing, nor overlay drivers (sometimes provided by hard disk manufacturers), then the boot partition (the partition containing your kernel image) must be placed within the first 1024 cylinders of your hard drive (usually around 524 megabytes, without BIOS translation).

This restriction doesn't apply if you have a BIOS newer than around 1995–98 (depending on the manufacturer) that supports the “Enhanced Disk Drive Support Specification”. Both Lilo, the Linux loader, and Debian's alternative mbr must use the BIOS to read the kernel from the disk into RAM. If the BIOS int 0x13 large disk access extensions are found to be present, they will be utilized. Otherwise, the legacy disk access interface is used as a fall-back, and it cannot be used to address any location on the disk higher than the 1023rd cylinder. Once Linux is booted, no matter what BIOS your computer has, these restrictions no longer apply, since Linux does not use the BIOS for disk access.

If you have a large disk, you might have to use cylinder translation techniques, which you can set from your BIOS setup program, such as LBA (Logical Block Addressing) or CHS translation mode (“Large”). More information about issues with large disks can be found in the Large Disk HOWTO. If you are using a cylinder translation scheme, and the BIOS does not support the large disk access extensions, then your boot partition has to fit within the translated representation of the 1024th cylinder.

The recommended way of accomplishing this is to create a small (5–10MB should suffice) partition at the beginning of the disk to be used as the boot partition, and then create whatever other partitions you wish to have, in the remaining area. This boot partition must be mounted on /boot, since that is the directory where the Linux kernel(s) will be stored. This configuration will work on any system, regardless of whether LBA or large disk CHS translation is used, and regardless of whether your BIOS supports the large disk access extensions.

  Published under the terms of the GNU General Public License Design by Interspire