Announcement

Collapse
No announcement yet.

FAQ: How to Partition - Regenerated

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    FAQ: How to Partition - Regenerated

    Regenerated > Topic: Lost Information, old topic=3090704.0


    Partition recommendations

    > Recommend Separate Home:
    Having a separate partition for /home is always a good idea, since it lets you reinstall your system without losing valuable personal data. This can be especially useful in a distro like Ubuntu, where users have the chance to upgrade their install quite often (every six months) and might want to perform a clean install to avoid potential problems...
    • For the default option, if the hard drive is bigger than 20 GB, and it's a Ubuntu-only installation, 10 GB should go to / and the rest should go to /home
    • If the hard drive is between 10 GB and 20 GB, and it's a Ubuntu-only installation, 5 GB should go to / and the rest to /home
    • If the hard drive is less than 10 GB, there should not be a separate /home partition
    • If the hard drive is bigger than 40 GB and a dual-boot, 10 GB should go to / and the rest to /home
    • If the hard drive is between 30 GB and 40 GB and a dual-boot, 5 GB should go to / and the rest to /home
    • If the hard drive is less than 30 GB and a dual-boot, there should be no separate /home partition.
    The > NSA is releasing configuration guides for several operating systems:

    > National Security Agency- Security Configuration Guides:
    NSA has developed and distributed configuration guidance for operating systems. These guides are currently being used throughout the government and by numerous entities as a security baseline for their systems.
    There are a guide for the Linux (Red Hat Enterprise Linux 5). The rhel5-guide-i731.pdf:
    2.1.1.1 Disk Partitioning

    Some system directories should be placed on their own partitions (or logical volumes). This allows for better separation and protection of data...
    • Create Separate Partition or Logical Volume for /tmp
    • Create Separate Partition or Logical Volume for /var
    • Create Separate Partition or Logical Volume for /var/log
    • Create Separate Partition or Logical Volume for /var/log/audit
    • Create Separate Partition or Logical Volume for /home if Using Local Home
      Directories

    SWAP

    Rule of thumb from the > Swap Partition FAQ:
    As a base minimum, it's highly recommended that the swap space should be equal to the amount of physical memory (RAM). Also, it's recommended that the swap space is twice the amount of physical memory (RAM) depending upon the amount of hard disk space available for the system (although this "recommendation" dates back from a time when physical RAM was very expensive and most Unix systems ran with many processes in swap space - a situation that hardly applies in most situations these days, but ancient Unix/Linux myths like this "recommendation" tend to survive well past their "use by" dates). In reality, if you use hibernation you need what was outlined the relevant paragraph above, otherwise you need as much swap space as your system will use - which may be actually be very little in a modern hardware setup. The only downside to having more swap space than you will actually use is the disk space you will be reserving for it.

    Example Scenarios:
    • Low RAM and low disk space With 512 MB RAM and 30 GB hard disk, use 512 MB for swap since RAM is very low.
    • Low RAM and high disk space With 512 MB RAM and 100 GB hard disk, use 1 GB for swap since RAM is very low and hard disk space is in plenty.
    • High RAM and low disk space With 2 GB RAM and 30 GB hard disk, use 1 GB for swap since hard disk space is very low.
    • High RAM and high disk space With 2 GB RAM and 100 GB hard disk, use 2 GB for swap since hard disk space is plentiful.
    More swap links:
    > All about Linux swap space
    > All About Linux Swap Part 1: Introduction:
    > All About Linux Swap Part 2: Management
    > All About Linux Swap Part 3: Analysis
    > Linux: How to Use RAM as Swap


    More than four partitions

    > Linux Partition HOWTO:
    3.3. Primary Partitions
    The number of partitions on an Intel-based system was limited from the very beginning: The original partition table was installed as part of the boot sector and held space for only four partition entries. These partitions are now called primary partitions.

    3.4. Logical Partitions

    One primary partition of a hard drive may be subpartitioned. These are logical partitions. This effectively allows us to skirt the historical four partition limitation.

    The primary partition used to house the logical partitions is called an extended partition and it has its own file system type (0x05). Unlike primary partitions, logical partitions must be contiguous. Each logical partition contains a pointer to the next logical partition, which implies that the number of logical partitions is unlimited. However, linux imposes limits on the total number of any type of partition on a drive, so this effectively limits the number of logical partitions. This is at most 15 partitions total on an SCSI disk and 63 total on an IDE disk.

    Partition tools

    Commandline

    man fdisk:
    NAME
    fdisk - Partition table manipulator for Linux

    SYNOPSIS
    fdisk [-uc] [-b sectorsize] [-C cyls] [-H heads] [-S sects] device

    fdisk -l [-u] [device...]

    fdisk -s partition...

    fdisk -v

    fdisk -h

    DESCRIPTION
    Hard disks can be divided into one or more logical disks called partitions. This division is
    described in the partition table found in sector 0 of the disk.

    In the BSD world one talks about `disk slices' and a `disklabel'.

    Linux needs at least one partition, namely for its root file system. It can use swap files
    and/or swap partitions, but the latter are more efficient. So, usually one will want a second
    Linux partition dedicated as swap partition. On Intel compatible hardware, the BIOS that
    boots the system can often only access the first 1024 cylinders of the disk. For this reason
    people with large disks often create a third partition, just a few MB large, typically mounted
    on /boot, to store the kernel image and a few auxiliary files needed at boot time, so as to
    make sure that this stuff is accessible to the BIOS. There may be reasons of security, ease
    of administration and backup, or testing, to use more than the minimum number of partitions...
    man mkfs.ext4:
    NAME
    mke2fs - create an ext2/ext3/ext4 filesystem

    SYNOPSIS
    mke2fs [ -c | -l filename ] [ -b block-size ] [ -f fragment-size ] [ -g blocks-per-group ] [
    -G number-of-groups ] [ -i bytes-per-inode ] [ -I inode-size ] [ -j ] [ -J journal-options ] [
    -K ] [ -N number-of-inodes ] [ -n ] [ -m reserved-blocks-percentage ] [ -o creator-os ] [ -O
    feature[,...] ] [ -q ] [ -r fs-revision-level ] [ -E extended-options ] [ -v ] [ -F ] [ -L
    volume-label ] [ -M last-mounted-directory ] [ -S ] [ -t fs-type ] [ -T usage-type ] [ -U UUID
    ] [ -V ] device [ blocks-count ]

    mke2fs -O journal_dev [ -b block-size ] [ -L volume-label ] [ -n ] [ -q ] [ -v ] external-
    journal [ blocks-count ]

    DESCRIPTION
    mke2fs is used to create an ext2, ext3, or ext4 filesystem, usually in a disk partition.
    device is the special file corresponding to the device (e.g /dev/hdXX). blocks-count is the
    number of blocks on the device. If omitted, mke2fs automagically figures the file system
    size. If called as mkfs.ext3 a journal is created as if the -j option was specified.

    The defaults of the parameters for the newly created filesystem, if not overridden by the
    options listed below, are controlled by the /etc/mke2fs.conf configuration file. See the
    mke2fs.conf(5) manual page for more details...

    Graphical tools for partitioning:

    > KDE Partition Manager
    Description:
    KDE Partition Manager is a utility program to help you manage the disk devices, partitions and file systems on your computer. It allows you to easily create, copy, move, delete, resize without losing data, backup and restore partitions.

    KDE Partition Manager supports a large number of file systems, including ext2/3/4, reiserfs, NTFS, FAT16/32, jfs, xfs and more.

    It makes use of external programs to get its job done, so you might have to install additional software (preferably packages from your distribution) to make use of all features and get full support for all file systems.

    KDE Partition Manager is also available as a bootable Live CD.
    Package: partitionmanager:
    Description: A partition management utility
    Partition Manager is a utility program to help you manage the disk devices,
    partitions and file systems on your computer. It allows you to easily create,
    copy, move, delete, resize without losing data, backup and restore partitions.
    .
    Partition Manager supports a large number of file systems, including ext2/3/4,
    reiserfs, NTFS, FAT16/32, jfs, xfs and more. Note that to gain support for a
    specific file system other than ext2/3/4, you should install the corresponding
    suggested package.
    .
    Partition Manager is based on libparted (like gparted) and makes use of the
    KDE libraries for its user interface.
    Homepage: http://www.partitionmanager.org



    > Gnome Partition Editor - GParted:
    GParted is a free partition editor for graphically managing your disk partitions.

    GParted is useful for tasks such as: creating space for new operating systems, restructuring disk space to separate user and operating system data, and copying partitions to enable upgrading to a larger hard disk drive.

    Your hard disk drive or USB flash drive can be subdivided into one or more partitions. GParted enables you to reorganize your disk partitions while preserving the contents of these partitions...
    There is also bootable Live CD (GParted-Live).

    Package gparted:
    Description: GNOME partition editor
    GParted uses libparted to detect and manipulate devices and partition
    tables while several (optional) filesystem tools provide support for
    filesystems not included in libparted.
    Homepage: http://gparted.sourceforge.net
    Last edited by Rog132; Oct 05, 2012, 05:27 AM.
    A good place to start: Topic: Top 20 Kubuntu FAQs & Answers
    Searching FAQ's: Google Search 'FAQ from Kubuntuforums'
Working...
X