gdisk permet de manipuler dans un terminal les tables de partitions GPT ; il se lance en mode administrateur.
Pour lancer gdisk, précisez le nom du périphérique (ex : /dev/sdc), identifié avec lsblk et non monté ; p pour pour voir la liste des partitions présentes :
...@...:~$ sudo gdisk /dev/sdb GPT fdisk (gdisk) version 1.0.3 Partition table scan: MBR: protective BSD: not present APM: not present GPT: present Found valid GPT with protective MBR; using GPT.Command (? for help): p Disk /dev/sdb: 262144000 sectors, 125.0 GiB Model: STORAGE DEVICE Sector size (logical/physical): 512/512 bytes Disk identifier (GUID): 4DEBA284-F77A-4B3B-B89A-3B4BA6B2CEB1 Partition table holds up to 128 entries Main partition table begins at sector 2 and ends at sector 33 First usable sector is 34, last usable sector is 262143966 Partitions will be aligned on 2048-sector boundaries Total free space is 4029 sectors (2.0 MiB) Number Start (sector) End (sector) Size Code Name 1 2048 262141951 125.0 GiB 8300 primary Command (? for help):
; c
; d
; i
; l
; n
; o
; p
; q
; r
Menu de récupération et de transformation
; c
; d
; e
; f
; g
; h
; i
; l
; m
; o
; p
; q
; t
; v
; w
; x
</WRAP>
; t
; v
; w
; x
Menu expert
; c
; d
; e
; f
; g
; h
; i
; l
; m
; n
; o
; p
; q
; r
; s
; t
; u
; v
; z
</WRAP> </WRAP>
Tapez o pour créer une nouvelle table de partition vide au format GPT et confirmez :
Command (? for help): o This option deletes all partitions and creates a new protective MBR. Proceed? (Y/N): y Command (? for help):
Vous pouvez alors :
Tapez n pour créer une nouvelle partition et renseignez :
Contrôlez l'état des partitions en tapant p
Par exemple, pour créer une partition linux de 500 MB :
Command (? for help): p Disk /dev/sdb: 262144000 sectors, 125.0 GiB Model: STORAGE DEVICE Sector size (logical/physical): 512/512 bytes Disk identifier (GUID): 8D2DBD7B-3406-439E-AF31-F0EF56E7C24F Partition table holds up to 128 entries Main partition table begins at sector 2 and ends at sector 33 First usable sector is 34, last usable sector is 262143966 Partitions will be aligned on 2048-sector boundaries Total free space is 262143933 sectors (125.0 GiB) Number Start (sector) End (sector) Size Code Name Command (? for help): nPartition number (1-128, default 1): First sector (34-262143966, default = 2048) or {+-}size{KMGTP}: Last sector (2048-262143966, default = 262143966) or {+-}size{KMGTP}: +500M Current type is 'Linux filesystem' Hex code or GUID (L to show codes, Enter = 8300): Changed type of partition to 'Linux filesystem'Command (? for help): p Disk /dev/sdb: 262144000 sectors, 125.0 GiB Model: STORAGE DEVICE Sector size (logical/physical): 512/512 bytes Disk identifier (GUID): 8D2DBD7B-3406-439E-AF31-F0EF56E7C24F Partition table holds up to 128 entries Main partition table begins at sector 2 and ends at sector 33 First usable sector is 34, last usable sector is 262143966 Partitions will be aligned on 2048-sector boundaries Total free space is 261119933 sectors (124.5 GiB) Number Start (sector) End (sector) Size Code Name 1 2048 1026047 500.0 MiB 8300 Linux filesystem Command (? for help):
Validez les actions en écrivant la table de partitions et quittant l'application : tapez w
Une fois les partitions créées, utilisez la commande MKFS pour les formater.
N'oubliez pas de modifier le fichier /etc/fstab pour ajouter les partitions à votre système.
Basé sur « gdisk » par mortalius.