You are not logged in.

#1 2019-08-11 18:16:41

end
Member
Registered: 2019-08-11
Posts: 4

Cannot mount partition after deleting overlapping partition

[Spoiler: noob]
Hi,
I was doing an arch linux install in a laptop where I used /dev/sda4 for saving some important data. When I was partitioning the disk for the installation I accidentally made the partition preceding /dev/sda4 overlap it. After installation I tried to mount the /dev/sda4 partition but I couldn't and gparted couldn't run because of the overlapping partitions. I followed the instructions at https://gparted.org/h2-fix-msdos-pt.php to fix the problem but then I couldn't boot into my system. There I decided to reinstall arch linux and put the size of partitions correctly. I did that and now I have arch linux installed but I still cannot mount /dev/sda4. How can I use the partition again?

The output of fdisk -l is :

/dev/sda1            2048    616447    614400  300M ef EFI (FAT-12/16/32)
/dev/sda2          616448   4810751   4194304    2G 82 Linux swap / Solaris
/dev/sda3         4810752 319383551 314572800  150G 83 Linux
/dev/sda4       324820992 351647743  26826752 12.8G  7 HPFS/NTFS/exFAT

Trying to mount /dev/sda4:

mount: /mnt: wrong fs type, bad option, bad superblock on /dev/sda4, missing codepage or helper program, or other error.

Gparted warning when getting info about the partition:

Unable to detect file system! Possible reasons are:
- The file system is damaged
- The file system is unknown to GParted
- There is no file system available (unformatted)
- The device entry /dev/sda4 is missing

Offline

#2 2019-08-11 19:43:05

seth
Member
Registered: 2012-09-03
Posts: 12,020

Re: Cannot mount partition after deleting overlapping partition

Seems you nuked the superblock of the partition.

1. Make a backup of the partition (eg. using dd)
2. MAKE A BACKUP OF THE PARTITION!
3. testdisk might be able to recover the superblock if there's an untouched backup on the partition

Mandatory reads:
https://wiki.archlinux.org/index.php/Fi … d_PhotoRec
https://www.cgsecurity.org/wiki/TestDisk

Offline

#3 2019-08-13 08:54:53

end
Member
Registered: 2019-08-11
Posts: 4

Re: Cannot mount partition after deleting overlapping partition

I tried using testdisk but it doesn't detect the partition. When using photorec I can only recover the files that were deleted from the partition.

Offline

#4 2019-08-13 12:41:57

seth
Member
Registered: 2012-09-03
Posts: 12,020

Re: Cannot mount partition after deleting overlapping partition

Stupid question:
Did you shrink /dev/sda3 or move the start of /dev/sda4?

Offline

#5 2019-08-13 12:45:06

end
Member
Registered: 2019-08-11
Posts: 4

Re: Cannot mount partition after deleting overlapping partition

I shrank /dev/sda3

Offline

#6 2019-08-13 12:55:04

seth
Member
Registered: 2012-09-03
Posts: 12,020

Re: Cannot mount partition after deleting overlapping partition

And you're sure the sda4 start remained untouched? (Asking because 150G  and 12.8G suspiciously look like the latter was adjusted to the former)
If testdisk doesn't find a superblock, you're kinda screwed - did you repartition the disk to squeeze the 150G sda3 in there?

Offline

#7 2019-08-13 13:18:19

end
Member
Registered: 2019-08-11
Posts: 4

Re: Cannot mount partition after deleting overlapping partition

I think sda4 was 12.8G before I shrank sda3. I repartitioned the disk after I shrank sda3; it was larger than 150G before that. That is why there is a gap between sda3 and sda4

Offline

Board footer

Powered by FluxBB