GPT o GUID Partition Table è una architettura per la tabella delle partizione di un disco fisso che è parte dell’iniziativa EFI ( Extensible Firmware Interface ) e si espande sul precedente MBR schema che ha caratterizzato i pc intel. Per questioni di compatibilità è presente un riferimento MBR così da evitare che applicazioni MBR non riconoscano e sovrascivano il GPT.
gdisk o GPT fdisk è un applicazione che consente di convertire la tabella di partizioni da MBR nel formato GPT senza perdita di dati .
In Debian linux gdisk si installa con il tradizionale
# apt install gdisk
Per trasformare un disco da MBR avviare gdisk in modalità super user con il percorso dellìunità da convertire
# gdisk /dev/sdd
# gdisk /dev/sdd
GPT fdisk (gdisk) version 1.0.1
Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: not present
***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by
typing 'q' if you don't want to convert your MBR partitions
to GPT format!
***************************************************************
Command (? for help):
gdisk ci informa che la tabella è di tipo MBR e che sta convertendo in memoria MBR to GPT. p elenca le partizioni.
Command (? for help): p
Disk /dev/sdd: 60063744 sectors, 28.6 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 0AAB9071-64BD-4A15-86F9-8D3E9B9F34DC
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 60063710
Partitions will be aligned on 2048-sector boundaries
Total free space is 39743548 sectors (19.0 GiB)
Number Start (sector) End (sector) Size Code Name
1 11278336 13930495 1.3 GiB 0700 Microsoft basic data
2 21985280 39653248 8.4 GiB 0700 Microsoft basic data
Con m si accede al menu. Se si preme w si scrive su disco il contenuto della memoria con la partizioni MBR convertite in formato GPT.
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!
Do you want to proceed? (Y/N):
OK; writing new GUID partition table (GPT) to /dev/sdd.
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot or after you
run partprobe(8) or kpartx(8)
The operation has completed successfully.
Creazione partizione EFI System digitando n. La partizione EFI system ( ESP Partition) contiene i boot loader per i SO da avviare ed è utilizata dal firmware UEFI in fase di avvio del computer.
Command (? for help): n Partition number (1-128, default 1): 1 First sector (34-60063710, default = 39653376) or {+-}size{KMGTP}: 2048 Last sector (39653376-60063710, default = 60063710) or {+-}size{KMGTP}: +512M Current type is 'Linux filesystem' Hex code or GUID (L to show codes, Enter = 8300): 0700 Microsoft basic data 0c01 Microsoft reserved 2700 Windows RE 3000 ONIE boot 3001 ONIE config 3900 Plan 9 4100 PowerPC PReP boot 4200 Windows LDM data 4201 Windows LDM metadata 4202 Windows Storage Spac 7501 IBM GPFS 7f00 ChromeOS kernel 7f01 ChromeOS root 7f02 ChromeOS reserved 8200 Linux swap 8300 Linux filesystem 8301 Linux reserved 8302 Linux /home 8303 Linux x86 root (/) 8304 Linux x86-64 root (/ 8305 Linux ARM64 root (/) 8306 Linux /srv 8307 Linux ARM32 root (/) 8400 Intel Rapid Start 8e00 Linux LVM a500 FreeBSD disklabel a501 FreeBSD boot a502 FreeBSD swap a503 FreeBSD UFS a504 FreeBSD ZFS a505 FreeBSD Vinum/RAID a580 Midnight BSD data a581 Midnight BSD boot a582 Midnight BSD swap a583 Midnight BSD UFS a584 Midnight BSD ZFS a585 Midnight BSD Vinum a600 OpenBSD disklabel a800 Apple UFS a901 NetBSD swap a902 NetBSD FFS a903 NetBSD LFS a904 NetBSD concatenated a905 NetBSD encrypted a906 NetBSD RAID ab00 Recovery HD af00 Apple HFS/HFS+ af01 Apple RAID af02 Apple RAID offline af03 Apple label af04 AppleTV recovery af05 Apple Core Storage bc00 Acronis Secure Zone be00 Solaris boot bf00 Solaris root bf01 Solaris /usr & Mac Z bf02 Solaris swap bf03 Solaris backup bf04 Solaris /var bf05 Solaris /home bf06 Solaris alternate se bf07 Solaris Reserved 1 bf08 Solaris Reserved 2 Press the key to see more codes: bf09 Solaris Reserved 3 bf0a Solaris Reserved 4 bf0b Solaris Reserved 5 c001 HP-UX data c002 HP-UX service ea00 Freedesktop $BOOT eb00 Haiku BFS ed00 Sony system partitio ed01 Lenovo system partit ef00 EFI System ef01 MBR partition scheme ef02 BIOS boot partition f800 Ceph OSD f801 Ceph dm-crypt OSD f802 Ceph journal f803 Ceph dm-crypt journa f804 Ceph disk in creatio f805 Ceph dm-crypt disk i fb00 VMWare VMFS fb01 VMWare reserved fc00 VMWare kcore crash p fd00 Linux RAID Hex code or GUID (L to show codes, Enter = 8300): ef00 Changed type of partition to 'EFI System'
Riordinare le partizioni
Capita a seguito di cancellazione e creazione che il numero della partizione non sia coerente con la sua posizione nel disco. Per avere corrispondenza tra layout e numero di partizione si può utilizzare l’opzione per l’ordinamento s (sort partitions) .
... Number Start (sector) End (sector) Size Code Name 1 2048 1050623 512.0 MiB EF00 EFI System 2 21985280 39653248 8.4 GiB 0700 Microsoft basic data 3 13930496 21985279 3.8 GiB 0700 Command (? for help): s You may need to edit /etc/fstab and/or your boot loader configuration! ... Number Start (sector) End (sector) Size Code Name 1 2048 1050623 512.0 MiB EF00 EFI System 2 13930496 21985279 3.8 GiB 0700 3 21985280 39653248 8.4 GiB 0700 Microsoft basic data
Applicativi
- gdisk: Convertire MBR in GPT ( senza perdita di dati )
- Microsoft’s MBR2GPT Disk Conversion Tool
- Diskpart: convertire MBR in GPT ( windows – distruttivo)
- gptgen: convertire MBR in GPT ( senza perdita di dati )
- partition assistant convertire MBR in GPT ( senza perdita di dati )
- rEFInd: rEFInd può rilevare automaticamente i boot loader EFI installati e presenta un funzionale menu GUI di opzioni di avvio.
Risorse:
- GPT fdisk Tutorial – Rod’s Books
- rEFInd
- Avviare ISO live direttamente da disco con grub 2.0
- Che cos’è GPT tabella partizione GUID
- MBR reset