1

I accidently removed all kernels from my Ubuntu 14.04 Trusty. I followed steps in this question's answers to install a new kernel but when I try to boot I don't see the 'Linux/ubuntu' option in my grub menu list. It only shows 'System Settings'.

How do I regenerate the earlier/default menu entries for ubuntu in grub?

Note:

  1. I am currently able to boot with these steps on grub prompt:

    set root=(lvm/ubuntu--vg-root)
    linux /boot/vmlinuz-3.13.0-74-generic root=/dev/mapper/ubuntu--vg-root
    initrd /boot/initrd.img-3.13.0-74-generic
    

    boot

  2. When on live usb, I copied vmlinuz, init... etc. from my boot partition to /boot folder because I could not find a way to use a separate boot partition from grub prompt.

migrated from stackoverflow.com Jan 12 '16 at 21:09

This question came from our site for professional and enthusiast programmers.

1

You can manually boot with a separate /boot.

Separate /boot on sda1, / on /dev/mapper/ubuntu--vg-root:

set prefix=(hd0,1)/grub
insmod linux
set root=/dev/mapper/ubuntu--vg-root
linux (hd0,1)/boot/vmlinuz-3.13.0-74-generic root=/dev/mapper/ubuntu--vg-root
initrd (hd0,1)/boot/initrd.img-3.13.0-74-generic
boot

Not sure why BobaJob's instructions were down voted. If you can boot and fstab still has separate /boot that would reinstall grub to MBR. And a sudo update-grub regenerates menu. Or use dpkg to reinstall grub. If from live installer you can also use Boot-Repair.

-1
sudo grub-install /dev/sda 

Something like that should fix it, assuming your main HDD is /dev/sda.

If you've booted from a Live CD/USB you'll need to chroot first.
http://howtoubuntu.org/how-to-repair-restore-reinstall-grub-2-with-a-ubuntu-live-cd

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.