LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-09-2010, 01:09 PM   #1
kapshure
LQ Newbie
 
Registered: Mar 2010
Posts: 29

Rep: Reputation: 1
'invalid or corrupt kernel image' when doing HTTP network install - CentOS 5.4


good morning. I've been attempting to setup PXE/HTTP network installs so we can better handle deployments for new systems.

I have a test CentOS 5.4 VM running, and another test VM that I want to deploy 5.4 to.

TFTP, DHCP are all working correctly. Apache 2.2.3 config "seems" OK. When I kick off the VM which I will install to, DHCP discovery and IP allocation works, the TFTP server is found, I am presented with a menu option of OS selection. I choose #1, for my 5.4 but then it immediately tells me:

"invalid or corrupt kernel image"

/var/log/messages doesnt show anything other than the DHCP OFFER/ACK process and that TFTP client doesn't accept options

/var/log/httpd/error_log doesnt show anything either

not sure where else to look for diagnosis.

my Apache config directory: /var/www/html/CentOS

content listing:

[root@CentOS-test CentOS]# ls -la
total 4515700
drwxr-xr-x 4 root root 4096 Jul 9 10:38 .
drwxr-xr-x 3 root root 4096 Jul 8 16:46 ..
-rwxrwxrwx 1 root root 4619468800 Jul 6 15:54 CentOS5.4.iso
-rwxrwxrwx 1 root root 932 Jul 6 17:37 initrd.img
-rwxrwxrwx 1 root root 70 Jul 6 17:37 ks.cfg
drwxr-xr-x 2 root root 4096 Jul 9 10:38 msgs
-rw-r--r-- 1 root root 13100 Jul 9 10:37 pxelinux.0
drwxr-xr-x 2 root root 4096 Jul 9 10:38 pxelinux.cfg
-rw-r--r-- 1 root root 932 Jul 9 10:33 vmlinuz

pxelinux.cfg contains:

0A000000
default
pxeos.xml

my Apache DocumentRoot: /var/www/html/CentOS

directives:

<Directory "/var/www/html/CentOS">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

[edit] forgot to add this line from my pxelinux.cfg/default file:

label 1
kernel 5.4/vmlinuz
append initrd=5.4/initrd.img ramdisk_size=16000 method=http:/10.37.129.3/CentOS ip=dhcp

(I think I have found my problem.. 5.4 was in the TFTPBOOT directory, but now that I'm using HTTP, I changed this to be:
kernel CentOS/vmlinuz and append initrd=CentOS/initrd.img) -- question is, will just changing this work?

I know its probably something simple, but I'm out of ideas.

thoughts? comments? suggestions?

Last edited by kapshure; 07-09-2010 at 02:33 PM.
 
Old 07-10-2010, 11:09 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,292

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
As I understand PXE, it works this way]
1. Bios wakes up and asks for a kernel "anyone out there?"
2. It gets a kernel from the tftp server
3. It boots this
4. Then, having it's own network card, it takes over
5. Asks "Anyone got an OS?" It needs to see the nic for this
6. Your obliging server responds with an OS
etc

Which point are you stuck at?
 
Old 07-12-2010, 08:07 PM   #3
kapshure
LQ Newbie
 
Registered: Mar 2010
Posts: 29

Original Poster
Rep: Reputation: 1
I rolled back to a new fresh test server, this time mounting the iso in /var/www/html/CentOS. I can browse the directory over HTTP from a test browser, had DHCP setup proper again (except I dont know where to point for pxelinux.0 file - especially with an ISO mount, there isn't a pxelinux.0 file?) I got no where this time except PXE-T01: File not Found.

So I went back and copied over the syslinux installer files to /tftpboot, changed dhcpd.conf to say: "filename "/tftpboot/pxelinux.0"

here is my pxelinux.cfg/default file:

##############
default local
timeout 100
prompt 1
display msgs/boot.msg
F1 msgs/boot.msg
F2 msgs/general.msg
F3 msgs/expert.msg
F4 msgs/param.msg
F5 msgs/rescue.msg
F7 msgs/snake.msg

label local
localboot 1

label 0
localboot 1



label 1
kernel /var/www/html/CentOS/images/pxeboot/vmlinuz
append initrd=/var/www/html/CentOS/images/pxeboot/initrd.img ramdisk_size=16000 method=http:/10.37.129.3/CentOS ip=dhcp
#########

I tried just using kernel vmlinuz and append initrd=initrd.img - that didn't work, so above you see me putting the full path to the web root, CentOS/images/pxeboot/vmlinuz & the same for initrd.img -- that didnt work. I'm still getting PXE-T01: File not found.

At this point, I can scrap the mounted ISO, and just extract/copy contents of the iso file to /var/www/html/ and I will most likely be back at the same point I was from the original post

I dont know if frustration is prohibiting me here, but I've tried NFS, FTP, etc.. and I can't get this to work. I'm not getting the linux askmethod/installer prompt either way in any trial I do. Plus, looking at like 1/2 dozen different sites, that all have differing tutorials isn't helping. I've followed the CentOS wiki on PXE, and I've followed the RHEL docs for FTP/HTTP install, and i'm still stuck
 
Old 07-13-2010, 02:53 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,292

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
There's a detailed document on pxe booting on the Slackware install cd, and perhaps others as well.It works.
ftp.heanet.ie:/mirrors/slackware/pub/slackware/slackware-current/usb-and-pxe-installers/README_PXE.TXT
The same directory has a few other pxe related files as well.
 
Old 07-22-2010, 05:57 PM   #5
kapshure
LQ Newbie
 
Registered: Mar 2010
Posts: 29

Original Poster
Rep: Reputation: 1
Moving back steps - now cant find vmlinuz

Quote:
Originally Posted by business_kid View Post
As I understand PXE, it works this way]
1. Bios wakes up and asks for a kernel "anyone out there?"
2. It gets a kernel from the tftp server
3. It boots this
4. Then, having it's own network card, it takes over
5. Asks "Anyone got an OS?" It needs to see the nic for this
6. Your obliging server responds with an OS
etc

Which point are you stuck at?
here is what I've done and then where I'm at:
- mounted iso to /var/www/html/pub
- was able to boot off iso image on test client, specify 'linux askmethod', punch in HTTP info, and do an install

however, we dont want to have to use a boot disc, or iso - we want to grab this from the pxe/http server.
I went back and edited the pxelinux.cfg/default file to include something to this effect:

label 1 CentOS 5 x64
KERNEL /var/www/html/pub/isolinux/vmlinuz
APPEND initrd=/var/www/html/pub/isolinux/initrd.img ramdisk_size=16000 url --url \ http://10.37.129.6/pub/ ip=dhcp
(have also used method=http as well, also removing that absolute path to the DocumentRoot, and just used vmlinuz - to no avail)

but when the client picked up its DHCP IP and loaded the menu, I could never see 'label 1' -- all I could see constantly was label 0 - localboot. I added the necessary label entry to the default file, that didnt work. I went and modified the isolinux.cfg found in /var/www/html/pub/isolinux - but that didnt work. I removed any changes I made to isolinux.cfg

Now, I'm back to booting up the client, and I get this:
TFTP prefix: /linux-install/
trying to load: pxelinux.cfg/01-00-1c-42-ec-2b-fb
trying to load: pxelinux.cfg/0A258114
.......
trying to load: pxelinux.cfg/0
trying to load: pxelinux.cfg/default
boot:


i've copied over initrd.img and vmlinuz both to /tftpboot/linux-install/pxelinux.cfg/ and that has not helped either.

i've also modified /pxelinux.cfg/default to read:

kernel /var/www/html/pub/images/pxeboot/vmlinuz - which doesnt work either

more and more I am frustrated, I was 1/2 way there with the HTTP install taking off with the mounted iso at the client (these are both VM's mind you), but now I'm back to square 1 and even more confused.

Can anyone please help. I've read page after page, including your link for the Slackware, pages on CentOS wiki (i'm doing CentOS install), redhat docs, stuff here at Linuxquestions, etc. but I can't ascertain where my problems are.

dhcpd.conf reads as:


ddns-update-style interim;
ignore client-updates;

allow booting;
allow bootp;

subnet 10.37.0.0 netmask 255.255.0.0 {
range 10.37.129.10 10.37.129.20;
next-server 10.37.129.6;
filename "/linux-install/pxelinux.0";
}



when I tail /var/log/messages, I can see the client get issued an IP, and then it chokes at:

CentOS5 in.tftpd[4480]: tftp: client does not accept options I have seen this before during this project, but didnt think it was inhibiting the install process.

any help and pointers would be MUCH appreciated.

Thanks,

Last edited by kapshure; 07-22-2010 at 06:01 PM.
 
Old 07-23-2010, 02:35 AM   #6
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,292

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Nobody from slackware or red hat gets their document out without it working. For the slackware thing, you don't have to change files. Do it their way - somebody's way. If you have a Centos pxe howto, ignore all others and follow it exactly. I did that with the slackware one and it worked.
 
  


Reply

Tags
apache, centos, httpd, pxe



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
When I boot with PXE Boot into openSuse, error says 'invalid or corrupt kernel image' rfelsburg SUSE / openSUSE 0 05-13-2010 08:51 PM
Cannot boot isolinux, invalid or corrupt kenel image sportivo888 Linux - Newbie 3 01-23-2008 05:10 PM
"corrupt kernel image" when booting from disc 1 Ryupower Fedora 10 02-02-2007 07:23 AM
"corrupt kernel image" , Fedora Core Ryupower Linux - Newbie 1 11-26-2006 09:27 PM
RedHat 7.1 Invalid or corrupt kernel image mxyzptlk Linux - Software 2 10-09-2001 02:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:13 AM.

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