Escrever 512 bytes não é suficiente, você precisa limpar pelo menos dois blocos de 512 bytes . Se você começar com um disco novo:
# dd if=/dev/sdb bs=512 count=80000 | od -c
0000000 # parted
(parted) unit GB
(parted) mklabel gpt
(parted) print
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sdb: 2.15GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
(parted) mkpart primary 0 2
(parted) print
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sdb: 2.15GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 0.00GB 2.15GB 2.15GB primary
(parted) quit
Information: You may need to update /etc/fstab.
# dd if=/dev/sdb bs=512 count=80000 | od -c
0000000 # dd if=/dev/zero of=/dev/sdb bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.0030505 s, 168 kB/s
lm17base avanderneut # parted /dev/sdb
GNU Parted 2.3
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Warning: /dev/sdb contains GPT signatures, indicating that it has a GPT table.
However, it does not have a valid fake msdos partition table, as it should.
Perhaps it was corrupted -- possibly by a program that doesn't understand GPT
partition tables. Or perhaps you deleted the GPT table, and are now using an
msdos partition table. Is this a GPT partition table?
Yes/No? No
(parted) quit
# dd if=/dev/zero of=/dev/sdb bs=512 count=2
2+0 records in
2+0 records out
1024 bytes (1.0 kB) copied, 0.00469557 s, 218 kB/s
# parted /dev/sdb
GNU Parted 2.3
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Error: /dev/sdb: unrecognised disk label
(parted) quit
# dd if=/dev/sdb bs=512 count=80000 | od -c
0000000 # parted
(parted) unit GB
(parted) mklabel gpt
(parted) print
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sdb: 2.15GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
(parted) mkpart primary 0 2
(parted) print
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sdb: 2.15GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 0.00GB 2.15GB 2.15GB primary
(parted) quit
Information: You may need to update /etc/fstab.
# dd if=/dev/sdb bs=512 count=80000 | od -c
0000000 # dd if=/dev/zero of=/dev/sdb bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.0030505 s, 168 kB/s
lm17base avanderneut # parted /dev/sdb
GNU Parted 2.3
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Warning: /dev/sdb contains GPT signatures, indicating that it has a GPT table.
However, it does not have a valid fake msdos partition table, as it should.
Perhaps it was corrupted -- possibly by a program that doesn't understand GPT
partition tables. Or perhaps you deleted the GPT table, and are now using an
msdos partition table. Is this a GPT partition table?
Yes/No? No
(parted) quit
# dd if=/dev/zero of=/dev/sdb bs=512 count=2
2+0 records in
2+0 records out
1024 bytes (1.0 kB) copied, 0.00469557 s, 218 kB/s
# parted /dev/sdb
GNU Parted 2.3
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Error: /dev/sdb: unrecognised disk label
(parted) quit
%pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre%
*
0000700 001 %pre% 356 376 377 377 001 %pre% %pre% %pre% 037 - @ %pre% %pre% %pre%
0000720 %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre%
*
0000760 %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% U 252
0001000 E F I P A R T %pre% %pre% 001 %pre% \ %pre% %pre% %pre%
0001020 351 356 t 217 %pre% %pre% %pre% %pre% 001 %pre% %pre% %pre% %pre% %pre% %pre% %pre%
0001040 037 - @ %pre% %pre% %pre% %pre% %pre% " %pre% %pre% %pre% %pre% %pre% %pre% %pre%
0001060 376 , @ %pre% %pre% %pre% %pre% %pre% n T l 342 306 351 ^ E
0001100 237 ~ i 270 t 034 227 004 002 %pre% %pre% %pre% %pre% %pre% %pre% %pre%
0001120 200 %pre% %pre% %pre% 200 %pre% %pre% %pre% / \n Z 202 %pre% %pre% %pre% %pre%
0001140 %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre%
*
0002000 257 = 306 017 203 204 r G 216 y = i 330 G } 344
0002020 _ _ 344 4 257 / 276 G 226 375 n 244 332 P 230 224
0002040 %pre% \b %pre% %pre% %pre% %pre% %pre% %pre% 377 ' @ %pre% %pre% %pre% %pre% %pre%
0002060 %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% p %pre% r %pre% i %pre% m %pre%
0002100 a %pre% r %pre% y %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre%
0002120 %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre%
*
234200000
80000+0 records in
80000+0 records out
40960000 bytes (41 MB) copied, 0.988582 s, 41.4 MB/s
%pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre%
*
234200000
80000+0 records in
80000+0 records out
40960000 bytes (41 MB) copied, 0.99129 s, 41.3 MB/s
%pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre%
*
0000700 001 %pre% 356 376 377 377 001 %pre% %pre% %pre% 037 - @ %pre% %pre% %pre%
0000720 %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre%
*
0000760 %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% U 252
0001000 E F I P A R T %pre% %pre% 001 %pre% \ %pre% %pre% %pre%
0001020 351 356 t 217 %pre% %pre% %pre% %pre% 001 %pre% %pre% %pre% %pre% %pre% %pre% %pre%
0001040 037 - @ %pre% %pre% %pre% %pre% %pre% " %pre% %pre% %pre% %pre% %pre% %pre% %pre%
0001060 376 , @ %pre% %pre% %pre% %pre% %pre% n T l 342 306 351 ^ E
0001100 237 ~ i 270 t 034 227 004 002 %pre% %pre% %pre% %pre% %pre% %pre% %pre%
0001120 200 %pre% %pre% %pre% 200 %pre% %pre% %pre% / \n Z 202 %pre% %pre% %pre% %pre%
0001140 %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre%
*
0002000 257 = 306 017 203 204 r G 216 y = i 330 G } 344
0002020 _ _ 344 4 257 / 276 G 226 375 n 244 332 P 230 224
0002040 %pre% \b %pre% %pre% %pre% %pre% %pre% %pre% 377 ' @ %pre% %pre% %pre% %pre% %pre%
0002060 %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% p %pre% r %pre% i %pre% m %pre%
0002100 a %pre% r %pre% y %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre%
0002120 %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre%
*
234200000
80000+0 records in
80000+0 records out
40960000 bytes (41 MB) copied, 0.988582 s, 41.4 MB/s
%pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre% %pre%
*
234200000
80000+0 records in
80000+0 records out
40960000 bytes (41 MB) copied, 0.99129 s, 41.3 MB/s
Em seguida, inicie parted
e crie uma partição:
E olhe o disco mais uma vez, você pode ver que há mais de 512 bytes de dados gravados:
%pre% Em seguida, se você limpar apenas os primeiros 512 bytes, parted
encontrará algumas informações:
Você precisa limpar dois blocos para se livrar desta mensagem:
%pre%Limpar todas as informações escritas no início do disco requer zerar pelo menos três (1 partição) blocos de 512 bytes. Para 10 partições, isso aumenta para cinco blocos.
Uma cópia da tabela de partições é gravada no final do disco. Se você usar sgdisk
para fazer um backup da tabela de partição, escrever zeros nos primeiros blocos e tentar restaurar usando sgdisk
, esse utilitário reclamará da incompatibilidade do backup e da tabela de partição principal.
Se você tiver sgdisk
instalado, é melhor usar sgdisk --clear
para limpar os dados da GPT. Isso não inicializa as tabelas para zero, mas também afeta a cópia de backup de fim de disco.