CurlyBen Posted October 2, 2022 Share Posted October 2, 2022 Today I finally got round to upgrading my server! I've gone from a 3570k to a 12600k on an Asus Z690 motherboard. However, when I boot I get a message stating that GPT header corruption has been found, and to check SATA mode or attempt to repair the boot sector (this isn't my computer, but the wording here is the same or very similar). If I enter setup and immediately quit then my server will boot and Unraid seems to be operating with no issues. However, it's a bit of a pain as I normally run the server headless, and I have to attach monitor and keyboard to be able to boot at the moment. Is there any way to check the GPT headers using Unraid? I don't want to run a tool that 'fixes' the headers only to make the drives unreadable to Unraid. I don't think there's any useful info, but I've attached my diagnostics file. tower-diagnostics-20221002-1634.zip Quote Link to comment
JorgeB Posted October 2, 2022 Share Posted October 2, 2022 1 hour ago, CurlyBen said: I get a message stating that GPT header corruption has been found Where exactly do you see that message, can you post a photo? I'm seeing a GPT issue in the log but clear which device is about. Quote Link to comment
CurlyBen Posted October 2, 2022 Author Share Posted October 2, 2022 Sorry, I wasn't very clear! It's a message from the BIOS, almost immediately after turning on. I can't post a photo at the moment but it's very similar to the one I linked to above - obviously the processor details are different, but it's at that same point just after POST. I haven't received any errors from Unraid. Quote Link to comment
JorgeB Posted October 3, 2022 Share Posted October 3, 2022 The syslog is showing a similar error: Oct 2 16:19:58 Tower kernel: Alternate GPT is invalid, using primary GPT. But like mentioned not clear which device is the problem, check the output of: fdisk -l /dev/sdX for all the devices, it should indicate the culprit Quote Link to comment
CurlyBen Posted October 3, 2022 Author Share Posted October 3, 2022 12 hours ago, JorgeB said: The syslog is showing a similar error: Oct 2 16:19:58 Tower kernel: Alternate GPT is invalid, using primary GPT. But like mentioned not clear which device is the problem, check the output of: fdisk -l /dev/sdX for all the devices, it should indicate the culprit Thanks, I ran fdisk -l and under /dev/sdc1 there's a message saying "the backup GPT is corrupt, but the primary appears OK, so that will be used". Presumably there's some way to overwrite the backup with the primary? It's an array drive so I'd rather not mess it up! Quote Link to comment
Solution JorgeB Posted October 4, 2022 Solution Share Posted October 4, 2022 Find it interesting that the board BIOS checks for that, you should be able to correct that with gdisk, e.g.: gdisk /dev/sdb GPT fdisk (gdisk) version 1.0.5 Caution: invalid main GPT header, but valid backup; regenerating main header from backup! Warning: Invalid CRC on main header data; loaded backup partition table. Warning! One or more CRCs don't match. You should repair the disk! Main header: ERROR Backup header: OK Main partition table: OK Backup partition table: OK Partition table scan: MBR: protective BSD: not present APM: not present GPT: damaged **************************************************************************** Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk verification and recovery are STRONGLY recommended. **************************************************************************** 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. Quote Link to comment
CurlyBen Posted October 4, 2022 Author Share Posted October 4, 2022 (edited) 1 hour ago, JorgeB said: Find it interesting that the board BIOS checks for that, you should be able to correct that with gdisk, e.g.: gdisk /dev/sdb GPT fdisk (gdisk) version 1.0.5 Caution: invalid main GPT header, but valid backup; regenerating main header from backup! Warning: Invalid CRC on main header data; loaded backup partition table. Warning! One or more CRCs don't match. You should repair the disk! Main header: ERROR Backup header: OK Main partition table: OK Backup partition table: OK Partition table scan: MBR: protective BSD: not present APM: not present GPT: damaged **************************************************************************** Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk verification and recovery are STRONGLY recommended. **************************************************************************** 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. Fantastic, thanks a lot for your help (again!). It was actually sdd (my parity drive), I misread which device the error message related to. All seems to be fixed now though - I haven't tried a reboot though as I'm working away this week and I'd rather be there in case I need to attach a keyboard and monitor. It's certainly interesting that the BIOS checks this, but also a bit frustrating - I wasted a lot of time removing sticks of memory etc. as I assumed it was a hardware issue that was preventing it from booting. Edited October 4, 2022 by CurlyBen 1 Quote Link to comment
CurlyBen Posted October 7, 2022 Author Share Posted October 7, 2022 Just for completeness, I rebooted my server today and the BIOS error messages had all gone. It's definitely not something I've come across before but at least it was an easy fix! 1 Quote Link to comment
Kcirtap1423 Posted October 8, 2022 Share Posted October 8, 2022 So I'm getting the same error message on startup about a corrupted GPT header, however fdisk doesn't show that any of the drives are having an issue. The only thing that mentions GPT is the Disklabel type, which for all drives is showing as GPT. Looking at the output of gdisk for all the drives I get a message saying "Found valid GPT with protective MBR; using GPT." So as far as I can tell, all signs indicate that there is nothing wrong. Yet I still receive this error. Thoughts? Quote Link to comment
JorgeB Posted October 9, 2022 Share Posted October 9, 2022 15 hours ago, Kcirtap1423 said: Thoughts? You can post the diags in case something is visible like in the previous case. Quote Link to comment
Kcirtap1423 Posted October 9, 2022 Share Posted October 9, 2022 Tried updating the bios also to no effect. Also wanted to know, would using the gpt recovery, if that becomes necessary, pose a risk of data loss if used on one of the data drives? vengeance-diagnostics-20221009-0552.zip Quote Link to comment
JorgeB Posted October 9, 2022 Share Posted October 9, 2022 Note seeing anything relevant logged, that together with fdisk not detecting any issues would make me not worry, but if you to find out which disk is causing the warning you'd probably need to disconnect all devices and try booting with one at a time. Quote Link to comment
Kcirtap1423 Posted October 9, 2022 Share Posted October 9, 2022 I'll probably do that just for the sake of completeness. I find it quite odd though that it seems to only be the bios that's detecting any sort of problem. Also like I asked before, if I do find the culprit and run the GPT recovery, will that pose a risk of data loss? Quote Link to comment
JorgeB Posted October 9, 2022 Share Posted October 9, 2022 1 hour ago, Kcirtap1423 said: if I do find the culprit and run the GPT recovery, will that pose a risk of data loss? I guess it depends on how you try to fix it, I've used and told other users to use gdisk before to fix and there never was any data loss, but if gdisk doesn't find a problem don't know how you plan to do it. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.