0

I just resized my primary partition according to the answer given in StackExchange. I used the method with fdisk. I deleted the partition and then recreated it and as suggested in the post. After this I rebooted my PC to update the partions table.

Then the grub> prompt greeted me since it couldnt find the needed linux partition. Trying to look up the data of my partition in grub using ls (hd0,gpt6) / reported that grub doesnt know the given file system.

And now I used a live Linux to try and figure out what caused the problem and how to fix it without loosing the data on this partition.

Looking at this partition in gparted is see that gparted is unable to identify the filesystem as well. When I run blkid this partition doesnt even show up. But when I run fdisk from the Live Linux it correctly identifies this partion as beeing a Linux Filesystem.

fdisk:

Command (m for help): p
Disk /dev/nvme0n1: 238.5 GiB, 256060514304 bytes, 500118192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: D98C1DC3-A8A5-4707-AAA8-2AC8C2A7CDBD

Device             Start       End   Sectors   Size Type
/dev/nvme0n1p1      2048    534527    532480   260M EFI System
/dev/nvme0n1p2    534528    567295     32768    16M Microsoft reserved
/dev/nvme0n1p3    567296 306978815 306411520 146.1G Microsoft basic data
/dev/nvme0n1p4 474914816 478550015   3635200   1.8G Windows recovery environment
/dev/nvme0n1p5 478550016 500107263  21557248  10.3G Microsoft basic data
/dev/nvme0n1p6 306978816 474914815 167936000  80.1G Linux filesystem *

Partition table entries are not in disk order.

.* this partition is of interest

The partition was formatted as ext4 and I extended it by changing the partitions starting point (this is the only thing I see beeing diffrent to the answer I followed).

0

Changing the starting point of a partition, is effectively the same as removing or dding pages to the beginning of a book, leaving the reader (here the OS) without chance to know where the book originally started.

Restore the starting point to its original values, then check and mount the file system. If you don't remember the value for the starting point, yuo can try to scan the partition with Testdisk or photorec from a live session to see what they are able to recover - some dat might be lost though.

And next time only expand partitions in the back end (right end in gparted) NEVER from the starting point. If free space is before the partition, you will have to move the partition left into the free space in gparted, and the expand partition to the right.

And NEVER move / or /boot partition without checking up on the extra steps needed to regenerate boot-/grub-configuration.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.