Recovered Ext4 HD not permanent

Using TestDisk to repair the filesystem
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Post Reply
Message
Author
alfonso
Posts: 1
Joined: 20 Oct 2021, 10:34

Recovered Ext4 HD not permanent

#1 Post 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

recuperation
Posts: 1721
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Recovered Ext4 HD not permanent

#2 Post 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.

Post Reply