I have been running Pop!_OS for a while now, and decided to install Kubuntu. I booted into the Kubuntu USB drive to try it first, and decided to prepare the partition for installation with KDE Partition Manager.
This SSD already had 4 partitions: sda1
(old Windows install), sda2
(data), sda3
(Pop!_OS) and sda4
(swap). To make space for a new partition for Kubuntu, I shrunk the end of sda2
by 30Gb, but couldn't format this unallocated space as there were 4 primary partitions already. So I decided to delete sda1
, move it's unallocated space to the right of sda2
and add that space into sda2
. When applying the actions there was an error (something about a size mismatch) and it was aborted.
Booting back on Pop!_OS, I can see the 30Gb of unallocated space taken from sda2
are there, and that sda1
wasn't touched, but I can't mount sda2
:
Here is what GParted shows now:
Here are the info for sda2
:
And the output of fdisk -l
:
(partition table entries are not in disk order).
As it seems there could me multiple problems, I decided not to touch it for now and get some advice, I'd really like to recover the data in that partition. If any more information is needed I'd be glad to provide it. Sorry for the long thread, and thank you so much for your time.
UPDATE:
While I wait for any feedback, I've attempted to fix the order of the partition table entries using fdisk. After doing the procedure (and having to fix GRUB to be able to boot back in) fdisk does not report them as out of order.
Another thing I did was use gparted's check
option on that partition, which returned some more interesting info:
GParted 0.32.0 --enable-libparted-dmraid --enable-online-resize
Libparted 3.2
Check and repair file system (ext4) on /dev/sda2 00:00:00 ( ERROR )
calibrate /dev/sda2 00:00:00 ( SUCCESS )
path: /dev/sda2 (partition)
start: 275396608
end: 782370815
size: 506974208 (241.74 GiB)
check file system on /dev/sda2 for errors and (if possible) fix them 00:00:00 ( ERROR )
e2fsck -f -y -v -C 0 '/dev/sda2' 00:00:00 ( ERROR )
The filesystem size (according to the superblock) is 71051776 blocks
The physical size of the device is 63371776 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort? yes
e2fsck 1.45.3 (14-Jul-2019)
That is the error that started all of this, I just had not managed to save that info. It seems to me the partition simply doesn't know it's actual size? It started of with over 270GB, then I removed 30GB for a new partition. Thunar reports it has 260GB, Dolphin, GParted and fdisk report it has 240GB, which makes sense. Now how could I fix that, without making things worse? Thank you so much again, for anyone reading.
fdisk
's output here); refer to the linked Q/A on the Meta site for further information. Thank you. – fra-san Mar 13 '20 at 16:39