Kernel problems

Asked by Jose Pena

I recently updated my Ubuntu Kernel. I ended up with about four different Kernels showing up on my GRUb and tried to use Synaptic package manager to uninstall the old ones. I ended up deleting all of them and am now locked out of Ubuntu. My GRUB still works fine, however, since I can still boot into Windows perfectly. I just wanted to know if there was any way that I could add the Kernel using my Live CD. I tried to change the "menu.lst", but it does not allow me to modify it since I am not the owner (the owner is root). Is there any way to add the Kernel that I need from the live cd?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Tom (tom6) said :
#1

Hi :)

I am not entirely certain but i think that if you can copy these files into /boot

vmlinuz
vmcoreinfo
System.map
initrd.img
config
abi

all with the same kernel number after them. I think that might fix the problem?
Good luck and regards from
Tom :)

Revision history for this message
Tom (tom6) said :
#2

Hi again :)

Another thing worth considering doing is to copy all the /home folder to a new partition using the advice in this guide
https://help.ubuntu.com/community/Partitioning/Home/Moving#Copy%20/home%20to%20the%20New%20Partition

but apart from doing the copying don't worry about the rest of the guide. Then do a re-install to the original partition. When you get to the Partitioning Section of the installer chose the very bottom option "Advanced" or "Manual" install. Right-click and "Change" or "Edit" the original partition to set it's "Mount Point" to / and set the new partitions "Mount Point" to /home. Make sure the /home does NOT get formatted. So check that all partitions are UNticked in the "Format?" column. The linux-swap will get formatted anyway but that is fine.

Hopefully this re-install will keep pretty much everything exactly the same but just refresh missing or corrupted system files.

Good luck and regards from
Tom :)

Revision history for this message
Tom (tom6) said :
#3

Hi again again :)

The /home partition contains all the data&settings for all of the users in a linux system. It can be copied onto an NTFS partition which then means it can also be read by Windows. An excellent way to share data between Windows and linux !! :)) So, you could really gain a better system in recovering from this :)

Good luck and regards from
Tom :)

Revision history for this message
Book 'em Dano (heymrdjd) said :
#4

You could try mounting the HDD which contains the kernelless linux OS by inputting the proceeding commands after booting with the LiveCD and then try to install the kernel. I'm making an assumption that /, /boot, /var and all other pertinent directories are on the same partition as /.

In a terminal (Applications > Accessories > Terminal) type the following commands:
sudo fdisk -l # use this command to determine the location of kernelless HDD where / is located, i.e. /dev/sda1 or /dev/sdb1
sudo mount /dev/sda? /mnt # input the number that corresponds to where your kernelless HDD is
sudo mount -o bind /dev /mnt/dev
sudo mount -o bind /dev/shm /mnt/dev/shm
sudo mount -o bind /proc /mnt/proc
sudo mount -o bind /sys /mnt/sys
sudo chroot /mnt
sudo apt-get install linux-image-generic

Revision history for this message
Tom (tom6) said :
#5

Fantastic :)))
A properly linux answer and very much more elegant!! Try Book'em Dano's approach and if it doesn't work (seems unlikely i think) then you could always try my kludgy answer afterwards.
Good luck and regards from
Tom :)

Can you help with this problem?

Provide an answer of your own, or ask Jose Pena for more information if necessary.

To post a message you must log in.