Data recovery after resizing partitions

I resized my root using the default partition editor in manjaro kde. After a reboot grub told me it had an unkown filesystem. I booted into a live manjaro usb and ran 'sudo e2fsck -b 8193 /dev/sda2' i tried every one of the numbers from 'mke2fs -n -S /dev/sda2'. None of them worked (bad magic number) I then ran 'sudo parted /dev/sda2 p' and it returned the following
Using /dev/sda2
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Error: /dev/sda2: unrecognised disk label
Model: Unknown (unknown)
Disk /dev/sda2: 981GB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:
Any help would be appreciated to recover the data on the drive, thanks.

Hopefully when you resize your partition, the data within it is not destroyed [1].
If that is the case, try to first see if this can boot up your OS.
Use the right mode (bios-legacy or uefi) to boot up install media (important).
If it does boot up, at terminal

sudo grub-install /dev/sda
sudo update-grub

Hopefully it's just only your partition first sector is destroyed by moving/resizing.

a. do not make more commands like ‘mke2fs ...' (hopefully your command did not proceed)
b. this is not good

c. er.. never mind, hope for the best.

Thanks for the help. Nothing seems to work. Should I bite the bullet and reinstall? Thanks.

Yes. Sorry.
I often say (too many times) avoid resize, move or delete partitions.
We can (and recommended to) format partitions.
Prepare partitions partitions for foreseeable future needs.
Disks nowadays have Yuuge (huge, sorry) storage space.

Cheers, take care.

[edit] - since youre' doing all over again and you have this Parttition Table of 'unknown'
use gparted, at 'device' tab, 'create partition table', select 'msdos' or 'gpt'.
Then only create partitions.
Do this. It is important.

I prefer gparted to kde's partition editor.

I just feel it's more reliable and do all my partitioning with gparted even if I'm running Plasma.

1 Like

Ditto. Over the past few years i've needed/wanted to move &/or resize several partitions, mainly in VMs but also once or twice in my "real" on-SSD OS. Each time that i experienced a disaster where the partition became corrupt & all its data lost, occurred when using the KDE tool; never had any failures using gparted. The KDE tool certainly also succeeded a few times, but its failures scarred me [& scared me], such that i now keep a mental note to (a) avoid the need to move or resize, (b) if i really must do it, use gparted only.

Clearly my example is not statistically significant, nor is it a controlled experiment... it's nothing but anecdote. However, it's still sufficient for me to have decided to favour gparted.

I always have a rescue OS on a flash memory that can be Manjaro.
Install TestDisk and run it in CLI. It does whatever you need.

Yes, agree with all here that gparted is much better.
I boot gparted iso with grub2 menuentry here.

It save the hassle of booting up from usb or cdrom.
Whenever there's a new version the menuentry still applies (of course change the target isofile).
Hope this is useful as well.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by