0

Tried to delete some files and used something close to the following command.

rm -r ./*

Unfortunately, the Ubuntu crashed instantaneously. Did a forced reboot and it showed the GRUB RESCUE. Followed this tutorial but the (hd0,gptX)/boot directory was without files.

So I booted through a flash drive, and tried to run BootRepair. It gave the message

GPT detected. Please create a BIOS-Boot partition (>1MB, unformatted filesystem, bios_grub flag). This can be performed via tools such as Gparted. Then try again.

Then, created the partition with GParted, unformatted with the flag and gave the same error.

Tried another tutorial and it failed in the following command:

sudo chmod /mnt
chroot: failed to run command ‘/bin/bash’: No such file or directory

So the bash is missing and I have no idea how to fix it. Any ideas?

0

Apparently you accidentally deleted Ubuntu while having root permissions.

Depending on where you did run the rm command there may still be data on your drive, or they may all be deleted. You should be able to see remnant data on mounting your partitions after booting an Ubuntu live session.

In case all your drive is empty you need data recovery tools to harvest your important personal data such as extundelete or TestDisk. The latter will also recover files after partitions were changed.

After you successfully had recovered your data you will have to reinstall Ubuntu.

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.