After upgrading my TT to 12.76 I was looking around HDDRUTIL.APP and saw the option "Repair Partitions" so I clicked upon it... OKed the next dialog and discovered the partition table empty!
I have information about the partition types and their start locations noted down but "Edit Partition Table" doesn't allow me to add the partitions back and "Partition Drive" will clear the beginning of any partitions it makes.
I can't see any way to recover at the moment. Is there a way to do so?
Accidental wipe of partition information. Recoverable?
-
StephenUsher
- Posts: 4
- Joined: 07 Jan 2026, 22:36
-
uweseimet
- Site Admin
- Posts: 408
- Joined: 10 Jan 2010, 15:39
Re: Accidental wipe of partition information. Recoverable?
I'm afraid that does not sound good. Can you provide details on what was wrong with your data so that you needed to use "Repair Partitions""?
Of course, regardless of what was wrong with the data before, "Repair Partitions" should not make the situation worse. I just ran a quick test and could not find anything wrong, but my setup may not be the right one.
Can you please provide details on how you partitioned the drive, in particular which sofrware you were using (HDDRUTIL or something else), and the compatibility settings used, especially the TOS or Windows compatibility settings? I will have to try to reproduce your problem, in order to find out whether HDDRUTIL is doing something wrong.
I assume that your partition scheme was a so-called MBR scheme, which does not provide a standardized backup of partition data. Therefore, HDDRUTIL stores a copy of the root sector on the last sector of a drive. "Repair Partitions" copies this backup sector to the root sector. This does not seem to have worked as it should. Maybe you have a tool that you can use to have a look at the last sector of your drive? Diamond Edge should be able to do that. DISKUS can definitely do it, but it is German only. Or maybe you can save the contents of your root sector and of the last sector of your drive with HDDRUTIL and send me these data, so that I can have a look at them?
Of course, regardless of what was wrong with the data before, "Repair Partitions" should not make the situation worse. I just ran a quick test and could not find anything wrong, but my setup may not be the right one.
Can you please provide details on how you partitioned the drive, in particular which sofrware you were using (HDDRUTIL or something else), and the compatibility settings used, especially the TOS or Windows compatibility settings? I will have to try to reproduce your problem, in order to find out whether HDDRUTIL is doing something wrong.
I assume that your partition scheme was a so-called MBR scheme, which does not provide a standardized backup of partition data. Therefore, HDDRUTIL stores a copy of the root sector on the last sector of a drive. "Repair Partitions" copies this backup sector to the root sector. This does not seem to have worked as it should. Maybe you have a tool that you can use to have a look at the last sector of your drive? Diamond Edge should be able to do that. DISKUS can definitely do it, but it is German only. Or maybe you can save the contents of your root sector and of the last sector of your drive with HDDRUTIL and send me these data, so that I can have a look at them?
-
uweseimet
- Site Admin
- Posts: 408
- Joined: 10 Jan 2010, 15:39
Re: Accidental wipe of partition information. Recoverable?
I forgot to mention that at least with DISKUS you can manually enter the partition data (start, end) in order to restore them. If you cannot do that yourself, I can do it for you, i.e. you send me your current root sector, I will enter the data and send it back. But first I would like to investigate why "Restore Partitions" did not work for you.
-
uweseimet
- Site Admin
- Posts: 408
- Joined: 10 Jan 2010, 15:39
Re: Accidental wipe of partition information. Recoverable?
After some more testing it looks as if I have found out what must have happened: Everything is fine as long as the last sector of a drive contains a valid root sector copy with a partition table. There is information on the last sector that tells HDDRUTIL whether there are suitable data. Only in this case HDDRUTIL should use this sector in order to restore the lost data on the root sector.
But I found that HDDRUTIL also copies the data if they are not valid, and I assume this is what happened in your case: There was no valid root sector backup, but HDDRUTIL did not notice this, even though it should. As long as you only run "Repair Partitions" when your root sector is really broken this is not a problem, because when there is no root sector copy, repairing the root sector is not possible anyway, and data that are already lost simply cannot be recovered. On the other hand, when there is a valid root sector copy, restoring the root sector works as expected, which is the standard case. If you try to "repair" a non-broken root sector AND there is no valid root sector copy, you lose your current partition table. This must have happened in your case.
HDDRUTIL is supposed to verify the partition data backup, in order to find out whether there is a valid partition table on the last sector. But this code since HDDRIVER 8.4 (2011) unfortunately has a bug. This will of course be fixed with the next release, i.e. HDDRIVER 12.77 or newer. It rarely happens that such a bug survives for such a long time. As long as "Repair Partitions" is only used in a real emergency, everything works as expected and the bug does not show.
But there is also good news: Even without knowing the start and end sectors of the partitions, it is possible to restore the partition data manually. If these data are known, like in your case, even better. As already indicated, I can help you with that. Please contact me by email, so that we can discuss the level of assistance you need/I can give you.
There is also other good news for everyone who is wondering about the best way to restore partition data. The best way is to use a GPT partition scheme instead of the legacy MBR scheme. GPT always stores a full partition table copy in a standardized format at the end of a drive/memory card. There are checksums that ensure that these data are valid. HDDRUTIL knows how to use this backup table to restore the primary GPT partition table or the backup table from the primary table. Even better: Because GPT is a platform-independent format, you can also use other tools from other platforms to restore a TOS GPT table. Or you can use HDDRUTIL to restore the GPT table of your PC or Mac. The HDDRIVER website provides details on using a GPT scheme with the Atari.
But I found that HDDRUTIL also copies the data if they are not valid, and I assume this is what happened in your case: There was no valid root sector backup, but HDDRUTIL did not notice this, even though it should. As long as you only run "Repair Partitions" when your root sector is really broken this is not a problem, because when there is no root sector copy, repairing the root sector is not possible anyway, and data that are already lost simply cannot be recovered. On the other hand, when there is a valid root sector copy, restoring the root sector works as expected, which is the standard case. If you try to "repair" a non-broken root sector AND there is no valid root sector copy, you lose your current partition table. This must have happened in your case.
HDDRUTIL is supposed to verify the partition data backup, in order to find out whether there is a valid partition table on the last sector. But this code since HDDRIVER 8.4 (2011) unfortunately has a bug. This will of course be fixed with the next release, i.e. HDDRIVER 12.77 or newer. It rarely happens that such a bug survives for such a long time. As long as "Repair Partitions" is only used in a real emergency, everything works as expected and the bug does not show.
But there is also good news: Even without knowing the start and end sectors of the partitions, it is possible to restore the partition data manually. If these data are known, like in your case, even better. As already indicated, I can help you with that. Please contact me by email, so that we can discuss the level of assistance you need/I can give you.
There is also other good news for everyone who is wondering about the best way to restore partition data. The best way is to use a GPT partition scheme instead of the legacy MBR scheme. GPT always stores a full partition table copy in a standardized format at the end of a drive/memory card. There are checksums that ensure that these data are valid. HDDRUTIL knows how to use this backup table to restore the primary GPT partition table or the backup table from the primary table. Even better: Because GPT is a platform-independent format, you can also use other tools from other platforms to restore a TOS GPT table. Or you can use HDDRUTIL to restore the GPT table of your PC or Mac. The HDDRIVER website provides details on using a GPT scheme with the Atari.
-
StephenUsher
- Posts: 4
- Joined: 07 Jan 2026, 22:36
Re: Accidental wipe of partition information. Recoverable?
Good morning. Thank-you for the information.
The drive was set up using HDDRUTIL from version 10.10.
With respect to the partition table, I have an image back-up of the drive from a few weeks ago, so if I know how long (in bytes) the partition table is I can copy the first n bytes of data from that back-up onto the drive and recover.
If the worst comes to the worst I just re-image the drive. I won't have lost much other than an install of NetBSD.
The drive was set up using HDDRUTIL from version 10.10.
With respect to the partition table, I have an image back-up of the drive from a few weeks ago, so if I know how long (in bytes) the partition table is I can copy the first n bytes of data from that back-up onto the drive and recover.
If the worst comes to the worst I just re-image the drive. I won't have lost much other than an install of NetBSD.
-
uweseimet
- Site Admin
- Posts: 408
- Joined: 10 Jan 2010, 15:39
Re: Accidental wipe of partition information. Recoverable?
Hello! It is great that you have a good backup! There are still Atari users out there who do not have any backup at all ...
The MBR partition table is on the root sector (physical sector 0) of a drive. This is the only sector HDDRUTIL modifies when trying to repair this table. In your case this means that with a tool of your choice you should replace the first 512 bytes (assuming that your drive has a physical sector size of 512 bytes) with the contents you have saved. After doing that everything should be fine, just like it was before.
I would still be interested in the contents of the very last sector (last 512 bytes) of your drive. A drive partitioned with HDDRUTIL (also with old versions) should have a copy of the root sector in it, and restoring the root sector should just have worked. Can you please send me these 512 bytes in an email, so that I can analyze them? Maybe this helps to further improve HDDRUTIL.
My advice is never to modify the root sector (or a partition's boot sector) unless there is really a need to, e.g when the partition table is really broken. Only somebody like me, who regularly deals with crazy things like that, should do this ;-).
Note that you can configure HDDRIVER to write-protect the root sector and all boot sectors. (Please see the manual for details.) On my machines I always do this, so that no piece of software can change these data. When partitioning, HDDRUTIL in such a case offers to remove this protection.
The MBR partition table is on the root sector (physical sector 0) of a drive. This is the only sector HDDRUTIL modifies when trying to repair this table. In your case this means that with a tool of your choice you should replace the first 512 bytes (assuming that your drive has a physical sector size of 512 bytes) with the contents you have saved. After doing that everything should be fine, just like it was before.
I would still be interested in the contents of the very last sector (last 512 bytes) of your drive. A drive partitioned with HDDRUTIL (also with old versions) should have a copy of the root sector in it, and restoring the root sector should just have worked. Can you please send me these 512 bytes in an email, so that I can analyze them? Maybe this helps to further improve HDDRUTIL.
My advice is never to modify the root sector (or a partition's boot sector) unless there is really a need to, e.g when the partition table is really broken. Only somebody like me, who regularly deals with crazy things like that, should do this ;-).
Note that you can configure HDDRIVER to write-protect the root sector and all boot sectors. (Please see the manual for details.) On my machines I always do this, so that no piece of software can change these data. When partitioning, HDDRUTIL in such a case offers to remove this protection.
-
StephenUsher
- Posts: 4
- Joined: 07 Jan 2026, 22:36
Re: Accidental wipe of partition information. Recoverable?
Thank-you!
Fully recovered.
The last sector is just all zeros.
Fully recovered.
The last sector is just all zeros.
The drive is actually a virtual drive on an SD2SCSI v6, hence easy to image and restore.% gdd if=tt-sd-card.img of=last-sector.img bs=512 skip=8888923 count=1
% od -x last-sector.img
0000000 0000 0000 0000 0000 0000 0000 0000 0000
*
0001000
-
uweseimet
- Site Admin
- Posts: 408
- Joined: 10 Jan 2010, 15:39
Re: Accidental wipe of partition information. Recoverable?
All zeros? Is it this image that was partitioned with HDDRUTIL, or was this image created from an already existing real hard drive? In the latter case creating the image may have omitted the last sector, which does not belong to any partition. You would not notice this in practice, unless a tool like HDDRUTIL wants to use these data. An image with the last sector missing would explain why there is no root sector backup at all.
-
StephenUsher
- Posts: 4
- Joined: 07 Jan 2026, 22:36
Re: Accidental wipe of partition information. Recoverable?
I'm pretty sure that it was done from scratch using HDDRUTIL. It was a long time ago though so I may be mistaken.
-
uweseimet
- Site Admin
- Posts: 408
- Joined: 10 Jan 2010, 15:39
Re: Accidental wipe of partition information. Recoverable?
I see. There might also be an issue with SD2SCSI when accessing the very last sector. I am mentioning this because I definitely know another modern SCSI drive replacement where due to a (long fixed) bug in an old firmware version accessing the very last sector did not work.
Anyway, we will never know why the data are missing in your case, but it's good to know that you managed to recover the partition table.
Anyway, we will never know why the data are missing in your case, but it's good to know that you managed to recover the partition table.