How do I fix the corrupt primary GPT once and for all?
SH <i.love.spam@spam.com> wrote:
How do I fix the corrupt primary GPT once and for all?
If you don't care about what's on the drive, I'd be tempted to zero it and start again:
sudo dd if=/dev/zero of=/dev/sdX bs=1M
where /dev/sdX is the drive device.
That will make it clean as if from the factory, so you could partition it anew.
It will take a while to zero out the whole drive, so you could try running
it for a minute and then Ctrl-C and see if it's zapped enough to allow it to be repartitioned. The secondary GPT lives at the end of the drive, so if
you also did:
sudo dd if=/dev/zero of=/dev/sdX bs=1GB seek=950
it would start zeroing at 950 (power of ten) gigabytes, which should be enough to zap the GPT on a 1TB drive if you leave it to complete. Adjust
the numbers for your size of drive.
Theo
SH <i.love.spam@spam.com> wrote:
How do I fix the corrupt primary GPT once and for all?
If you don't care about what's on the drive, I'd be tempted to zero it and start again:
sudo dd if=/dev/zero of=/dev/sdX bs=1M
where /dev/sdX is the drive device.
That will make it clean as if from the factory, so you could partition it anew.
It will take a while to zero out the whole drive, so you could try running
it for a minute and then Ctrl-C and see if it's zapped enough to allow it to be repartitioned. The secondary GPT lives at the end of the drive, so if
you also did:
sudo dd if=/dev/zero of=/dev/sdX bs=1GB seek=950
it would start zeroing at 950 (power of ten) gigabytes, which should be enough to zap the GPT on a 1TB drive if you leave it to complete. Adjust
the numbers for your size of drive.
Theo
I still get the:
The primary GPT table is corrupt, but the backup appears OK
and it proceeds to then use the backup GPT.
But I cannot mount the disk without formatting it to EXT4 again.
On 24/08/2021 15:41, Theo wrote:
SH <i.love.spam@spam.com> wrote:
How do I fix the corrupt primary GPT once and for all?
If you don't care about what's on the drive, I'd be tempted to zero it and >> start again:
sudo dd if=/dev/zero of=/dev/sdX bs=1M
where /dev/sdX is the drive device.
That will make it clean as if from the factory, so you could partition it
anew.
It will take a while to zero out the whole drive, so you could try running >> it for a minute and then Ctrl-C and see if it's zapped enough to allow it to >> be repartitioned. The secondary GPT lives at the end of the drive, so if
you also did:
sudo dd if=/dev/zero of=/dev/sdX bs=1GB seek=950
it would start zeroing at 950 (power of ten) gigabytes, which should be
enough to zap the GPT on a 1TB drive if you leave it to complete. Adjust
the numbers for your size of drive.
Theo
Theo,
I have zeroed out the hard disc drive using the command you gave that being:
sudo dd if=/dev/zero of=/dev/sdb bs=1M from a terminal window
I left it to run overnight.
Came back to it and saw that the operation had completed in the terminal window.
I then ran gparted which complaiined there was no partition table so I created a new partition table.
I then created a new Ext4 partition and was able to mount it.
I then copied across a Linux ISO to sdb.
I then shut down and restarted.
I still get the:
The primary GPT table is corrupt, but the backup appears OK
and it proceeds to then use the backup GPT.
But I cannot mount the disk without formatting it to EXT4 again.
SH <i.love.spam@spam.com> wrote:
I still get the:
The primary GPT table is corrupt, but the backup appears OK
and it proceeds to then use the backup GPT.
But I cannot mount the disk without formatting it to EXT4 again.
So something is monkeying with the GPT. Do you have anything possible in BIOS that might? For example some BIOSes do software RAID which might try
to save RAID stuff to the disc.
I then ran gparted which complaiined there was no partition table so I created a new partition table.
I then created a new Ext4 partition and was able to mount it.
I then copied across a Linux ISO to sdb.
I then shut down and restarted.
I still get the:
The primary GPT table is corrupt, but the backup appears OK
I have zeroed out the hard disc drive using the command you gave that being:
sudo dd if=/dev/zero of=/dev/sdb bs=1M from a terminal window
I left it to run overnight.
Came back to it and saw that the operation had completed in the terminal window.
I then ran gparted which complaiined there was no partition table so I created a new partition table.
I then created a new Ext4 partition and was able to mount it.
I then copied across a Linux ISO to sdb.
I then shut down and restarted.
I still get the:
The primary GPT table is corrupt, but the backup appears OK
and it proceeds to then use the backup GPT.
But I cannot mount the disk without formatting it to EXT4 again.
On 2021-08-25, SH <i.love.spam@spam.com> wrote:
I have zeroed out the hard disc drive using the command you gave that being: >>
sudo dd if=/dev/zero of=/dev/sdb bs=1M from a terminal window
I left it to run overnight.
Came back to it and saw that the operation had completed in the terminal
window.
I then ran gparted which complaiined there was no partition table so I
created a new partition table.
I then created a new Ext4 partition and was able to mount it.
I then copied across a Linux ISO to sdb.
This worries me.
Do you mean you installed from a linux ISO to the new partition /dev/sdb1 ?
If not HOW do you copy the linux ISO to the disk?
What are you trying to do?
I then shut down and restarted.
I still get the:
The primary GPT table is corrupt, but the backup appears OK
and it proceeds to then use the backup GPT.
But I cannot mount the disk without formatting it to EXT4 again.
Basically I was trying to set up a PC with OMV (open media vault.)
I have 13 SATA3 drives lying about being used as various NAS drives in different kit.
I had bought two Adaptec 6805T cards taht will support 8 drives each.
(the Mobo I have has 2 off SATA3 ports and 4 off SATA 2 ports and 1 off
EIDE ports)
SH <i.love.spam@spam.com> wrote:
Basically I was trying to set up a PC with OMV (open media vault.)
I have 13 SATA3 drives lying about being used as various NAS drives in
different kit.
I had bought two Adaptec 6805T cards taht will support 8 drives each.
(the Mobo I have has 2 off SATA3 ports and 4 off SATA 2 ports and 1 off
EIDE ports)
Just FYI, it's helpful if you tell us stuff like this upfront. If you
don't, we're going to assume your setup is just a standard PC with a mobo, one/two HDD, that's it, because that's what 99% of people have, especially the people asking for help because they don't know what they don't know.
There's no way we can guess that you have an unusual setup like this, but it does have a bearing on the problem. So if you're asking for help at least flagging when you're doing something out of the ordinary is helpful so we
can identify if that's going to be relevant to the problem or not.
Glad you got it sorted...
Theo
So as far as the OS was concerned, they were just 6 "simple" and
bootable drives
On these 6805Ts you have to set up as RAID or JBOD, there appears to be
no Int 13h support.
So thats how I ended up making individual disks as 1 drive JBODs.
Then as mentioned before, I then had the issues with primary GPTs.
It seems converting the 1 disc JBOD into a morphed single volume works.....
Now I need to think about the scenario where if both 6805T adapters
fail, can I still access the data via a regular Mobo SATA3 port?
SH <i.love.spam@spam.com> wrote:
So as far as the OS was concerned, they were just 6 "simple" and
bootable drives
On these 6805Ts you have to set up as RAID or JBOD, there appears to be
no Int 13h support.
If you're doing RAID things, there's something to be said for having your boot drive a non-RAID disc, at least as far as the OS kernel (for example
the contents of /boot). Slightly less resilient, but you don't have to
worry about boot foibles of your RAID adapter.
Many VM hosts and similar put the hypervisor OS on an internally-mounted USB stick for this reason.
So thats how I ended up making individual disks as 1 drive JBODs.
Then as mentioned before, I then had the issues with primary GPTs.
It seems converting the 1 disc JBOD into a morphed single volume works..... >>
Now I need to think about the scenario where if both 6805T adapters
fail, can I still access the data via a regular Mobo SATA3 port?
Try it and see. Just swap the cables over and see if you can still read it. (for bonus points you could hash the contents to check they're exactly the same)
Theo
As in swapping one of the drives from teh 6805T controller to one of the onboard motherboard ports?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 415 |
Nodes: | 16 (2 / 14) |
Uptime: | 35:09:04 |
Calls: | 8,720 |
Calls today: | 3 |
Files: | 13,276 |
Messages: | 5,956,170 |