Handbook:SPARC/Installation/Disks/fr
Introduction aux périphériques de type bloc
Les périphériques de type bloc
Étudions en détail les aspects de Gentoo et de Linux en général qui concernent les disques, incluant les périphériques de type bloc, les partitions, et les systèmes de fichiers de Linux. Une fois que les tenants et les aboutissants des disques seront compris, il sera possible d’établir les partitions et les systèmes de fichiers pour l’installation.
Pour commencer, intéressons-nous aux périphériques de type bloc. Les disques SCSI et Serial ATA sont tous les deux étiquetés avec des noms de périphérique tels que : /dev/sda, /dev/sdb, /dev/sdc, etc. Sur des machines plus modernes, les disques SSD NVMe basés sur PCI Express ont des noms de périphérique tels que : /dev/nvme0n1, /dev/nvme0n2, etc.
Le tableau suivant aidera les lecteurs à déterminer où trouver certaines catégories de périphériques de type bloc sur le système :
Type de périphérique | Chemin par défaut | Commentaires |
---|---|---|
SATA, SAS, SCSI ou USB | /dev/sda | Se trouve dans le matériel à partir de 2007 jusqu’à présent, ce sont les plus courants. Ils se connectent via un bus SATA, SCSI ou USB comme un bloc de stockage. Par exemple, la 1re partition d’un périphérique SATA sera /dev/sda1. |
NVM Express (NVMe) | /dev/nvme0n1 | La dernière technologie pour les disques SSD. Les disques NVMe sont connectés directement au bus PCI Express et ont la plus rapide vitesse de transfert sur le marché. Le matériel est sorti à partir de 2014, le support est maintenant fréquent. La 1re partition d’un périphérique NVMe sera /dev/nvme0n1p1. |
MMC, eMMC et SD | /dev/mmcblk0 | Les cartes MMC, SD et les autres types de mémoire peuvent être utiles pour le stockage. Ceci étant dit, peu de systèmes permettent une amorce à partir de ce type de périphérique. Il est suggéré de ne pas utiliser cela pour une installation Linux ; mais plutôt de les cantonner au transfert de fichiers, leur but initial. Alternativement, ce type de stockage peut être pratique pour des sauvegardes à court terme. |
Les périphériques de type bloc ci-dessus représentent une interface abstraite pour le disque. Les programmes utilisateurs peuvent utiliser ces périphériques de type bloc pour interagir avec le disque sans se soucier de savoir s’il est SATA, SCSI ou quelque chose d’autre. Le programme peut simplement adresser le stockage sur le disque comme un groupe de blocs contigus de 4096 octets (4 Kio), accessibles aléatoirement.
Partition tables
Although it is theoretically possible to use a raw, unpartitioned disk to house a Linux system (when creating a btrfs RAID for example), this is almost never done in practice. Instead, disk block devices are split up into smaller, more manageable block devices. On sparc systems, these are called partitions. There are currently two standard partitioning technologies in use: Sun and GPT; the latter is supported only on more recent systems with a sufficiently recent firmware.
GUID Partition Table (GPT)
The GUID Partition Table (GPT) setup (also called GPT disklabel) uses 64-bit identifiers for the partitions. The location in which it stores the partition information is much bigger than the 512 bytes of the MBR partition table (DOS disklabel), which means there is practically no limit on the amount of partitions for a GPT disk. Also the size of a partition is bounded by a much greater limit (almost 8 ZiB - yes, zebibytes).
GPT also takes advantage of checksumming and redundancy. It carries CRC32 checksums to detect errors in the header and partition tables and has a backup GPT at the end of the disk. This backup table can be used to recover damage of the primary GPT near the beginning of the disk.
GPT is only supported on Oracle SPARC machines of the T4 generation or newer. Additionally, only certain more recent firmware includes GPT support. There are several methods to check whether GPT support is available.
From the OBP prompt, execute:
{0} ok
cd /packages/disk-label
{0} ok
.properties
supported-labels gpt
sun mbrname disk-label
If gpt is included in the output, then GPT support is available. Alternatively, this can be determined from the installation media without entering OBP. Use the prtconf command from sys-apps/sparc-utils to access this information from userspace:
root #
prtconf -pv | grep -c gpt
Or, check if the file /sys/firmware/devicetree/base/packages/disk-label/gpt exists. If none of these methods succeeds, then a firmware update is required in order to support GPT.
Sun partition table
Systems not manufactured by Oracle, T3 or earlier systems, or systems running an earlier firmware must use the Sun partition table type.
The third partition on Sun systems is set aside as a special "whole disk" slice. This partition must not contain a file system.
Users who are used to the DOS partitioning scheme should note that Sun partition tables do not have "primary" and "extended" partitions. Instead, up to eight partitions are available per drive, with the third of these being reserved.
The Handbook authors suggest using GPT whenever possible for Gentoo installations.
Default partitioning scheme
Due to the differences in required partition layout between GPT and Sun partition tables, a single partitioning scheme is not sufficient to support all possible system requirements. Some example schemes are provided below.
GPT partition scheme
The following partitioning scheme will be used as an example for GPT-formatted disks:
Partition | Filesystem | Size | Mount Point | Description |
---|---|---|---|---|
/dev/sda1 | (none) | 2M | none | BIOS boot partition |
/dev/sda2 | (swap) | RAM size * 2 | none | Swap partition |
/dev/sda3 | ext4 | Rest of the disk | / | Root partition |
Sun formatted partition scheme
The following partitioning scheme will be used as an example for Sun-formatted disks:
Partition | Filesystem | Size | Mount Point | Description |
---|---|---|---|---|
/dev/sda1 | ext4 | Disk size minus swap | / | Root partition |
/dev/sda2 | (swap) | RAM size * 2 | none | Swap partition |
/dev/sda3 | (none) | Whole disk | none | Whole disk partition.
Required on disks using the Sun partition table. |
SPARC systems using OBP version 3 or older have additional restrictions on their partitioning scheme. The root partition must be the first partition on the disk, and it may be no larger than 2 GiB. For this reason, such systems will require additional sufficiently-sized partitions for top-level directories, such as /usr, /var, /home, and other directories which would likely cause the root partition to exceed this limit. These systems are also likely to require the Sun partition table type, so do not forget to include the whole disk partition.
Partitioning the disk with GPT
The following parts explain how to create the example partition layout for a GPT installation using fdisk. The example partition layout was mentioned earlier:
Partition | Description |
---|---|
/dev/sda1 | Boot partition |
/dev/sda2 | Swap partition |
/dev/sda3 | Root partition |
Change the partition layout according the system's needs.
Viewing the current partition layout
fdisk is a popular and powerful tool to split a disk into partitions. Fire up fdisk against the disk (in the example, /dev/sda is used):
root #
fdisk /dev/sda
Use the p key to display the disk's current partition configuration:
Command (m for help):
p
Disk /dev/sda: 14.57 GiB, 15640625152 bytes, 30548096 sectors Disk model: USB Flash Disk Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: 9850A2C2-76C4-FC47-9F0B-DA60449D2413 Device Start End Sectors Size Type /dev/sda1 2048 30547967 30545920 14.6G Linux filesystem
Creating a new disklabel and removing all existing partitions
Type g to create a new GPT disklabel on the disk; this will remove all existing partitions.
Command (m for help):
g
Created a new GPT disklabel (GUID: 9850A2C2-76C4-FC47-9F0B-DA60449D2413).
For an existing GPT disklabel (see the output of p above), alternatively consider removing the existing partitions one by one from the disk. Type d to delete a partition. For instance, to delete an existing /dev/sda1:
Command (m for help):
d
Selected partition 1 Partition 1 has been deleted.
The partition has now been scheduled for deletion. It will no longer show up when printing the list of partitions (p, but it will not be erased until the changes have been saved. This allows users to abort the operation if a mistake was made - in that case, type q immediately and hit Enter and the partition will not be deleted.
Repeatedly type p to print out a partition listing and then type d and the number of the partition to delete it. Eventually, the partition table will be empty:
Command (m for help):
p
Disk /dev/sda: 14.57 GiB, 15640625152 bytes, 30548096 sectors Disk model: USB Flash Disk Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: 9850A2C2-76C4-FC47-9F0B-DA60449D2413
Now that the in-memory partition table is empty, we're ready to create the partitions.
Creating the BIOS boot partition
First, create the BIOS boot partition. Type n to create a new partition, followed by 1 to select the first partition. When prompted for the first sector, make sure it starts from 2048 (which may be needed for the boot loader) and hit Enter. When prompted for the last sector, type +2M to create a partition 2 Mbyte in size:
Command (m for help):
n
Partition number (1-128, default 1): First sector (2048-30548062, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-30548062, default 30547967): +2M Created a new partition 1 of type 'Linux filesystem' and of size 2 MiB.
Mark the partition as a BIOS boot partition:
Command (m for help):
t
Selected partition 1 Partition type or alias (type L to list all): 4 Changed type of partition 'Linux filesystem' to 'BIOS boot'.
Creating the swap partition
Next, to create the swap partition, type n to create a new partition, then type 2 to create the second partition, /dev/sda2. When prompted for the first sector, hit Enter. When prompted for the last sector, type +4G (or any other size needed for the swap space) to create a partition 4 GiB in size.
Command (m for help):
n
Partition number (2-128, default 2): First sector (6144-30548062, default 6144): Last sector, +/-sectors or +/-size{K,M,G,T,P} (6144-30548062, default 30547967): +4G Created a new partition 2 of type 'Linux filesystem' and of size 4 GiB.
After all this is done, type t to set the partition type, 2 to select the partition just created and then type in 19 to set the partition type to "Linux Swap".
Command (m for help):
t
Partition number (1,2, default 2): 2 Partition type (type L to list all types): 19 Changed type of partition 'Linux filesystem' to 'Linux swap'.
Creating the root partition
Finally, to create the root partition, type n to create a new partition. Then type 3 to create the third partition, /dev/sda3. When prompted for the first sector, hit Enter. When prompted for the last sector, hit Enter to create a partition that takes up the rest of the remaining space on the disk. After completing these steps, typing p should display a partition table that looks similar to this:
Command (m for help):
p
Disk /dev/sda: 14.57 GiB, 15640625152 bytes, 30548096 sectors Disk model: USB Flash Disk Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: 9850A2C2-76C4-FC47-9F0B-DA60449D2413 Device Start End Sectors Size Type /dev/sda1 2048 6143 4096 2M BIOS boot /dev/sda2 6144 8394751 8388608 4G Linux swap /dev/sda3 8394752 30547967 22153216 10.6G Linux filesystem
Saving the partition layout
To save the partition layout and exit fdisk, type w.
Command (m for help):
w
With the partitions created, it is now time to put filesystems on them.
Partitioning the disk with a Sun partition table
The following parts explain how to create the example partition layout for a Sun partition table installation using fdisk. The example partition layout was mentioned earlier:
Partition | Description |
---|---|
/dev/sda1 | Root partition |
/dev/sda2 | Swap partition |
/dev/sda3 | Whole disk partition |
Change the partition layout according to personal preference. If partitioning for a system using OBP version 3 or earlier, ensure that the root partition is less than 2G in size, and additionally create partitions /dev/sda4 and onward for additional filesystems.
Viewing the current partition layout
fdisk is a popular and powerful tool to split a disk into partitions. Fire up fdisk against the disk (in our example, we use /dev/sda):
root #
fdisk /dev/sda
Use the p key to display the disk's current partition configuration:
Command (m for help):
p
Disk model: USB Flash Disk Geometry: 64 heads, 32 sectors/track, 14916 cylinders Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: sun Device Start End Sectors Size Id Type Flags /dev/sda1 0 30445567 30445568 14.5G 83 Linux native /dev/sda2 30445568 30547967 102400 50M 82 Linux swap u /dev/sda3 0 30547967 30547968 14.6G 5 Whole disk
Creating a new disklabel / removing all partitions
Type s to create a new Sun disklabel on the disk; this will remove all existing partitions.
Command (m for help):
s
Created a new partition 1 of type 'Linux native' and of size 14.5 GiB. Created a new partition 2 of type 'Linux swap' and of size 50 MiB. Created a new partition 3 of type 'Whole disk' and of size 14.6 GiB. Created a new Sun disklabel.
For an existing Sun disklabel (see the output of p above), alternatively consider removing the existing partitions one by one from the disk. Type d to delete a partition. For instance, to delete an existing /dev/sda1:
Command (m for help):
d
Partition number (1-3, default 3): 1 Partition 1 has been deleted.
The partition has now been scheduled for deletion. It will no longer show up when printing the list of partitions (p, but it will not be erased until the changes have been saved. This allows users to abort the operation if a mistake was made - in that case, type q immediately and hit Enter and the partition will not be deleted.
Repeatedly type p to print out a partition listing and then type d and the number of the partition to delete it. Eventually, the partition table will be empty:
Command (m for help):
p
Disk /dev/sda: 14.57 GiB, 15640625152 bytes, 30548096 sectors Disk model: USB Flash Disk Geometry: 64 heads, 32 sectors/track, 14916 cylinders Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: sun
Now that the in-memory partition table is empty, we're ready to create the partitions.
Creating the whole disk partition
First, create the whole disk partition. Type n to create a new partition, followed by 3 to select the third partition. When prompted for the first sector, hit Enter. When prompted for the last sector, hit Enter to create a partition that takes up all of the space on the disk.
Command (m for help):
n
Partition number (1-8, default 1): 3 It is highly recommended that the third partition covers the whole disk and is of type `Whole disk' First sector (0-30547968, default 0): Last sector or +/-sectors or +/-size{K,M,G,T,P} (0-30547968, default 30547968): Created a new partition 3 of type 'Whole disk' and of size 14.6 GiB.
fdisk will automatically set the type of such a partition to 'Whole disk', so there is no need to explicitly set the type.
Creating the root partition
Next, to create the root partition, type n to create a new partition. Then type 1 to create the third partition, /dev/sda1. When prompted for the first sector, hit Enter. When prompted for the last sector, type -4G (or whatever space is required for non-root partitions). After completing these steps, typing p should display a partition table that looks similar to this:
Command (m for help):
p
Disk /dev/sda: 14.57 GiB, 15640625152 bytes, 30548096 sectors Disk model: USB Flash Disk Geometry: 64 heads, 32 sectors/track, 14916 cylinders Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: sun Device Start End Sectors Size Id Type Flags /dev/sda1 0 22159359 22159360 10.6G 83 Linux native /dev/sda3 0 30547967 30547968 14.6G 5 Whole disk
Creating the swap partition
Finally, to create the swap partition, type n to create a new partition, then type 2 to create the second partition, /dev/sda2. When prompted for the first sector, hit Enter. When prompted for the last sector, hit Enter to take up the remaining space on the disk.
Command (m for help):
n
Partition number (2,4-8, default 2): First sector (22159360-30547968, default 22159360): Last sector or +/-sectors or +/-size{K,M,G,T,P} (22159360-30547968, default 30547968): Created a new partition 2 of type 'Linux native' and of size 4 GiB.
After all this is done, type t to set the partition type, 2 to select the partition just created and then type in 82 to set the partition type to "Linux Swap".
Command (m for help):
t
Partition number (1-3, default 3): 2 Hex code (type L to list all codes): 82 Changed type of partition 'Linux native' to 'Linux swap'.
After completing these steps, typing p should display a partition table that looks similar to this:
Command (m for help):
p
Disk /dev/sda: 14.57 GiB, 15640625152 bytes, 30548096 sectors Disk model: USB Flash Disk Geometry: 64 heads, 32 sectors/track, 14916 cylinders Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: sun Device Start End Sectors Size Id Type Flags /dev/sda1 0 22159359 22159360 10.6G 83 Linux native /dev/sda2 22159360 30547967 8388608 4G 82 Linux swap u /dev/sda3 0 30547967 30547968 14.6G 5 Whole disk
Saving the partition layout
To save the partition layout and exit fdisk, type w.
Command (m for help):
w
With the partitions created, it is now time to put filesystems on them.
Créer des systèmes de fichiers
Il est sage de vérifier les mises à jour du micrologiciel des disques SSD ou MVNe. Certains SSD Intel (en particulier 600p et 6000p) nécessaire une mise à jour pour éviter une corruption de données sur des types d’usage avec XFS. Le problème est au niveau du micrologiciel et pas XFS. L’outil smartctl peut aider à identifier le modèle et la version du micrologiciel.
Introduction
Maintenant que les partitions ont été créées, il est temps d’y placer un système de fichiers. Dans la section suivante les différents systèmes de fichiers que Linux prend en charge seront décris. Les lecteurs qui connaissent déjà quel système de fichiers utiliser peuvent continuer avec Appliquer un système de fichiers à une partition. Les autres devraient continuer à lire pour en apprendre plus sur les systèmes de fichiers disponibles.
Les systèmes de fichiers
Linux supporte des douzaines de systèmes de fichiers, bien que la plupart ne devrait être utilisés que dans des cas spécifiques. Seuls certains seront dans l’architecture sparc – il est conseillé de se renseigner sur les systèmes de fichiers et leur prise en charge avant d’en choisir un plus expérimental pour les partitions importantes. XFS est celui recommandé pour tous les usages et toutes les plates-formes. Ci-dessous une liste non exhaustive :
- XFS
- Un système de fichiers avec journalisation des métadonnées, doté d’un ensemble de fonctionnalités robuste et optimisé pour la mise à l’échelle. Il a été continuellement mis à jour avec de nouvelles fonctionnalités. Le seul inconvénient est que les partitions XFS ne peuvent pas encore être réduites, bien que ce soit en cours de développement. XFS supporte reflink (un lien vers un bloc de données ; ie. : si le fichier original est modifié, les blocs sont copiés pour que le reflink continue de comporter les mêmes valeurs) et CoW (Copy on Write ; ie. : si plusieurs processus ouvrent le même fichier et qu’un le modifie, cela crée une copie transparent pour que le changement ne soit pas visible par les autres processus) qui sont particulièrement utilie dans un système Gentoo par rapport au nombre de compilation qu’un utilisateur fait. Nécessaire d’avoir une partition d’au moins 300 Mio.
- ext4
- Ext4 est un système de fichiers fiable, tous usages, toutes plates-forme tout, bien qu’il manque des fonctionnalités modernes comme les reflinks.
- VFAT
- Également connu sous le nom FAT32, ce format est supporté par Linux mais ne prend pas en charge les paramètres d’autorisation UNIX standards. Il est principalement utilisé pour l’interopérabilité avec d’autres systèmes d’exploitation (Microsoft Windows ou Apple macOS) mais est également une nécessité pour certains micrologiciels systèmes (comme UEFI). Les utilisateurs d’un système UEFI devront avoir une Partition système EFI formattée avec VFAT pour démarrer.
- btrfs
- Un système de fichiers de nouvelle génération offrant de nombreuses fonctionnalités avancées telles que les sauvegardes instantanés, l’auto-guérison via des sommes de contrôle, la compression transparente, les sous-volumes et le RAID intégré. Les noyaux avant 5.4.x ne sont pas sûrs pour un usage de Btrfs en production car certains correctifs importants sont seulement présent dans les dernières versions. Les quotas par groupe et le RAID 5/6 ne sont pas sûrs d’usage quelque soit la version.
- F2FS
- Le système de fichiers ami des SSD (disque flash) a été créé par Samsung pour l’utilisation avec la mémoire flash NAND. C’est un choix décent lors de l’installation de Gentoo sur des cartes microSD, des clés USB ou autres périphériques de stockage flash.
- NTFS
- Ce système de fichiers « nouvelle technologie » est le système de fichiers phare de Microsoft Windows depuis NT 3.1. Comme VFAT ci-dessus, il ne stocke pas les paramètres d’autorisation UNIX ni les attributs étendus nécessaires au bon fonctionnement de BSD ou de Linux. Il ne peut donc pas être utilisé comme système de fichiers racine (aussi appelé root) dans la majorité des cas. Il devrait seulement être utilisé pour l’interopérabilité avec les systèmes Microsoft Windows (noter l’emphase sur seulement).
- ZFS Important: Les partitions ZFS peuvent seulement être crées depuis un LiveGUI. Pour plus d’informations, se référer à ZFS/rootfs
- Système de fichiers nouvelle génération créé par Matthew Ahrens et Jeff Bonwick. Il a été conçu autour de quelques idées clés : l’administration du stockage doit être simple, la redondance être géré par le système de fichiers, le système ne soit pas être arrêté pour une réparation, des simulations des pires scénarios avant de livrer les versions et l’intégrité des données est primordial.
- bcachefs Important: Bcachefs est encore noté expérimental dans le noyau ; aussi vérifiez que les données soient bien sauvegardées régulièrement dans un support sans Bcachefs.
- Bcachefs est un système de fichiers arbre B (B-tree) basé sur Bcache. Il comporte des fonctionnalités comme CoW (Copy on Write), la compression et le chiffrement. Bcachefs est comparable à Btrfs et ZFS. Une différence notable est le stockage multi-niveaux natif ; permettant d’utiliser un disque plus rapide (comme un disque SSD ou NVMe) pour faire office de cache pour un disque plus lent dans une grappe gérant de manière transparente l’activité sur les fichiers.
Des informations plus approfondies sur les systèmes de fichiers peuvent être trouvées dans les documentations maintenues par la communauté.
Mettre en œuvre un système de fichiers sur une partition
Assurez-vous d’installer les utilitaires correspondant au système de fichiers choisi avant de redémarrer. Il y aura un rappel à la fin de cette procédure d’installation.
Pour créer un système de fichiers sur une partition ou un volume, des outils sont disponibles pour chaque système de fichiers. Cliquer sur le nom du système de fichiers dans le tableau ci-dessous pour plus d’informations sur chaque système de fichiers :
Système de fichiers | Commande pour la création | Sur le CD minimal ? | Paquet |
---|---|---|---|
XFS | mkfs.xfs | Oui | sys-fs/xfsprogs |
ext4 | mkfs.ext4 | Oui | sys-fs/e2fsprogs |
VFAT (FAT32, ...) | mkfs.vfat | Oui | sys-fs/dosfstools |
btrfs | mkfs.btrfs | Oui | sys-fs/btrfs-progs |
F2FS | mkfs.f2fs | Oui | sys-fs/f2fs-tools |
NTFS | mkfs.ntfs | Oui | sys-fs/ntfs3g |
ZFS | zpool create ... | Non | sys-fs/zfs |
Le manuel recommande une nouvelle partition dans le cadre d’une installation, mais il est important de noter que n’importe quelle commande mkfs va effacer toute donnée contenue dans ladite partition. Si nécessaire, assurez-vous que chaque donnée soit sauvegardée avant cela.
Par exemple, pour avoir une partition racine (/dev/sda1) en xfs, les commandes suivantes doivent être utilisées :
root #
mkfs.xfs /dev/sda1
Système de fichiers pour un BIOS déprécié
Les systèmes démarrant via un BIOS déprécié et avec un disque MBR/DOS peuvent utiliser n’importe quelle système de fichiers supportés par l’application d’amorçage (bootloader, comme GRUB).
Par exemple, pour formater en XFS :
root #
mkfs.xfs
Petite partition ext4
Lors de l'utilisation d’u système de fichiers ext4 sur une petite partition (moins de 8 Gio), le système de fichiers devraient être créé avec les options appropriées pour réserver suffisamment de nœuds d’index (inodes). Cela peut se faire avec l’option -T small
:
root #
mkfs.ext4 -T small /dev/<device>
Faire cela quadruple le nombre de nœuds d’index pour un système de fichiers étant donné que son paramètre bytes-per-inode (octets par nœud d’index) passe de un tous les 16 Kio à un tous les 4 Kio.
Activer la partition d’échange
mkswap est la commande à utiliser pour initialiser les partitions d’échange :
root #
mkswap /dev/sda2
Les installations débutées précédemment, mais non terminée peuvent reprendre ici dans le manuel. Utilisez ce lien comme lien permanent : La reprise d’installation reprend ici.
Pour activer la partition d’échange, utilisez la commande swapon :
root #
swapon /dev/sda2
Cette étape d’« activation » est nécessaire car la partition d’échange est nouvellement créée dans un environnement démarré. Lors du redémarrage, si la partition est correctement déclarée dans fstab ou un autre mécanisme de montage, l’espace d’échange sera activé automatiquement.
Monter la partition racine
Certains environnements peuvent ignorer le montage de la partition racine Gentoo (/mnt/gentoo) suggéré, ou monter des partitions additionnelles créées lors du partitionnement :
root #
mkdir --parents /mnt/gentoo
Continuez à créer les points de montage additionnel pour chaque partition durant les étapes précédentes avec la commande mkdir.
Avec les points de montage créés, il est maintenant le moment de rendre les partitions accessibles via la commande mount.
Monter la partition racine :
root #
mount /dev/sda1 /mnt/gentoo
Continuez à monter des partitions additionnelles avec la commande mount.
Si /tmp/ doit se trouver sur une partition séparée, pensez à changer ses droits d'accès après le montage :
root #
chmod 1777 /mnt/gentoo/tmp
Plus loin dans les instructions, le système de fichiers proc (une interface virtuelle avec le noyau) ainsi que d’autres pseudos systèmes de fichiers du noyau seront montés. Mais d’abord, nous devons copier les fichiers d’installation de Gentoo.