Stuck in fsck after "Force rewrite? yes"

Hi everyone:

My 3 usb ports stopped working suddenly. I’ve been asking a computer technician who told me to update the BIOS to exclude a hardware problem. So, because I only use Manjaro and not having the possibility to update the BIOS through a USB stick, I tried making a partition with the extracted iso of Windows to install it from there, and another partition to install Windows. My idea was to install Windows 10, update the BIOS and then remove Windows. After partitioning I tried rebooting the laptop, but it did’t boot to Manjaro, instead it booted to a terminal that said:
“The filesystem size (according to the superblock) is 24007264 blocks
The physical size of the device is 20041408 blocks”(the numbers are invented, I don’t remember exactly).
So I searched and it said it was because I didn’t shrink the filesystem before partitioning, but the commands suggested weren’t found when trying to execute them.
Also the terminal advised to do fsck /dev/sda2, I did it and nothing happened.
I tried doing fsck -f /dev/sda2 and the program sent:

Error reading block 241172512… Ignorer error? yes
Force rewrite?yes

So the laptop it’s been stuck there for more than 4 hours already.
I don’t know if it’s a lost cause or if I should wait it to end.

Could you please help me?

It’s almost never a lost cause.
Yours is just not a very good description of what you did
to resize the partition with your filesystem on it.

I’d have to read up on how to do it myself - how to shrink a partition with a filesystem on it that needs the data to be preserved.

For now you can quit that command - nothing has been done yet.
press CTRL+c

From your current description I don’t know whether it would be safe to let fsck “correct” anything.

Thanks :slight_smile:
I already canceled it.
Is the edit I just made “didn’t shrink the filesystem before partitioning” better?
Made a mistake there describing what I made.
What can I do now?

As I said:
I’d have to “read up” on the procedure.
Apparently, so did you.

… what is the recommended procedure?
Apparently it is:
shrink the filesystem before shrinking the partition

But you didn’t say what those steps and commands where
that where described and recommended
that you then could not execute
because they apparently where not available to you - for some reason.

… it’s a bit strange to me that you did not check beforehand that the tools you needed where available to you when you started this
and that you therefore didn’t/couldn’t follow the … procedure

and we still don’t know what you did and which tool you used to do what and in which order to get to the state that you are now in :man_shrugging:

OK, hope this is clearer (just tell me whatever I’m not clear expressing).
I made 2 partitions with cfdisk, a 100 G Microsoft basic data partition and a 10 G Windows recovery environment partition. Then I did mkfs.ntfs /dev/sda4 and mkfs.ntfs /dev/sda5 and copied the extracted iso in the 10 G partition (can’t remember which one it was and I can ‘t do fdisk -l nor lsblk). Then I rebooted and Manjaro didn’t load, instead a terminal appeared.
I knew I had to shrink the filesystem after all this, when I was looking how to fix the problem not before it, so I missed this step :frowning: .
I forgot the commands I tried executing that didn’t work let me search them. But the issue was never with Manjaro loaded, the “command not found” messages I’m speaking of are in this terminal that appears when booting. I’ ll edit the first message again

So you changed the partition size by fdisk and didn’t resize the filesystem… That explain everything… Normally resizing the filesystem comes first and then resize the partition… However…

You need to resize the filesystem, so that it fits exactly the size of the partition with resize2fs.

But to judge the situation… I would say you can not repair it, because you resized the partition, and then created 2 new partition and formated it. So to be clear: you have overwritten the data of the ext4 filesystem. Only thing what you can do, is, creating an image of the partition and hope you can restore some data of it.

I understand. Nothing to do. The data isn’t important because I have it backed up. My problem is that I can’t reinstall Manjaro or anything because the USB ports aren’t working. I bought a type C hub with USB ports (hope to get it soon) to see if I can install it from there and fix the USB ports.
Thanks a lot.
At least I learnt something??? :sweat_smile: :sob: