Strange differences in compiled kernels

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
Ghost Dog
Posts: 163
Joined: Fri 27 Jan 2012, 04:29

Strange differences in compiled kernels

#1 Post by Ghost Dog »

I've noticed that while most of the newer 4.x kernels run and work fine when installed, they break when put into live media. I don't know if it's related, but the kernels that work are represented in ROX-filer as a gear, and the ones that don't work show a picture of a text document.

The properties are also different, as seen here:

Image

As you can see, the kernel on the left is of the type "x-executable executable" but the non-working on on the right is "x-ms-dos-executable DOS/Windows executable". The run action for the one on the left is "Execute file", but the run action for the non-working one is "No run action defined".

Both kernels were compiled in the same way, and work fine when installed on hard drive installs. But the one on the right (and others like it) won't boot when incorporated into a live cd.

Can anyone explain?
The Way of the Samurai

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#2 Post by rufwoof »

A while back I was experiencing weird behaviour from some vmlinuz/initrd combinations generated the exact same way. Whilst one would boot fine, another would have long delays, and one that booted quicker once would repeatedly do so, one that booted slower/failed would repeatedly boot slower/fail.

Never figured out the problem but found that the cure was to move from a ext4 to ext3. When copying/creating vmlinuz the target file system type seems to have some bearing.

Long shot, but something like that might be similar to the problems you're seeing.

unicorn316386

#3 Post by unicorn316386 »

The one that says DOS exe starts with MZ if open it in Leafpad. Dos exes starts with MZ so it probably confuses Rox-filer. ;)

User avatar
Ghost Dog
Posts: 163
Joined: Fri 27 Jan 2012, 04:29

#4 Post by Ghost Dog »

@rufwoof Doesn't seem to be that.

@unicorn It must be confusing Puppy's init scripts too, because those kernels don't boot!
The Way of the Samurai

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#5 Post by Iguleder »

This happens because you enabled the UEFI stub (search the kernel configuration for STUB) in the 4.x kernel. This option makes the kernel image a valid UEFI application, so it has the same header as Windows executables (starts with "MZ").

Try this:

Code: Select all

head -c 2 vmlinuz
If one kernel begins with "MZ" and the other doesn't, this is probably the right explanation.
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]

User avatar
Ghost Dog
Posts: 163
Joined: Fri 27 Jan 2012, 04:29

#6 Post by Ghost Dog »

Ok, thanks.
The Way of the Samurai

Post Reply