LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 04-28-2008, 05:32 PM   #1
newtovanilla
Member
 
Registered: Apr 2008
Posts: 267

Rep: Reputation: 30
Question GRUB error: Invalid or unsupported executable format


Hi, I built a 2.4.36 kernel and edited the menu.lst file to have the name of this new kernel and when I selected it from the menu on reboot I received the error: "Invalid or unsupported executable format".

1) How can I find out what executable format the kernel image file that I built is in? What command do I use and how do I interpret the output?

2) How can I find out what executable formats GRUB supports? What file will tell me this?

There was no error in building the kernel.
 
Old 04-29-2008, 10:26 AM   #2
fancylad
Member
 
Registered: Mar 2008
Distribution: slackware
Posts: 175

Rep: Reputation: 19
Try this:

Quote:
file <name of kernel>
file will read the file header of any file and try to tell you what kind of file it is. If it is executable it will tell you that. If the output is just "data" then it means it can't identify the file type.

Here's the output for the kernel in my Ubuntu laptop:

Quote:
matt-laptop:/proc# file /boot/vmlinuz-2.6.18-5-686
/boot/vmlinuz-2.6.18-5-686: Linux kernel x86 boot executable RO-rootFS, root_dev 0x6803, swap_dev 0x1, Normal VGA
 
Old 04-29-2008, 10:56 AM   #3
johnny_g
LQ Newbie
 
Registered: Apr 2008
Posts: 6

Rep: Reputation: 0
This error also occured to me when grub was trying to boot the wrong partition. I edited the configuration properly and then everything went ok. Don't know if this helps though...
 
Old 04-29-2008, 11:03 AM   #4
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,796

Rep: Reputation: 323Reputation: 323Reputation: 323Reputation: 323
Quote:
Hi, I built a 2.4.36 kernel and edited the menu.lst file to have the name of this new kernel
It takes more than just adding the name of the kernel to the menu.lst to boot the new kernel.

The process of compiling a kernel produces a compressed kernel image (bzImage) which is located somewhere in /usr/src (exact location varies among distros). You need to either copy that image to /boot as vmlinuz-<kernel number> or put a symlink in /boot to the bzImage in /usr/src, then edit /boot/grub/menu.lst to show the new kernel.

You also have to make a new initrd for the new kernel (if your distro requires one) and put it in /boot, with appropriate edit of menu.lst.
 
Old 04-29-2008, 03:14 PM   #5
newtovanilla
Member
 
Registered: Apr 2008
Posts: 267

Original Poster
Rep: Reputation: 30
Question this is the output from "file <name of kernel>

Thank you for the command input on "File".

/boot/vmlinuz-2.4.36: Linux x86 kernel root=0x802-ro vga=normal, bzImage, version 2.4.36

This is the file that is named in the Grub boot parameters in the menu.lst file. How can I find out if the initrd file is correct or not, if that is the problem? Also, how can I find out if the correct partition is being looked at to find the bzImage file, and do I need to tell the boot process that this is a bzImage file or will it know automatically?
 
  


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
Getting error in Hellow World Kernel: Error 13: Invalid or unsupported executable for piyush.kansal Programming 3 08-04-2007 02:26 AM
[SOLVED] Booting Vista via grub: Invalid or unsupported executable format jot Linux - Kernel 3 01-07-2007 05:03 AM
xen installation error: error 13: invalid or unsupported executable format Niceman2005 Linux - Software 0 01-05-2007 02:51 AM
Error 13 : Invalid or unsupported Executed Format. linuxnewbie82 Linux - Newbie 1 08-01-2006 08:19 AM
kernel 2.6.3 compile ends in grub error 13: unsupported executable format(?) browny_amiga Linux - General 4 03-06-2004 03:33 PM


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