LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 07-10-2008, 10:53 AM   #1
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Debian
Posts: 2,896

Rep: Reputation: 73
Question Locating Installed Kernels in Debian


I was looking into trying to find out what the proper way is to determine all / any installed kernels (old & present) on my Debian machine:

I was told by someone I can simply run the following command:

Code:
tunafish:~# dpkg --get-selections | grep "linux-image"
linux-image-2.6.22-3-686-bigmem			install
linux-image-2.6.24-1-686-bigmem			install
Is this correct? I am not sure if this is the correct way to see the total installed kernels on the system.
 
Old 07-10-2008, 11:45 AM   #2
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,231
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
I would use aptitude since it's my tool of choice..

Each line that begins with i is an installed package.
Code:
it-etch:/# aptitude search linux-image
v   linux-image                                           -                                                                 
v   linux-image-2.6                                       -                                                                 
p   linux-image-2.6-486                                   - Linux 2.6 image on x86                                          
p   linux-image-2.6-686                                   - Linux 2.6 image on PPro/Celeron/PII/PIII/P4                     
p   linux-image-2.6-686-bigmem                            - Linux 2.6 image on PPro/Celeron/PII/PIII/P4                     
p   linux-image-2.6-amd64                                 - Linux 2.6 image on AMD64                                        
p   linux-image-2.6-k7                                    - Linux 2.6 image on AMD K7 - transition package                  
p   linux-image-2.6-xen-686                               - Linux 2.6 image on i686                                         
i   linux-image-2.6.18-6-686                              - Linux 2.6.18 image on PPro/Celeron/PII/PIII/P4                  
p   linux-image-2.6.22-3-486                              - Linux 2.6.22 image on x86                                       
p   linux-image-2.6.22-3-686                              - Linux 2.6.22 image on PPro/Celeron/PII/PIII/P4                  
p   linux-image-2.6.22-3-686-bigmem                       - Linux 2.6.22 image on PPro/Celeron/PII/PIII/P4                  
p   linux-image-2.6.22-3-amd64                            - Linux 2.6.22 image on AMD64                                     
p   linux-image-2.6.22-3-k7                               - Linux 2.6.22 image on AMD K7                                    
p   linux-image-2.6.22-3-vserver-686                      - Linux 2.6.22 image on PPro/Celeron/PII/PIII/P4                  
p   linux-image-2.6.22-3-vserver-k7                       - Linux 2.6.22 image on AMD K7                                    
p   linux-image-2.6.24-1-486                              - Linux 2.6.24 image on x86                                       
i   linux-image-2.6.24-1-686                              - Linux 2.6.24 image on PPro/Celeron/PII/PIII/P4                  
p   linux-image-2.6.24-1-686-bigmem                       - Linux 2.6.24 image on PPro/Celeron/PII/PIII/P4                  
p   linux-image-2.6.24-1-amd64                            - Linux 2.6.24 image on AMD64                                     
p   linux-image-2.6.24-1-xen-686                          - Linux 2.6.24 image on i686                                      
i   linux-image-2.6.25-2-686                              - Linux 2.6.25 image on PPro/Celeron/PII/PIII/P4                  
p   linux-image-486                                       - Linux image on x86                                              
p   linux-image-686                                       - Linux image on PPro/Celeron/PII/PIII/P4                         
p   linux-image-686-bigmem                                - Linux image on PPro/Celeron/PII/PIII/P4                         
p   linux-image-amd64                                     - Linux image on AMD64                                            
p   linux-image-k7                                        - Linux image on AMD K7 - transition package                      
p   linux-image-xen-686                                   - Linux image on i686
although the solution provided to you is a much cleaner output..

Code:
it-etch:/# dpkg --get-selections | grep "linux-image"
linux-image-2.6.18-6-686			install
linux-image-2.6.24-1-686			install
linux-image-2.6.25-2-686			install
and if for some reason you don't believe either of those you can just look in the /boot directory..

Code:
er@it-etch:~$ ls /boot
boot.0800            initrd.img-2.6.18-6-686      System.map-2.6.18-6-686
coffee.bmp           initrd.img-2.6.18-6-686.bak  System.map-2.6.24-1-686
config-2.6.18-6-686  initrd.img-2.6.24-1-686      System.map-2.6.25-2-686
config-2.6.24-1-686  initrd.img-2.6.25-2-686      vmlinuz-2.6.18-6-686
config-2.6.25-2-686  initrd.img-2.6.25-2-686.bak  vmlinuz-2.6.24-1-686
debian.bmp           map                          vmlinuz-2.6.25-2-686
debianlilo.bmp       sarge.bmp
grub                 sid.bmp
 
Old 07-10-2008, 12:13 PM   #3
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 53
Or for short: dpkg -l|grep linux-image
 
Old 07-10-2008, 02:22 PM   #4
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Debian
Posts: 2,896

Original Poster
Rep: Reputation: 73
Quote:
Originally Posted by makuyl View Post
Or for short: dpkg -l|grep linux-image
Why are my results different with this command?

Code:
tunafish:~# dpkg -l | grep "linux-image"
ii  linux-image-2.6.22-3-686-bigmem      2.6.22-6.lenny1                  Linux 2.6.22 image on PPro/Celeron/PII/PIII/P4
ii  linux-image-2.6.24-1-686-bigmem      2.6.24-7                         Linux 2.6.24 image on PPro/Celeron/PII/PIII/P4
 
Old 07-10-2008, 03:57 PM   #5
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 53
Different how?
Aren't those the same kernels as in your first post?
 
Old 07-10-2008, 05:39 PM   #6
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Debian
Posts: 2,896

Original Poster
Rep: Reputation: 73
2.6.22-6 & 2.6.24-7

Where did those come from?
 
Old 07-10-2008, 07:26 PM   #7
lurko
Member
 
Registered: Jun 2006
Location: Ontario, Canada
Distribution: Debian
Posts: 448

Rep: Reputation: 35
Those are the (current) versions of the linux-source packages for 2.6.22 and 2.6.24. I suspect a recent update to apt is why they're appearing there, I'm getting similar output when I run that command (and apt was among a bunch of updates I installed earlier today). Is the 2.6.24-1 linux-image package built from the 2.6.24-7 source package?
 
Old 07-10-2008, 08:59 PM   #8
Telemachos
Member
 
Registered: May 2007
Distribution: Debian
Posts: 754

Rep: Reputation: 59
Code:
aptitude search "~nlinux-image ~i"
That searches for the phrase linux-image and restricts the results to installed pacakges.

For more minimal output,
Code:
aptitude search "~nlinux-image ~i" -F %p
The -F flag allows you to control the format of the output, and %p says "package name." So that tells Aptitude to run the same search, but only show the name of the installed packages.
 
Old 07-10-2008, 11:40 PM   #9
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,231
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
apt-cache policy linux-image-2.6.22-3-686-bigmem

The first is the package name the second is something like the build version which will change as security updates are added.. sorry I don't know the proper terminology but that's why the version number is different/higher.
Code:
debianetch:~# apt-cache policy linux-image-2.6.18-6-686
linux-image-2.6.18-6-686:
  Installed: 2.6.18.dfsg.1-18etch6
  Candidate: 2.6.18.dfsg.1-18etch6
  Version table:
 *** 2.6.18.dfsg.1-18etch6 0
        500 http://security.debian.org etch/updates/main Packages
        100 /var/lib/dpkg/status
     2.6.18.dfsg.1-18etch1 0
        500 http://ftp.uwsg.indiana.edu etch/main Packages
see how the kernel version in main is older than the installed version from the security repository ?
 
Old 07-11-2008, 07:11 AM   #10
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Debian
Posts: 2,896

Original Poster
Rep: Reputation: 73
Thanks all!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Question on locating the instance of a device installed? 1jnike Suse/Novell 2 07-26-2007 04:09 PM
If you installed huge26.s or the test26.s kernels cwwilson721 Slackware 46 01-27-2007 02:27 PM
locating older version of Debian? bullium Debian 2 09-19-2004 05:57 PM
Locating Installed Programs /or Files Mr T Donegal Linux - Software 5 06-28-2004 08:36 PM
Help Needed Locating a RPM Installed Program. phiqtion Linux - Software 2 09-20-2003 07:49 AM


All times are GMT -5. The time now is 06:35 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration