0

I was receiving a message upon booting my Ubuntu installation that the boot drive had exactly 0 bytes left and somewhere else on this forum someone suggested looking at the kernels that were installed. I had about 20. I removed like five of the oldest to see if that would resolve the issue and when I rebooted all I get is this:

error: file '/vmlinuz-4.4.0-59-generic' not found  
error: you need to load the kernel first

Do I have to reinstall or is there some way to recover from this?

marked as duplicate by David Foerster, Eric Carvalho, Elder Geek, Anwar, 2707974 Apr 15 '17 at 11:18

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • This is the post that I followed on Ask Ubuntu: askubuntu.com/questions/218783/… – jb61264 Apr 13 '17 at 3:47
  • Is the ...59 kernel the one you are trying to boot? Did you try another kernel? – ubfan1 Apr 13 '17 at 4:16
  • When I boot the system, The GNU Grub version 2.02~beta2-36ubuntu3.6 window appears. There is an *Ubunutu option and an "Advanced Options for Ubunut" option. When I select the "Advanced Options" six lines appear...three kernals, each with a corresponding "recovery mode". I have tried all six with the same result. What I don't understand is that I know there were T least 10 additional "kernals" listed but now that I have been thinking on it, I think they may have been 4.4.0 and then I have removed some of the "-[number] versions. – jb61264 Apr 13 '17 at 11:31
  • You had 20 and removed some, there should be some left. Use Advanced option for grub to test each and boot to a one – Anwar Apr 15 '17 at 6:50
2

When at the grub screen, read the instructions at its bottom. Type "c" for a grub command line. Then use the "ls" command and the Tab key to get the choices and look at (hd0,1)/boot (for instance).
ls TAB and then choose the disk number (probably 0)
ls (hd0, TAB and choose the partition (probably 1)
ls (hd0,1)/ TAB and see that boot is in the list, then
ls (hd0,1)/boot to see what kernels are left.
Note the number you want to boot, exit the grub command prompt (instructions at bottom of screen), and at the grub menu, type "e" to edit the boot commands. Change the kernel number and the initrd number to match the number you selected, and ctrl X or F10 to boot. After a successful boot, immediately fix the grub.cfg file by running

sudo update-grub
  • I did boot inside my debian machine and ran update-grub, rebooted to see if it was fixed and no luck, still same error event that update-grub found the right vmlinuz and initrd files – Vitor Falcão Jul 20 '18 at 22:07
1

So I found a post on askUbuntu about using "Boot Repair Disk" available on SourceForge here: Boot Repair Disk. After booting to the disk and running the software, my system is back up and running. Not exactly sure what all it did to recover my system but it is now booting up normally again. Now to go make a donation to the project.

Not the answer you're looking for? Browse other questions tagged or ask your own question.