Se in linux si prova a convertire con gdisk un disco MBR, cioè con la tabella delle partizioni nel vecchio formato tipico del DOS a 4 partiizoni primarie, in un disco GPT che consente 128 partizioni primarie si può incorrere nell’errore:
Warning! Secondary partition table overlaps the last partition by 33 blocks! You will need to delete this partition or resize it in another utility.
in modo più esplicito l’errore si verifica quando si lancia gdisk con il disco da convertire
sudo gdisk /dev/sdb
sudo gdisk /dev/sdb GPT fdisk (gdisk) version 1.0.8 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! ***************************************************************** Warning! Secondary partition table overlaps the last partition by 33 blocks! You will need to delete this partition or resize it in another utility. Command (? for help): p Disk /dev/sdb: 976773168 sectors, 465.8 GiB Model: Ext. HDD Sector size (logical/physical): 512/512 bytes Disk identifier (GUID): 588F830B-BD6C-4F7B-9BCE-F3DDDA1F7BFE 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 976773134 Partitions will be aligned on 2048-sector boundaries Total free space is 387350494 sectors (184.7 GiB) Number Start (sector) End (sector) Size Code Name 1 2048 170586111 81.3 GiB 0700 Microsoft basic data 2 557934592 976773167 199.7 GiB 0700 Microsoft basic data Command (? for help): w Warning! Secondary partition table overlaps the last partition by 33 blocks! You will need to delete this partition or resize it in another utility. Aborting write of new partition table.
L’errore è una conseguenza del posizionamento della tabella delle partizioni in GPT.
Infatti se MBR scrive la tabella delle partizioni all’inizio del disco, GPT scrive la tabella delle partizioni sia all’inizio che alla fine del disco. Per scrivere la tabella alla fine del disco servono 33 blocchi che se hanno la tipica dimensione 512 byte significa circa 16896 byte.
Nel disco MBR da convertire in GPT, visibile nella figura in basso, si può notare che non c’è spazio libero alla fine del disco .
Per risolvere e poter procedere alla conversione si deve restringere la partizione sdb2 almeno dei fatici 33 blocchi.
Purtroppo non mi è stato possibile effettuare il resize della partizione nfts del in oggetto, un SSD Samsung 860 EVO da 500GB , in debian. Il tool disk di Gnome una volta lanciato il resize disk andava in crash.
Gparted non andava in crash ma purtroppo non riusciva a completare il resize.
Avendo una certa fretta ho effettuato il resize in Windows 10.
A questo punto era disponibile lo spazio per la Secondary partition table
sudo gdisk /dev/sdb GPT fdisk (gdisk) version 1.0.8 ... ... *************************************************************** 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! ***************************************************************** ... ... Number Start (sector) End (sector) Size Code Name 1 2048 170586111 81.3 GiB 0700 Microsoft basic data 2 557934592 976748591 199.7 GiB 0700 Microsoft basic data Command (? for help): w Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING PARTITIONS!! Do you want to proceed? (Y/N): Y OK; writing new GUID partition table (GPT) to /dev/sdb. The operation has completed successfully.
Risorse:
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.
Posts:
- MBR reset
- Partizione attiva cos’è
- partizione – formattare -uuid
- Gestire le partizione con gparted
- Che cos’è GPT tabella partizione GUID
- The rEFInd Boot Manager
Risorse:
- GUID Partition Table – Wikipedia
- GPT fdisk Tutorial
- Extensible Firmware Interface – Wikipedia
- Domande frequenti sull’architettura di disco tabella di partizionamento di GUID