3

I have a Dell XMP-13 Ultrabook (SSD drive only) with 12.04 installed dualboot with the original windows. It has been running flawlessly for many many months.

Today in the middle of a system update (kernel) I accidentally put it in suspend mode. Then it got frozen whenever I tried to boot.

I then booted in a previous ubuntu version and the partial upgrade dialog box appeared. I started it and the computer got frozen again.

Now it stops in the Dell logo screen with the message:

error: ELF header smaller than expected. 
grub rescue>_

I did some research and tried to find the linux images as suggested in this answer: Recovering moved .mod files using grubrescue

However I always get the error: no such partition. when trying to ls on the drives:

grub rescue>ls
(hd0) (hd0,gtp10) (hd0,gtp9) (hd0,gtp8) (hd0,gtp7) (hd0,gtp6) (hd0,gtp5) (hd0,gtp4) (hd0,gtp3) (hd0,gtp2) (hd0,gtp1)

grub rescue>ls (hd0,gtp1)
error: no such partition.

grub rescue>ls (hd0,gtp1)/boot
error: no such partition.

This is the same for all drive numbers with and without the "/boot"

Any idea of what should I try?

lpanebr
  • 1,277
  • 1
    I would try boot-repair. It is the second answer in the question you link to. Do NOT run the grub2-install command below! – Julian Stirling Jan 06 '14 at 19:48
  • @JulianStirling Thanks, I am creating the USB to try that.. The boot-repair did save me when I first installed the system and it wouldn't boot. (fingers crossed) – lpanebr Jan 06 '14 at 19:50
  • @JulianStirling it seems my bios is in "UEFI Boot" mode and this mode does not allow me to boot from the USB. I will try changing the boot mode. – lpanebr Jan 06 '14 at 20:04
  • Good luck with that. I have never had (or been asked to help on) a machine with UEFI, so I have no advice. But there is plenty on the net. When you get boot-repair going remember to write down the paste-bin link just in case there is a problem! – Julian Stirling Jan 06 '14 at 20:11
  • @JulianStirling thanks. Booted but now the boot-repai says "The boot of your PC is in Legacy Mode... You may want to retry after changing it to EFI mode." and asks continue? Yes or No.... damm No aborts the process... maybe I just need to do it (Yes) and THEN change the boot mode to the previous state..? – lpanebr Jan 06 '14 at 20:23
  • Look here to change boot mode, if you are not confident with these instructions then I would probably ask a new question on this message. As I said before I am not confident on giving advice for EFI. – Julian Stirling Jan 07 '14 at 03:48
  • @JulianStirling thanks for your support. Yesterday I could solve the problem by running boot-repair and then changing the boot mode back to "UEFI: Secure boot OFF". I guess I will write an answer and mark it correct to close this question. – lpanebr Jan 07 '14 at 16:51
  • 1
    Brilliant! Glad it worked. – Julian Stirling Jan 07 '14 at 16:55

2 Answers2

3

First of all: if you come across this error do not despair. Despite the horrendous appearance of the situation it seems that in most cases it is savable.

After some research and help from Julian Stirling in the comments of my question I got the problem resolved by using boot-repair.

I had to:

  1. Use my ubuntu desktop to create a bootable USB stick on Ubuntu

  2. Then in order to be able to boot from the USB I had to change the BIOS Boot Mode Setting to Legacy Boot Mode, Secure Boot Off change the BIOS boot mode Legacy Boot Mode, Secure Boot Off

  3. After booting from the USB I selected the Try Ubuntu

  4. connected to the internet (WiFi in my case)

  5. open a new Terminal, and installed boot-repair:

    sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update

  6. When the update finishes run boot-repair:

    sudo apt-get install -y boot-repair && (boot-repair &)

  7. Then I clicked the "Recommended repair" button. In this step I got a little worried when prompted to choose Yes or No to the message "The boot of your PC is in Legacy mode. You may want to retry after changing it to EFI mode.". It turns out I had to click Yes or the boot-repair would not run. After a little wait boot-repair did its magic and when it finished I took note of the URL as instructed.

  8. Finally I changed the BIOS Boot Mode Setting back to what it was before I started. Rebooted and boom! Everything was back to normal.

lpanebr
  • 1,277
-2

Sounds like your install is somehow mangled and the bootloader can't load the kernel. I would try to do a fresh install , if you have nothing to lose.

Salvo
  • 1