Handbook:MIPS/Blocks/Disks/pt-br

Partições
Apesar de ser teoricamente possível usar um disco inteiro para alojar um sistema Linux, isso quase nunca é feito na prática. Em vez disso, dispositivos de blocos inteiros são divididos em dispositivos de blocos menores e mais gerenciáveis chamados partições.

Máquinas SGI: Criando rótulo de disco SGI
Todos os discos em um sistema SGI requerem um rótulo de disco ("disk label") onde são armazenadas informações sobre as partições de disco. Ao se criar um novo rótulo de disco SGI serão criadas duas partições especiais no disco:
 * Cabeçalho de volume SGI (9ª partição): Esta partição é importante. É nela que o gerenciador de boot ficará gravado e, em alguns casos, irá conter também a imagem dos kernels.
 * Volume SGI (11ª partição): Esta partição é similar em propósito a terceira partição do rótulo de disco Sun "disco inteiro". Esta partição cobre o disco todo e deve ser mantida intocada. Ela não serve a nenhum propósito especial que não seja ajudar a PROM de alguma forma não documentada (ou ela é usada pelo IRIX de alguma maneira).

Abaixo é mostrada um trecho de uma sessão com o fdisk. Leia-a e ajuste-a às suas necessidades pessoais...

Alterne para o modo expert:

Usando a tecla o menu completo de opções é mostrado:

Build an SGI disk label:

Return to the main menu:

Take a look at the current partition layout:

Resizing the SGI volume header
Now that an SGI Disklabel is created, partitions may now be defined. In the above example, there are already two partitions defined. These are the special partitions mentioned above and should not normally be altered. However, for installing Gentoo, we'll need to load a bootloader, and possibly multiple kernel images (depending on system type) directly into the volume header. The volume header itself can hold up to eight images of any size, with each image allowed eight-character names.

The process of making the volume header larger isn't exactly straight-forward; there's a bit of a trick to it. One cannot simply delete and re-add the volume header due to odd fdisk behavior. In the example provided below, we'll create a 50MB Volume header in conjunction with a 50MB partition. The actual layout of a disk may vary, but this is for illustrative purposes only.

Create a new partition:

Notice how fdisk only allows Partition #1 to be re-created starting at a minimum of cylinder 5? If we attempted to delete & re-create the SGI Volume Header this way, this is the same issue we would have encountered. In our example, we want to be 50MB, so we start it at cylinder 51 (the Volume Header needs to start at cylinder 0, remember?), and set its ending cylinder to 101, which will roughly be 50MB (+/- 1-5MB).

Delete the partition:

Now recreate it:

If unsure how to use fdisk have a look down further at the instructions for partitioning on Cobalts. The concepts are exactly the same -- just remember to leave the volume header and whole disk partitions alone.

Once this is done, create the rest of your partitions as needed. After all the partitions are laid out, make sure to set the partition ID of the swap partition to 82, which is Linux Swap. By default, it will be 83, Linux Native.

Partitioning Cobalt drives
On Cobalt machines, the BOOTROM expects to see a MS-DOS MBR, so partitioning the drive is relatively straightforward -- in fact, it's done the same way as done for an Intel x86 machine. However there are some things you need to bear in mind.
 * Cobalt firmware will expect to be a Linux partition formatted EXT2 Revision 0. EXT2 Revision 1 partitions will NOT WORK! (The Cobalt BOOTROM only understands EXT2r0)
 * The above said partition must contain a gzipped ELF image, vmlinux.gz in the root of that partition, which it loads as the kernel

For that reason, it is recommended to create a ~20MB partition formatted EXT2r0 upon which to install CoLo & kernels. This allows the user to run a modern filesystem (EXT3 or ReiserFS) for the root filesystem.

In the example, it is assumed that is created to mount later as a  partition. To make this /, keep the PROM's expectations in mind.

So, continuing on... To create the partitions type  at the prompt. The main commands to know are these:

List of important fdisk commands

Start by clearing out any existing partitions:

Now verify the partition table is empty using the command:

Create the /boot partition:

When printing the partitions, notice the newly created one:

Let's now create an extended partition that covers the remainder of the disk. In that extended partition, we'll create the rest (logical partitions):

Now we create the partition,, , et.

Repeat this as needed.

Last but not least, the swap space. It is recommended to have at least 250MB swap, preferrably 1GB:

When checking the partition table, everything should be ready - one thing notwithstanding.

Notice how #10, the swap partition is still type 83? Let's change that to the proper type:

Now verify:

We write out the new partition table: