RomanBelkov / DiskImager

DiskImager. A .NET Windows utility for reading & writing SD cards and USB devices
GNU General Public License v3.0
13 stars 6 forks source link

Invalid super block on 4th primary partition #10

Open ForeverACE opened 7 years ago

ForeverACE commented 7 years ago

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).

RomanBelkov commented 7 years ago

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.

ForeverACE commented 7 years ago

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.