Handbook:SPARC/Blocks/Disks/ru

Разделы
Несмотря на то, что теоретически возможно использовать весь диск для размещения системы Linux, это почти никогда не делается на практике. Вместо этого, блочное устройство разбивается на меньшие, более управляемые блочные устройства. Они называются разделами или слайс (slice).

Первый раздел на первом SCSI-диске — это, второй — и так далее.

На системах Sun третий раздел используется как специальный слайс "whole disk". Этот раздел не должен содержать какой-либо файловой системы.

Users who are used to the DOS partitioning scheme should note that Sun disklabels do not have "primary" and "extended" partitions. Instead, up to eight partitions are available per drive, with the third of these being reserved.

Схема разделов по умолчанию
The table below suggests a suitable starting point for most systems. Note that this is only an example, so feel free to use different partitioning schemes.

Использование fdisk для создания разделов на диске
The following parts explain how to create the example partition layout described previously, namely:

Change the partition layout as required. Remember to keep the root partition entirely within the first 2 GB of the disk for older systems. There is also a 15-partition limit for SCSI and SATA.

Запуск fdisk
Запустите fdisk, указав диск как аргумент:

Нажмите, чтобы увидеть уже существующие разделы нажмите:

Note the Sun disk label in the output. If this is missing, the disk is using the DOS-partitioning, not the Sun partitioning. In this case, use to ensure that the disk has a Sun partition table:

The right values can be found in the documentation of the hard disk itself. The 'auto configure' option does not usually work.

Удаление существующих разделов
It's time to delete any existing partitions. To do this, type and hit. Give the partition number to delete. To delete a pre-existing, type:

Do not delete partition 3 (whole disk). This is required. If this partition does not exist, follow the "Creating a Sun Disklabel" instructions above.

After deleting all partitions except the Whole disk slice,a partition layout similar to the following should show up:

Создание коревого раздела
Next create the root partition. To do this, type to create a new partition, then type  to create the partition. When prompted for the first cylinder, hit. When prompted for the last cylinder, type +512M to create a partition 512 MB in size. Make sure that the entire root partition fits within the first 2 GB of the disk. The output of these steps is as follows:

When listing the partitions (through ), the following partition printout is shown:

Создание раздела подкачки
Next, let's create the swap partition. To do this, type to create a new partition, then  to create the second partition,  in our case. When prompted for the first cylinder, hit. When prompted for the last cylinder, type +512M to create a partition 512 MB in size. After this, type to set the partition type,  to select the partition just created and then type in 82 to set the partition type to "Linux Swap". After completing these steps, typing should display a partition table that looks similar to this:

Создание разделов usr, var и home
Finally, let's create the, and  partitions. As before, type to create a new partition, then type  to create the third partition (we do not count the whole disk as being a partition),  in our case. When prompted for the first cylinder, hit. When prompted for the last cylinder, enter +2048M to create a partition 2 GB in size. Repeat this process for and, using the desired sizes. When finished, the partition table will look similar to the following:

Сохранение и выход
Сохраните разметку разделов и выйдите из fdisk нажав.