Handbook:MIPS/Blocks/Disks/de

Partitionen
Obwohl es theoretisch möglich wäre eine vollständige Festplatte zu nutzen um ein Linux-System unterzubringen, kommt das in der Praxis fast nie vor. Stattdessen werden komplette Festplatten Block Devices in kleinere, besser handhabbare Block Devices unterteilt. Diese werden Partitionen genannt.

SGI Maschinen: SGI Plattenlabel erstellen
Alle Festplatten in einem SGI System benötigen ein SGI Plattenlabel, welches eine ähnliche Funktionalität wie ein Sun oder MS-DOS Plattenlabel bietet -- es speichert Informationen über die Partitionen einer Festplatte. Die Erzeugung eines neuen SGI Plattenlabels erzeugt zwei spezielle Partitionen auf der Festplatte:
 * SGI Volume Header (9. Partition): Diese Partition ist wichtig. Sie ist der Ort an dem sich der Bootloader befindet und in einigen Fällen enthält sie ebenfalls die Kernel-Abbilder.
 * SGI Volume (11. Partition): Diese Partition ist ähnlich wichtig wie die dritte Partition des Sun Plattenlabels "Whole Disk". Diese Partition umschließt die gesamte Festplatte und solle unberührt bleiben. Sie dient keinem anderen speziellen Zweck außer das PROM in undokumentierter Weise zu unterstützen (oder es wird irgendwie von IRIX verwendet).

Das Folgende ist ein Beispiel-Auszug einer fdisk Sitzung. Lesen und passen Sie es Ihren persönlichen Bedürfnissen an ...

Wechseln Sie in den Expertenmodus:

Mit wird das vollständige Menü der Optionen angezeigt:

Erzeugen Sie ein SGI Plattenlabel:

Kehren Sie zum Hauptmenü zurück:

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: