Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This question already has an answer here:

I had some strange issues installing sudo apt-get install linux-image-server and for some reason apt-get was trying to install two different versions of the kenrel, the real issue was that I removed the previous kernel.

The PC got rebooted (I work with two PC's with KVM, pressed Alt + Ctrl + Del while thinking I was in windows getting Ubuntu to reset itself) and walla! I have only meme test in grub, great...

Any idea how I can install a kernel image using liveCD and apt-get ? or am I better with downloading what I need from Ubuntu package site and then how do I use dpkg to install it with a liveCD on my local machine ? Somehow chroot to it from the live CD ?

share|improve this question
    
Could you write the exact error? –  Braiam Sep 15 '13 at 1:34
    
not really, i can't boot into my system anymore since i have no kernel image.... my original question was if anyone knew how i could install new one using apt-get\dpkg from a rescue disk\live cd. –  codeScriber Sep 15 '13 at 5:09
    
If I had understood your question first, I would have guided you to How to restore a system after accidentally removing all kernels? –  Braiam Sep 15 '13 at 12:29
add comment

marked as duplicate by Seth, Braiam, Warren Hill, Alaa, Eric Carvalho Sep 19 '13 at 12:12

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.

1 Answer

up vote 1 down vote accepted

Of course like any a little hard to solve the question in stack overflow sites I had to manage on my own.

  1. start a live CD, I used ubuntu 12.10 installation.
    1. sudo -i
  2. mount your system under /mnt.
  3. use mount -o bind to bind /proc, /sys and /dev to the mounted system.
  4. cp $(readlink /etc/resolv.conf) /mnt --> this will make sure u can use the networking...
  5. chroot /mnt bash
  6. service networking restart
  7. dpkg --purge $(dpkg -l|grep "^iU *linux-image")

After that I could install a specific kernel version using apt-get install linux-image-3.0.xx-yy and restart the system with a new normal image, my main problem was that for some reason the -19 version of the kernel with the 'extra' package failed to install together. Installing just the kernel alone solved the problem.

share|improve this answer
add comment

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