1

I have two Linux partitions, each running Ubuntu 12.04. One I was using as a legitimate partition for all my real computing. The other I was using as a honeycomb and a fallback partition. However, while working in the legit partition, I was apt-get installing and removing and I must have accidentally included a * or something. The kernel ended up being removed. When I rebooted, GRUB only listed my honeycomb kernels, so now I can only boot to the honeycomb. I was messing around with Cinnamon and GNOME and trying new things out and I got carried away.

The entire filesystem from the legit partition seems to be intact, and the /boot directory had only a grub folder in it and a memtest file.

How can I install a kernel into the legit partition, FROM the honeycomb?

2

You could do a chroot into the partition with missing kernel:

  • sudo mkdir /mnt/ubuntu
  • sudo mount /dev/ubuntuPartitionWithMissingKernel /mnt/ubuntu
  • sudo mount -t proc proc /mnt/ubuntu/proc
  • sudo mount -t sysfs sys /mnt/ubuntu/sys
  • sudo mount -t devtmpfs /dev /mnt/ubuntu/dev
  • sudo mount -t devpts /dev/pts /mnt/ubuntu/dev/pts
  • sudo cp -L /etc/resolv.conf /mnt/ubuntu/etc/resolv.conf
  • sudo chroot /mnt/ubuntu /bin/bash
  • source /etc/profile

Then you can install the missing kernel via apt-get. (I'm not sure if you have to update the bootloader configuration file afterwards or if it is done automatically after installing the kernel. If not run sudo update-grub).

You don't have to chroot from your honeycomb, you can use a Ubuntu LiveCD for that.

If you aren't able to install the kernel via apt-get you can copy the initrd.img file and the vmlinuz file from a LiveCD in /boot to /boot in your partition without kernel and update the bootloader, this way it'll at least boot.

| improve this answer | |

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.