[GH-ISSUE #10] Invalid super block on 4th primary partition #9

Open
opened 2026-05-05 04:40:53 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @ForeverACE on GitHub (Apr 19, 2017).
Original GitHub issue: https://github.com/RomanBelkov/DiskImager/issues/10

I just wanted to start by thanking Mr. Belkov for developing this software as it has been very useful. Unfortunately, I have encountered an issue with the software and have since found a workaround (by using another program) but I wanted to leave details of what I found here for anyone interested.

I originally had three primary partitions of which the third was encrypted. This seemed to work fine but the third partition was actually encrypted and formatted after the image was deployed to a microSD card (so it could have had an issue that was masked by my post deployment method).

My new image has four primary partitions (see table below) that follows the same general format of the previous image (i.e. basically the same as the three partition backups) except I have increased the sizes of the second and third as well as adding a fourth partition. Although I'm still leaving the third partition encrypted (which is then re-encrypted and reformatted once the image has been deployed), the fourth partition has been formatted to ext4 (BEFORE using the program to image it) and left as-is.

Device Start End Sectors Size ID Type
/dev/mmcblk0p1 8192 131071 122880 60M c W95 FAT32 (LBA)
/dev/mmcblk0p2 131072 8519679 8388608 4G 83 Linux
/dev/mmcblk0p3 8519680 12713983 4194304 2G 83 Linux
/dev/mmcblk0p4 12713984 15220735 2506752 1.2G 83 Linux

The problem I have is that when I backup my image and then restore it onto a different card (the original/master microSD card works okay), I get a bad superblock error on the fourth partition. I have tried several different cards, zeroing out the card and then trying, etc. and they all result in the same. If I use the original card, there is no error.

What I believe is happening is that the program isn't properly detecting either the fourth partition boundary and/or the third (I suspect the fourth) and then not backing it up during the imaging process. My reason for this assumption is that although the image should be around 7.25G the program only backs up 3.25G. If I use Win32 Disk Imager, I can successfully backup and restore the image but it's also the larger file size (i.e. ~7.25G).

Originally created by @ForeverACE on GitHub (Apr 19, 2017). Original GitHub issue: https://github.com/RomanBelkov/DiskImager/issues/10 I just wanted to start by thanking Mr. Belkov for developing this software as it has been very useful. Unfortunately, I have encountered an issue with the software and have since found a workaround (by using another program) but I wanted to leave details of what I found here for anyone interested. I originally had three primary partitions of which the third was encrypted. This seemed to work fine but the third partition was actually encrypted and formatted after the image was deployed to a microSD card (so it could have had an issue that was masked by my post deployment method). My new image has four primary partitions (see table below) that follows the same general format of the previous image (i.e. basically the same as the three partition backups) except I have increased the sizes of the second and third as well as adding a fourth partition. Although I'm still leaving the third partition encrypted (which is then re-encrypted and reformatted once the image has been deployed), the fourth partition has been formatted to ext4 (BEFORE using the program to image it) and left as-is. Device|Start|End|Sectors|Size|ID|Type ------|------|------|------|------|------|------ /dev/mmcblk0p1|8192|131071|122880|60M|c|W95 FAT32 (LBA) /dev/mmcblk0p2|131072|8519679|8388608|4G|83|Linux /dev/mmcblk0p3|8519680|12713983|4194304|2G|83|Linux /dev/mmcblk0p4|12713984|15220735|2506752|1.2G|83|Linux The problem I have is that when I backup my image and then restore it onto a different card (the original/master microSD card works okay), I get a bad superblock error on the fourth partition. I have tried several different cards, zeroing out the card and then trying, etc. and they all result in the same. If I use the original card, there is no error. What I believe is happening is that the program isn't properly detecting either the fourth partition boundary and/or the third (I suspect the fourth) and then not backing it up during the imaging process. My reason for this assumption is that although the image should be around 7.25G the program only backs up 3.25G. If I use Win32 Disk Imager, I can successfully backup and restore the image but it's also the larger file size (i.e. ~7.25G).
Author
Owner

@RomanBelkov commented on GitHub (Apr 20, 2017):

Hi @ForeverACE

Thank you for your time for filing this bug. Currently I do not have spare time to look up the troubles at all, but I will try to fix the bug ASAP.

<!-- gh-comment-id:295862919 --> @RomanBelkov commented on GitHub (Apr 20, 2017): Hi @ForeverACE Thank you for your time for filing this bug. Currently I do not have spare time to look up the troubles at all, but I will try to fix the bug ASAP.
Author
Owner

@ForeverACE commented on GitHub (Apr 20, 2017):

Hi @RomanBelkov ,

Thanks for the quick response. I'm able to work around the problem in the interim so it doesn't present a major problem for me but I wanted to be sure that any details I had I logged before I forgot them. Hopefully this will help you in tracking down the problem (if/when you do look into it).

Cheers.

<!-- gh-comment-id:295891530 --> @ForeverACE commented on GitHub (Apr 20, 2017): Hi @RomanBelkov , Thanks for the quick response. I'm able to work around the problem in the interim so it doesn't present a major problem for me but I wanted to be sure that any details I had I logged before I forgot them. Hopefully this will help you in tracking down the problem (if/when you do look into it). Cheers.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/DiskImager#9
No description provided.