Page 1 of 1

Recovered Ext4 HD not permanent

Posted: 20 Oct 2021, 10:53
by alfonso
Mi issue is the same as other post here viewtopic.php?t=8028

briefly I accidentally created a GPT partition table on a Ext4 HD. To recover the Ext4 data I used testdisk on that HD and run the following as suggested by testdisk

Code: Select all

$ sudo fsck.ext4 -p -b 32768 -B 4096 /dev/sda
terminal output:
[sudo] password for alfonso:
data was not cleanly unmounted, check forced.
data: Group 1 inode bitmap does not match checksum.
FIXED.
data: Group 0 block bitmap does not match checksum.
FIXED.
data: 65949/61054976 files (0.7% non-contiguous), 189540323/244190646 blocks
and the partition is back and data seems to be intact when mounted on ubuntu.

However I go back to having a GPT partition upon reboot.

how can I make the fsck.ext4 changes permanent? so I do not need to run it everytime I boot ubuntu.

Thanks for your help

Re: Recovered Ext4 HD not permanent

Posted: 21 Oct 2021, 20:07
by recuperation
alfonso wrote: 20 Oct 2021, 10:53 Mi issue is the same as other post here viewtopic.php?t=8028

briefly I accidentally created a GPT partition table on a Ext4 HD. To recover the Ext4 data I used testdisk on that HD and run the following as suggested by testdisk
If you are referring to Christophe Grenier you should mention Christoph Grenier. I am not aware that Testdisk makes any command line proposals.

Code: Select all

$ sudo fsck.ext4 -p -b 32768 -B 4096 /dev/sda
terminal output:
[sudo] password for alfonso:
data was not cleanly unmounted, check forced.
data: Group 1 inode bitmap does not match checksum.
FIXED.
data: Group 0 block bitmap does not match checksum.
FIXED.
data: 65949/61054976 files (0.7% non-contiguous), 189540323/244190646 blocks
and the partition is back and data seems to be intact when mounted on ubuntu.

However I go back to having a GPT partition upon reboot.

how can I make the fsck.ext4 changes permanent? so I do not need to run it everytime I boot ubuntu.
Without even knowing what fsck.ext4 does (it seems to create partition tables beyond checking file systems) the case you are referring does not apply to you.
In the referred case there seems to be no partition table and the commands seems to add one.
In your case, however, there is a valid partition table and any checker program does not see any need to intervene.