Posts: 765
rust collector
Joined: 27 Dec 2011
#1
I have tried to install a few different kernels, and some have failed to install right...
How do I remove them?
I have tried to remove them using smxi, but it fails.

Is there some place kernels"are", that I can go to, and remove them myself?
anticapitalista
Posts: 5,956
Site Admin
Joined: 11 Sep 2007
#2
Try as root smxi -G. No need to leave the desktop.
Posts: 765
rust collector
Joined: 27 Dec 2011
#3
Thanks! I didn't know about the -G option!
But...it failed...
Here is the stuff I get in the terminal:

Code: Select all

Please type the appropriate number and hit enter
------------------------------------------------------------------
1) yes-remove-kernel
2) yes-remove-kernel-and-download-directory
3) no-do-not-remove
#? 2
------------------------------------------------------------------
Removing all 2.6.30-rc5-baldric-0.3 kernel packages now...

  Removing packages   ...
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libsilc-1.1-2 libgadu3 libdb4.7 libsilcclient-1.1-3
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 192 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up linux-image-2.6.30-rc5-baldric-0.3 (2.6.30-rc5-baldric-0.3-10.00.Custom) ...

 Hmm. There is a symbolic link /lib/modules/2.6.30-rc5-baldric-0.3/build
 However, I can not read it: No such file or directory
 Therefore, I am deleting /lib/modules/2.6.30-rc5-baldric-0.3/build

Running depmod.
Finding valid ramdisk creators.
Failed to find suitable ramdisk generation tool for kernel version 
2.6.30-rc5-baldric-0.3 on running kernel 3.2.0-9.dmz.1-liquorix-686 in mkinitramfs-kpkg mkinitrd.yaird
dpkg: error processing linux-image-2.6.30-rc5-baldric-0.3 (--configure):
 subprocess installed post-installation script returned error exit status 127
Setting up linux-image-2.6.31-rc9-kuki-20090919 (2.6.31-rc9-kuki-20090919-10.00.Custom) ...
configured to not write apport reports

 Hmm. There is a symbolic link /lib/modules/2.6.31-rc9-kuki-20090919/build
 However, I can not read it: No such file or directory
 Therefore, I am deleting /lib/modules/2.6.31-rc9-kuki-20090919/build

Running depmod.
Finding valid ramdisk creators.
Failed to find suitable ramdisk generation tool for kernel version 
2.6.31-rc9-kuki-20090919 on running kernel 3.2.0-9.dmz.1-liquorix-686 in mkinitramfs-kpkg mkinitrd.yaird
dpkg: error processing linux-image-2.6.31-rc9-kuki-20090919 (--configure):
 subprocess installed post-installation script returned error exit status 127
configured to not write apport reports
                                      Errors were encountered while processing:
 linux-image-2.6.30-rc5-baldric-0.3
 linux-image-2.6.31-rc9-kuki-20090919
E: Sub-process /usr/bin/dpkg returned an error code (1)
  Error 100 removing packages:   

Cleaning up any leftover kernel cruft from 2.6.30-rc5-baldric-0.3 now...
Running update-grub to make sure everything is solid...
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-3.2.0-9.dmz.1-liquorix-686
Found kernel: /boot/vmlinuz-2.6.36-1-mepis-smp
Found kernel: /boot/vmlinuz-2.6.31-rc9-kuki-20090919
Found kernel: /boot/vmlinuz-2.6.30-rc5-baldric-0.3
Updating /boot/grub/menu.lst ... done
Your kernel removal action for 2.6.30-rc5-baldric-0.3 has been completed.
------------------------------------------------------------------
Kernel directory: /usr/src/sm-kernel-downloads/2.6.30-rc5-baldric-0.3 does not exist.
__{{emoticon}}__
Posts: 609
dark-D
Joined: 02 Jun 2008
#4
apt-get remove --purge linux-image-2.6.30-rc5-baldric-0.3 doesn't work?
Posts: 765
rust collector
Joined: 27 Dec 2011
#5
No, it says it can not find the kernel...
Posts: 609
dark-D
Joined: 02 Jun 2008
#6
how about?
dpkg -P linux-image-2.6.31-rc9-kuki-20090919
dpkg -P linux-image-2.6.30-rc5-baldric-0.3
if this doesn't work i don't have any other ideas.
Posts: 765
rust collector
Joined: 27 Dec 2011
#7
Heh, Well, it also failed, but it did show me where the kernel-stuff is stored, so I could go and delete them.
after a update-grub, all is fine!

thanks people!