Changes between Version 1 and Version 2 of install_debian/partition

Jun 22, 2012, 5:54:08 PM (9 years ago)
Jamie McClelland



  • install_debian/partition

    v1 v2  
    11= Partitioning =
     3== What are partitions? ==
     5Partitioning is a way to divide a hard disk (or any block device) install smaller block devices.
     7Most Windows and Macintosh computers have one big partition that contains all your operating system files and data files.
     9Most linux computers divide a single disk into separate block devices by partitioning the disk. Typically, different areas of your computer are assigned to separate block devices. For example, your home directory is on one block device, your operating system's space for writing temporary files is on a different one, etc.
     11== Why partition? ==
     13Q. Wouldn't it be simpler to just use the entire disk and not worry about partitions at all?
     15A. Yes, it would be simpler. But, you would miss out on some useful features that you get when you partition your hard disk.
     17Most computers come with large disks that contain more space than we can use immediately. By only partitioning the part of your disk that you know you will use right now, you are free to allocate the remaining space later, when you know how you want to use it.
     19For example, you might want to allocate space to a virtual computer. You may want to create a big partition for videos, but ensure that if you accidentally download too many videos, you want run out of disk space on the partition that holds your incoming email. You may want to copy all your important data to a new partition so you can re-install your operating system on your existing partitions.
     21Q. But what if I create a partition and then later decide it's too small or too big?
     23A. Logical Volume Manager is a system that allows you to dynamically resize your block devices at a later time. You can grow, shrink or even delete them.
     25== The Big Picture ==
     27First some terminology.
     29A `block device` is medium that a computer can read from and write to in randomly organized blocks of data. Hard disks, flash disks, CD-ROM drives are examples of block devices. When you partition a block device, you create a new block device. You can then (if you want) partition that resulting partition.
     31Hard disks and flash disks are block devices that can be partitioned into multiple block devices. A linux operating system will name block devices it recognizes in the form of sda, sdb, sdc, etc. These block devices can be further partitioned into sda1, sda2, sdb1, sdc1, sdc2, sdc3, etc.
     33An `encrypted block device` is a block device (e.g. sda2) that is configured to have all data saved to it encrypted and all data read from it de-crypted (provided the correct passphrase has been provided during boot). Encrypted block devices are typically given a new name (e.g. sda2 might become sda2_crypt). The resulting encrypted block device (sda2_crypt) appears to applications just like any other block device.
     35`Logical Volume Manager (LVM)` is software that manages disk drives and other mass storage devices. Logical Volume Manager has three important concepts:
     37 * Physical devices: these are un-used block devices.
     38 * Volume Group: Physical devices can be added to a volume group. The size of the volume group is the sum of the sizes of all the physical volumes added to it.
     39 * Logical Volume: A logical volume is a block device that you can create from a Volume Group. When you create a logical volume, the remaining space available in the volume group is reduced by the size of the logical volume that you created.
     41For a graphical description, see the logical volume manager diagram.
     43== Partioning during a Debian installation ==
    345One of the hardest questions to answer during a Debian installation is how to partition your disk. You are  presented with four options:
    1052This page explains how to setup your partitions using the "Manual" option in a way that will result in something similar to "Guided - use entire disk and setup encrypted LVM," but allows you to fully understand each part.
     54== The Goal ==
     56Our goal is to have a computer with two partitions, an encrypted disk, and logical volume manager so we can easily resize our block devices at a later time.
     58The disk partition diagram provides a good snapshot of what we will be doing.