Ubuntu 14.04 LTS

I might have deleted the Kernel whilst trying to delete 10GB of old kernels. I haven't switched the PC off yet.

@Karel suggests an answer in a virtually identical question: Might have deleted kernel, but haven't shut off computer yet but it is vague on how to find grub (boot menu) device. I don't have enough reputation to comment there.

His answer:

sudo apt-get install --reinstall linux-image-generic  
sudo grub-install /dev/sdX
sudo update-grub

Disks program shows that, I have one SSD (device sda), split thus:

|             | Extended Partition |             |
|             |     Partition 3    |             |
| Filesystem  |        129GB       |  Filesystem |
| Partition 1 |____________________| Partition 2 |
| 25GB EXT4   |     Filesystem     |  102GB FAT  |
|             |     Partition 5    |             |
|             |     129GB EXT4     |             |

The 25GB is Linux (bootable); the 129GB is Linux and the 102GB is W95 FAT32

So I'm guessing that I need to replace the middle command with either sudo grub-install /dev/sda or sudo grub-install /dev/sda1 When @Karel suggests to enter the device name, I don't know if he means me to include the partition number.

  • Disks should show you the name of the drive device file - this is the key information missing from your question - is it /dev/sda or something else? – Zanna Apr 18 '17 at 9:32
  • Thanks @Zanna. Yes, they are all sda. You mean as opposed to dev/sdb dev/sdc etc.? – Little me Apr 18 '17 at 9:34
  • @Zanna, that might have sounded like I understood an answer . Do you mean that I type grub-install /dev/sda or does it need to have the partition number (presumably 1) as well? I really want to get this right... I'm swimming beyond my depth and I need to not kill my install. 8^o – Little me Apr 18 '17 at 9:55
  • 1
    You install grub to the whole drive, not the partition, so you would not use the partition number – Zanna Apr 18 '17 at 10:11
  • 1
    Possible duplicate of Might have deleted kernel, but haven't shut off computer yet – Zanna Apr 18 '17 at 13:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.