0

Two days ago I tried to install debian linux alongside ubuntu just because of some recommendations, but yesterday I deleted the whole debian os and it seems that ubuntu's boot loader wont work and I'm face grub rescue. Any answer I found on internet was for windows alongside linux and so now I can't recover my files on ubuntu partition, any one can help?

amiraloi
  • 1
  • 3
  • 1
    You can probably get your files relatively easily - boot into a live usb session (‘try Ubuntu’), you’ll hopefully then be able to mount your previous Ubuntu partition to access / back to the files. – Will Sep 23 '21 at 21:56
  • FYI: It won't be Ubuntu's boot loader that doesn't work, by installing Debian last, you replaced the prior Ubuntu boot loader with a Debian one, then by removing the Debian partition you broke the Debian controlled `grub`. The *break* was done by whomever deleted the Debian partition (ie. *last installed*) that controlled booting. If you want to remove a partition in future; always ensure that OS/partition isn't used in the booting process before you delete/remove it (by default it's the last OS installed unless you specifically changed ownership of boot via command) – guiverc Sep 23 '21 at 23:00
  • 1
    Does this answer your question? [How can I repair grub? (How to get Ubuntu back after installing Windows?)](https://askubuntu.com/questions/88384/how-can-i-repair-grub-how-to-get-ubuntu-back-after-installing-windows) – guiverc Sep 23 '21 at 23:00
  • (you didn't install windows, but removing Debian when it controlled the booting of your box achieved the exact same thing...) – guiverc Sep 23 '21 at 23:05

1 Answers1

0

Huh, finally loging in to ubuntu without reinstalling :))) First I should say that I didn't want to put this question behind so I will share my answer

I found something here that can help anyone if my respond won't work on their computers:
https://help.ubuntu.com/community/Grub2/Installing

I made a bootable USB stick to reinstall Ubuntu, then I chose secure boot password again and in partitioning tab I chose something else... And then changed bootloader location to my /boot directory, then I restarted computer, opened up BIOS and chose /boot again for loading and after a while Ubuntu started normally without missing any files!

amiraloi
  • 1
  • 3