LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-09-2009, 09:07 PM   #1
james2b
Member
 
Registered: Feb 2007
Location: Washington state, USA
Distribution: Ubuntu Mate 18.04, Mint 19.1
Posts: 360

Rep: Reputation: 45
Question file type for the Linux kernel image file, (vmlinuz) is unknown


The file type for the Linux kernel image file, (vmlinuz) is shown as unknown, in most major distro's. Some Linux show the initial ram disk file, (initrd) as a GZip file type, but when I right click a kernel file and select properties, it says unknown file type, so can that be changed, or is it best to just let it be ? Thanks in advance.
 
Old 11-09-2009, 09:16 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
There are two types of initrd files. One type is a compressed ext2 filesystem. The other is a compressed cpio archive. The latter seems to be what I've seen lately.

Copy your initrd file to your home directory. The use the file command to examine it.

example:
Code:
> cp /boot/initrd-2.6.27.37-0.1-default ~                                                              
> mv initrd-2.6.27.37-0.1-default initrd-2.6.27.37-0.1-default.gz
> gunzip initrd-2.6.27.37-0.1-default.gz                         

> file initrd-2.6.27.37-0.1-default 
initrd-2.6.27.37-0.1-default: ASCII cpio archive (SVR4 with no CRC)
> mkdir initrd                                    
> cd initrd
> cpio -vid < ../initrd-2.6.27.37-0.1-default
.                                                                    
bootsplash                                                           
run_all.sh                                                           
lib64                                                                
lib64/libnss_files.so.2                                              
lib64/libnss_files-2.9.so                                            
..
> ls
bin  boot  bootsplash  config  dev  etc  init  lib  lib64  mkinitrd.config  proc  root  run_all.sh  sbin  sys  tmp  usr  var

Last edited by jschiwal; 11-09-2009 at 09:46 PM. Reason: fixed typo
 
Old 11-09-2009, 09:44 PM   #3
Elv13
Member
 
Registered: Apr 2006
Location: Montreal,Quebec
Distribution: Gentoo
Posts: 825

Rep: Reputation: 129Reputation: 129
Filetype can be determined using file header, but the extension is normally the "safest" way to do it. The fact that your image is not seen as a gunzip file do not affect vmlinuz behavior in any way, so I recommand to just ignore it. After all, you don't have to play in this file by yourself frequently.

EDIT: Removed a comment

Last edited by Elv13; 11-09-2009 at 10:45 PM.
 
Old 11-09-2009, 09:49 PM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
I did suggest using the "file" command to examine it. It will use the files contents (signature) rather than relying on the extension. It will also analyze files containing filesystems such as an image file.
 
Old 11-10-2009, 12:43 AM   #5
james2b
Member
 
Registered: Feb 2007
Location: Washington state, USA
Distribution: Ubuntu Mate 18.04, Mint 19.1
Posts: 360

Original Poster
Rep: Reputation: 45
Smile

Thanks for the information, also is there a way to remove older versions of the vmlinuz kernel, (such as when the package updates installs a new kernel version, and some Linux will keep several older versions) ? It may work with a search with the package manager ?
 
Old 11-11-2009, 01:07 AM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You could use your package manager. You could also use your package manager (e.g. rpm -ql in openSuSE in your list of distros) to find the files installed and remove them. Of course if you compiled your own kernel, you may not have this information in your package manager.

Deleting the vmlinuz-<version> and initrd-<version> files in /boot, and the files in /lib/modules/<version>/ will free up a lot of space. Be sure you remove the entry from /boot/grub/menu.lst. If you use the filelist of a package, don't remove /boot/vmlinuz and /boot/initrd which are shortcuts to the newest kernel. Don't delete the /etc/modprobe.d/module-renames file. It contains module name changes such as e1000-new -> e1000. This file would have been updated by subsequent kernel installs.
 
Old 11-12-2009, 02:39 PM   #7
james2b
Member
 
Registered: Feb 2007
Location: Washington state, USA
Distribution: Ubuntu Mate 18.04, Mint 19.1
Posts: 360

Original Poster
Rep: Reputation: 45
Smile

Each of the major Linux installs I have, do handle the kernel and initrd updates differently, as far as how many previous versions to keep. Some will just keep 1 or 2 older versions, and some like Ubuntu keeps all the older kernels and initial ram disks files. I think Fedora does it best, by just allowing 2 older versions to remain, so 3 total with the new. It would be better if all Linux can be more consistent with this, or have a tool with the package manager, to remove versions as needed. Thanks.
 
  


Reply



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
Makefile Error: Unknown file type ankit4u1 Linux - Newbie 1 10-12-2007 01:47 PM
mkbootdisk : Unknown file type (unallocated) Hitboxx Fedora 2 03-05-2007 07:22 AM
Autopackage broke my GNOME unknown file type icon ! ghaefb Linux - Software 2 08-15-2005 11:00 AM
Gimp - jpg - unknown file type Wynd Linux - Software 1 06-27-2004 11:10 PM
Kernel Update : vmlinuz-2.6.6 : no such file or directory kuol3m4 Slackware 19 05-14-2004 04:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:19 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration