LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-03-2014, 03:28 PM   #1
CamTheSaxMan
Member
 
Registered: Nov 2013
Distribution: Linux Mint 13 Cinnamon Edition 64-bit, Windows 7 Home Premium SP1 64-bit, Arch Linux 32-bit
Posts: 161

Rep: Reputation: 9
Why is vmlinuz shown as a DOS/Windows executable?


I know that vmlinuz is the compressed Linux kernel image, but why is it classified as a DOS/Windows executable when viewed in a file manager?
 
Old 02-03-2014, 03:38 PM   #2
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.2
Posts: 7,811
Blog Entries: 58

Rep: Reputation: Disabled
Never noticed that before. Very strange.
Attached Thumbnails
Click image for larger version

Name:	snapshot4.png
Views:	203
Size:	251.2 KB
ID:	14675  
 
Old 02-03-2014, 07:49 PM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 9,078
Blog Entries: 4

Rep: Reputation: 3180Reputation: 3180Reputation: 3180Reputation: 3180Reputation: 3180Reputation: 3180Reputation: 3180Reputation: 3180Reputation: 3180Reputation: 3180Reputation: 3180
See man magic. There's a Unix/Linux command called file which endeavors to guess what kind of file a particular file is, and this "magic-numbers file" is basically how it works. Sometimes the answers are spot-on; sometimes they are nonsensical. They are always an educated guess.
 
2 members found this post helpful.
Old 02-04-2014, 04:14 AM   #4
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.2
Posts: 7,811
Blog Entries: 58

Rep: Reputation: Disabled
Code:
bash-4.2$ file /boot/vmlinuz-generic-3.10.17
/boot/vmlinuz-generic-3.10.17: x86 boot sector
bash-4.2$
 
Old 07-04-2014, 09:13 AM   #5
p4infulins4n3
LQ Newbie
 
Registered: Jul 2014
Posts: 1

Rep: Reputation: Disabled
I noticed this today also and initially thought that it was the system misidentifying the file type but then I opened it up in nano. I noticed that it has the two byte MZ signature at the beginning of the file that is placed at the beginning of every Windows .exe file. I don't remember seeing this signature at the beginning of boot sectors but it's been years since I've manually opened many boot sectors.
 
Old 07-04-2014, 09:59 AM   #6
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-30
Posts: 5,286

Rep: Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916Reputation: 916
this is even stranger only my current kernel is labeled as dos/windows (the older backup ones are mime-type octet-stream:

Code:
[schneidz@hyper boot]$ file vmlinuz-2.6.4*
vmlinuz-2.6.41.4-1.fc15.x86_64: Linux kernel x86 boot executable bzImage, version 2.6.41.4-1.fc15.x86_64 (mockbuild@x86-02.phx2.fedoraproject.org, RO-rootFS, swap_dev 0x3, Normal VGA
vmlinuz-2.6.41.9-1.fc15.x86_64: Linux kernel x86 boot executable bzImage, version 2.6.41.9-1.fc15.x86_64 (mockbuild@x86-03.phx2.fedoraproject.org, RO-rootFS, swap_dev 0x4, Normal VGA
vmlinuz-2.6.43.8-1.fc15.x86_64: Linux kernel x86 boot executable bzImage, version 2.6.43.8-1.fc15.x86_64 (mockbuild@x86-02.phx2.fedoraproject.org, RO-rootFS, swap_dev 0x4, Normal VGA
i ran hexedit on both: here are the first few bytes from each:
Code:
00000000   EA 05 00 C0  07 8C C8 8E  D8 8E C0 8E  D0 31 E4 FB  FC BE 2D 00  AC 20 C0 74  09 B4 0E BB  .............1....-.. .t....
0000001C   07 00 CD 10  EB F2 31 C0  CD 16 CD 19  EA F0 FF 00  F0 44 69 72  65 63 74 20  62 6F 6F 74  ......1..........Direct boot
00000038   69 6E 67 20  66 72 6F 6D  20 66 6C 6F  70 70 79 20  69 73 20 6E  6F 20 6C 6F  6E 67 65 72  ing from floppy is no longer
00000054   20 73 75 70  70 6F 72 74  65 64 2E 0D  0A 50 6C 65  61 73 65 20  75 73 65 20  61 20 62 6F   supported...Please use a bo
00000070   6F 74 20 6C  6F 61 64 65  72 20 70 72  6F 67 72 61  6D 20 69 6E  73 74 65 61  64 2E 0D 0A  ot loader program instead...
0000008C   0A 52 65 6D  6F 76 65 20  64 69 73 6B  20 61 6E 64  20 70 72 65  73 73 20 61  6E 79 20 6B  .Remove disk and press any k
000000A8   65 79 20 74  6F 20 72 65  62 6F 6F 74  20 2E 20 2E  20 2E 0D 0A  00 00 00 00  00 00 00 00  ey to reboot . . ...........
000000C4   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ............................
000000E0   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ............................
000000FC   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ............................
00000118   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ............................
00000134   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ............................
00000150   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ............................
0000016C   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ............................
00000188   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ............................
000001A4   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ............................
000001C0   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ............................
000001DC   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 21 01 00  91 3C 04 00  .....................!...<..
000001F8   00 00 FF FF  00 00 55 AA  EB 62 48 64  72 53 0A 02  00 00 00 00  00 10 24 36  00 01 00 80  ......U..bHdrS........$6....
00000214   00 00 10 00  00 00 00 00  00 00 00 00  00 00 00 00  D0 54 00 00  00 00 00 00  FF FF FF 7F  .................T..........
00000230   00 00 00 01  01 15 00 00  FF 07 00 00  00 00 00 00  00 00 00 00  00 00 00 00  69 02 00 00  ........................i...
0000024C   46 7C 43 00  00 00 00 00  00 00 00 00  00 00 00 01  00 00 00 00  00 30 08 01  8C D8 8E C0  F|C..................0......
00000268   FC 8C D2 39  C2 89 E2 74  16 BA D0 54  F6 06 11 02  80 74 04 8B  16 24 02 81  C2 00 02 73  ...9...t...T.....t...$.....s
00000284   02 31 D2 83  E2 FC 75 03  BA FC FF 8E  D0 66 0F B7  E2 FB 1E 68  9B 02 CB 66  81 3E 08 42  .1....u......f.....h...f.>.B
000002A0   55 AA 5A 5A  75 17 BF 10  42 B9 D3 54  66 31 C0 29  F9 C1 E9 02  F3 66 AB 66  E8 D5 2F 00  U.ZZu...B..Tf1.).....f.f../.
000002BC   00 66 B8 7F  03 00 00 66  E8 90 00 00  00 F4 E9 FC  FF 66 56 66  53 66 83 EC  34 66 89 C6  .f.....f.........fVfSf..4f..
---  vmlinuz-2.6.41.9-1.fc15.x86_64	  --0x0/0x440D10--------------------------------------------------------------------------
Code:
00000000   4D 5A EA 07  00 C0 07 8C  C8 8E D8 8E  C0 8E D0 31  E4 FB FC BE  40 00 AC 20  C0 74 09 B4  MZ.............1....@.. .t..
0000001C   0E BB 07 00  CD 10 EB F2  31 C0 CD 16  CD 19 EA F0  FF 00 F0 00  00 00 00 00  00 00 00 00  ........1...................
00000038   00 00 00 00  D0 00 00 00  44 69 72 65  63 74 20 62  6F 6F 74 69  6E 67 20 66  72 6F 6D 20  ........Direct booting from
00000054   66 6C 6F 70  70 79 20 69  73 20 6E 6F  20 6C 6F 6E  67 65 72 20  73 75 70 70  6F 72 74 65  floppy is no longer supporte
00000070   64 2E 0D 0A  50 6C 65 61  73 65 20 75  73 65 20 61  20 62 6F 6F  74 20 6C 6F  61 64 65 72  d...Please use a boot loader
0000008C   20 70 72 6F  67 72 61 6D  20 69 6E 73  74 65 61 64  2E 0D 0A 0A  52 65 6D 6F  76 65 20 64   program instead....Remove d
000000A8   69 73 6B 20  61 6E 64 20  70 72 65 73  73 20 61 6E  79 20 6B 65  79 20 74 6F  20 72 65 62  isk and press any key to reb
000000C4   6F 6F 74 20  2E 20 2E 20  2E 0D 0A 00  50 45 00 00  64 86 02 00  00 00 00 00  00 00 00 00  oot . . ....PE..d...........
000000E0   01 00 00 00  A0 00 06 02  0B 02 02 14  20 87 48 00  00 00 00 00  00 00 00 00  10 46 00 00  ............ .H..........F..
000000FC   00 00 00 00  00 00 00 00  00 00 00 00  00 10 00 00  00 02 00 00  00 00 00 00  00 00 00 00  ............................
00000118   00 00 00 00  00 00 00 00  20 87 48 00  00 02 00 00  00 00 00 00  0A 00 00 00  00 00 00 00  ........ .H.................
00000134   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ............................
00000150   00 00 00 00  01 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ............................
0000016C   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ............................
00000188   2E 74 65 78  74 00 00 00  20 87 48 00  00 00 00 00  20 87 48 00  00 00 00 00  00 00 00 00  .text... .H..... .H.........
000001A4   00 00 00 00  00 00 00 00  20 00 50 60  2E 72 65 6C  6F 63 00 00  0A 00 00 00  00 00 00 00  ........ .P`.reloc..........
000001C0   0A 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  40 00 10 42  00 00 00 00  ....................@..B....
000001DC   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 21 01 00  32 84 04 00  .....................!..2...
000001F8   00 00 FF FF  00 00 55 AA  EB 62 48 64  72 53 0A 02  00 00 00 00  00 10 94 36  00 01 00 80  ......U..bHdrS.........6....
00000214   00 00 10 00  00 00 00 00  00 00 00 00  00 00 00 00  90 55 00 00  00 00 00 00  FF FF FF 7F  .................U..........
00000230   00 00 00 01  01 15 00 00  FF 07 00 00  00 00 00 00  00 00 00 00  00 00 00 00  B3 02 00 00  ............................
0000024C   2A D6 47 00  00 00 00 00  00 00 00 00  00 00 00 01  00 00 00 00  00 C0 3B 01  8C D8 8E C0  *.G...................;.....
00000268   FC 8C D2 39  C2 89 E2 74  16 BA 90 55  F6 06 11 02  80 74 04 8B  16 24 02 81  C2 00 02 73  ...9...t...U.....t...$.....s
00000284   02 31 D2 83  E2 FC 75 03  BA FC FF 8E  D0 66 0F B7  E2 FB 1E 68  9B 02 CB 66  81 3E CC 42  .1....u......f.....h...f.>.B
000002A0   55 AA 5A 5A  75 17 BF D0  42 B9 93 55  66 31 C0 29  F9 C1 E9 02  F3 66 AB 66  E8 45 30 00  U.ZZu...B..Uf1.).....f.f.E0.
000002BC   00 66 B8 7F  03 00 00 66  E8 90 00 00  00 F4 E9 FC  FF 66 56 66  53 66 83 EC  34 66 89 C6  .f.....f.........fVfSf..4f..
---  vmlinuz-2.6.43.8-1.fc15.x86_64	  --0x0/0x488720--------------------------------------------------------------------------
for comparisons sake:
Code:
[schneidz@hyper ~]$ file beyond-good-and-evil.exe 
beyond-good-and-evil.exe: PE32 executable (GUI) Intel 80386, for MS Windows

00000000   4D 5A 90 00  03 00 00 00  04 00 00 00  FF FF 00 00  B8 00 00 00  00 00 00 00  40 00 00 00  MZ......................@...
0000001C   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ............................
00000038   00 00 00 00  20 01 00 00  0E 1F BA 0E  00 B4 09 CD  21 B8 01 4C  CD 21 54 68  69 73 20 70  .... ...........!..L.!This p
00000054   72 6F 67 72  61 6D 20 63  61 6E 6E 6F  74 20 62 65  20 72 75 6E  20 69 6E 20  44 4F 53 20  rogram cannot be run in DOS
00000070   6D 6F 64 65  2E 0D 0D 0A  24 00 00 00  00 00 00 00  6B F4 F6 9D  2F 95 98 CE  2F 95 98 CE  mode....$.......k.../.../...
0000008C   2F 95 98 CE  E5 B6 BF CE  2E 95 98 CE  D5 B1 85 CE  26 95 98 CE  D5 B1 D8 CE  19 95 98 CE  /...............&...........
000000A8   D5 B1 81 CE  2D 95 98 CE  D5 B1 84 CE  88 95 98 CE  70 B7 93 CE  2E 95 98 CE  F5 B6 84 CE  ....-...........p...........
000000C4   2A 95 98 CE  3C 9D C7 CE  23 95 98 CE  D3 B5 8A CE  29 95 98 CE  F5 B6 85 CE  AF 95 98 CE  *...<...#.......)...........
000000E0   D5 B6 81 CE  3E 95 98 CE  2F 95 99 CE  94 95 98 CE  D5 B1 B3 CE  78 94 98 CE  D5 B1 DD CE  ....>.../...........x.......
000000FC   2E 95 98 CE  D5 B1 A5 CE  2E 95 98 CE  52 69 63 68  2F 95 98 CE  00 00 00 00  00 00 00 00  ............Rich/...........
00000118   00 00 00 00  00 00 00 00  50 45 00 00  4C 01 04 00  BC 73 1A 40  00 00 00 00  00 00 00 00  ........PE..L....s.@........
00000134   E0 00 0F 01  0B 01 07 00  00 60 73 00  00 80 21 00  00 00 00 00  77 31 6E 00  00 10 00 00  .........`s...!.....w1n.....
00000150   00 70 73 00  00 00 40 00  00 10 00 00  00 10 00 00  04 00 00 00  00 00 00 00  04 00 00 00  .ps...@.....................
0000016C   00 00 00 00  00 F0 94 00  00 10 00 00  00 00 00 00  02 00 00 00  00 00 10 00  00 10 00 00  ............................
00000188   00 00 10 00  00 10 00 00  00 00 00 00  10 00 00 00  00 00 00 00  00 00 00 00  B8 09 75 00  ..........................u.
000001A4   C8 00 00 00  00 B0 94 00  A8 3C 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  .........<..................
000001C0   00 00 00 00  00 00 00 00  C0 72 73 00  1C 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  .........rs.................
000001DC   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ............................
000001F8   00 70 73 00  B8 02 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  .ps.........................
00000214   00 00 00 00  2E 74 65 78  74 00 00 00  9F 5C 73 00  00 10 00 00  00 60 73 00  00 10 00 00  .....text....\s......`s.....
00000230   00 00 00 00  00 00 00 00  00 00 00 00  20 00 00 60  2E 72 64 61  74 61 00 00  2E A9 01 00  ............ ..`.rdata......
0000024C   00 70 73 00  00 B0 01 00  00 70 73 00  00 00 00 00  00 00 00 00  00 00 00 00  40 00 00 40  .ps......ps.............@..@
00000268   2E 64 61 74  61 00 00 00  DA 8F 1F 00  00 20 75 00  00 50 01 00  00 20 75 00  00 00 00 00  .data........ u..P... u.....
00000284   00 00 00 00  00 00 00 00  40 00 00 C0  2E 72 73 72  63 00 00 00  A8 3C 00 00  00 B0 94 00  ........@....rsrc....<......
000002A0   00 40 00 00  00 70 76 00  00 00 00 00  00 00 00 00  00 00 00 00  40 00 00 40  00 00 00 00  .@...pv.............@..@....
000002BC   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ............................
---  beyond-good-and-evil.exe       --0x0/0x76B000--------------------------------------------------------------------------------
Attached Thumbnails
Click image for larger version

Name:	kernels.jpg
Views:	54
Size:	170.3 KB
ID:	15838  

Last edited by schneidz; 07-04-2014 at 10:16 AM.
 
Old 07-04-2014, 10:52 AM   #7
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Xubuntu
Posts: 5,574

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Looking at my file manager, I see that my CentOS vmlinuz is just called a program, but the Linux Lite one is called a DOS program. And in Lite's /boot, config is called a subtitles file and the modules are identified as Amiga audio files!
 
  


Reply

Tags
kernel, vmlinux


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
executing "DOS/Windows executable" files from "/media" Ruarscampbell Linux - Newbie 10 07-05-2011 05:48 PM
How to run DOS/Windows executable? asharsidd Linux - Newbie 4 10-31-2007 12:14 AM
While booting no option is shown for Linux! Only windows xp is shown!! mon avis Linux - General 7 08-06-2006 04:14 PM
Executing Perl under Dos /Creating an executable for DOS alix123 Programming 1 02-15-2006 04:07 AM
How to compile a executable dos file by g++? Xiangbuilder Programming 7 09-23-2003 08:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:58 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