26.12.2014 Views

Gentoo Linux AMD64 Handbook

Gentoo Linux AMD64 Handbook

Gentoo Linux AMD64 Handbook

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Preparing the Disks<br />

/usr is rather full (83% used) here, but once all software is installed, /usr doesn't tend to grow that<br />

much. Although allocating a few gigabytes of disk space for /var may seem excessive, remember<br />

that Portage uses this partition by default for compiling packages. If you want to keep /var at a more<br />

reasonable size, such as 1GB, you will need to alter your PORTAGE_TMPDIR variable in /etc/<br />

portage/make.conf to point to the partition with enough free space for compiling extremely<br />

large packages such as OpenOffice.<br />

Using fdisk to Partition your Disk<br />

Important<br />

If your environment will deal with partitions larger than 2 TB, please use the Using parted<br />

to Partition your Disk [#parted] instructions instead. fdisk is not able to deal with larger<br />

partitions.<br />

The following parts explain how to create the example partition layout using fdisk. The example<br />

partition layout was mentioned earlier:<br />

Partition<br />

/dev/sda1<br />

/dev/sda2<br />

/dev/sda3<br />

Description<br />

Boot partition<br />

Swap partition<br />

Root partition<br />

Change your partition layout according to your own preference.<br />

Viewing the Current Partition Layout<br />

fdisk is a popular and powerful tool to split your disk into partitions. Fire up fdisk on your disk (in<br />

our example, we use /dev/sda):<br />

Example 4.2. Starting fdisk<br />

# fdisk /dev/sda<br />

Once in fdisk, you'll be greeted with a prompt that looks like this:<br />

Example 4.3. fdisk prompt<br />

Command (m for help):<br />

Type p to display your disk's current partition configuration:<br />

Example 4.4. An example partition configuration<br />

Command (m for help): p<br />

Disk /dev/sda: 240 heads, 63 sectors, 2184 cylinders<br />

Units = cylinders of 15120 * 512 bytes<br />

Device Boot Start End Blocks Id System<br />

/dev/sda1 * 1 14 105808+ 83 <strong>Linux</strong><br />

/dev/sda2 15 49 264600 82 <strong>Linux</strong> swap<br />

/dev/sda3 50 70 158760 83 <strong>Linux</strong><br />

24

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!