0

I have recently migrated to Linux from Windows7, and was enjoying it, but 3 days ago Ubuntu just decided not to boot out of nowhere. I have found an online article suggesting I should try "modeset" and start Ubuntu then remove most recent kernel and see if that would work, which actually solved the issue. But this morning Ubuntu again stopped booting. It did work with recovery mod and nomodeset setings, but this time could not remove kernel(4.15.0.39-generic) as there was not another kernel package installed . Most recent software update for my graphic card was for Ubuntu 14(AMD HD Radeon 6970) so that ws not a solution neither.

I decided to go back to windows at this point because I had a lot of work to finish on my PC and I was losing time.

I went with windows 10 and installed a bootable USB and inserted to my PC, which automatically started windows installation.

In disc selection screen, I have formatted the SSD(120GB Corsair Force 3) which contained linux and then successfully installed windows.

Upon restart I have faced with this:

error: disk '[vmid/b0HGZa-iDQL-svQK-zHqE-TEV7-EaQa-cloeNT/UnMpLA-vrZ2-PiQW-uMTJ-7Vqg-o5yP-vFyDRx' not found.
Entering rescue mode...
grub rescue>

When i wrote "ls", here is the result:

(hd0) (hd0,msdos1) (hd1) (hd1,msdos2) (hd1,msdos1)

using "ls" with all of them individually, gave me "File system is unknown"

Found some more solutions online and went into windows installation screen and started command prompt and wrote:

Bootrec /fixmbr  

console said issue is successfully solved.

On start up again here was "grub rescue" screen.

Tried reinstalling ubuntu via USB device. After selecting Ubuntu

Could find/name Package element or something like that. As it diseappers quickly and I got anoter black screen.

Inserting Ubuntu USB to another computer, starts process just fine.

So do you have any suggestion at all?

Thank you for reading this long post.

Ertürk Ozan
  • 1
  • 1
  • 1

3 Answers3

0

If you installed Windows AFTER you installed Linux, you partition is gone and you have to reinstall. If not, something happened with you partition. Obviously blocks are missing, so grub can't access the initramfs.(usually in the boot folder). You do not need to fix the mbr- since grub started, that part is obviously working. Take an USB live image (e.g. the one you've used to install you linux with) and boot with it. When you get to a shell or terminal you need to check out, what the name of the partion is, where you've installed your linux:

blkid

You see sth like /dev/sda1 or /dev/sdb2 etc. Pick the correct partion (which should NOT be mounted) and enter:

fsck -y /dev/sdXn 

where X is something like a,b or c and n is something like 1 or 2 or .. You should select a linux partition, not any of the window partions. When done reboot. Should work then....

kanehekili
  • 6,402
  • Thank you for your answer. Right now I am following this suggestion:

    https://askubuntu.com/questions/927787/how-to-escape-grub-rescue-after-formatting-drive-with-ubuntu-partition

    after which, I will look into yours and will report back with the result

    – Ertürk Ozan Dec 24 '18 at 17:54
0

You most probably have a UEFI bios. What has in that case happened is this:

  1. You installed Ubuntu. Which created an EFI partition (or used an existing one if you chose that).
  2. You then installed Windows. Which presumably changed the partition scheme and removed the Ubuntu (as I don't see any Linux partitions).
  3. However, the EFI of Ubuntu remained (the grub-rescue part). Which has precedence.

How to fix: For Windows only:
1. Install Windows 7 as usual. Ensure you are installing it as UEFI.
2. Enter the BIOS Setup (you must have UEFI settings), there, choose boot sequence, you will be presented with UEFI boot sequence, in which Ubuntu would also be there having a higher precedence.
3. Adjust the precedence as needed.
4. Reboot.

With Linux:
1. Boot into Ubuntu Live Session. (You need a working shell for this).
2. Install efibootmgr

    sudo apt install efibootmgr   

3. Issue command:

    sudo efibootmgr

4. You should get a result like:

BootCurrent: 0005
Timeout: 1 seconds
BootOrder: 0005,0002,0001,0000
Boot0000* UEFI: SATA: HL-DT-ST DVDRAM GH70N   
Boot0001* Windows Boot Manager
Boot0002* UEFI: WDC WD5000AAKX-221CA1
Boot0005* ubuntu
  1. The BootCurrent is the important bit. You need to point it towards the You want. (In my case it is Boot0005, ubuntu, which is default)
  2. efibootmgr -a will set a boot num active , you can also use efibootmgr to delete such incorrect bootnums.

See, the important difference with normal BIOS and UEFI is that while in normal BIOS, you only could have one bootable partition per disk, and boot sequence only took into matter the physical devices; in UEFI, there can be multiple bootable partitions in a disk and they all can have a higher boot priority than the disk they are on. (Like in my configuration).

  • thank you for your answer. You solution seemed very logical but I was halfway trough another one so I kept with it so I could not try yours. – Ertürk Ozan Dec 24 '18 at 18:05
0

So issue seemed solved now.

I have followed this

I have reinstalled linux now and it works just fine. I realized it has older kernel now, 4.15.0.29

Since I love ubuntu, cant find the power to remove it completely but will probably make a partition to install windows10 too, but for now, the link I have sent to you solved my issue.

Ertürk Ozan
  • 1
  • 1
  • 1