LinuxQuestions.org
Register a domain and help support LQ
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
 
LinkBack Search this Thread
Old 07-09-2012, 01:17 PM   #1
joshualan
LQ Newbie
 
Registered: Jun 2012
Posts: 7

Rep: Reputation: Disabled
Unable to PXEboot Minimal CentOS via pxelinux


I am trying to pxeboot minimal CentOS. I basically installed the minimal CentOS on sda1 on my machine, used the comand 'dd' to make an initrd.img. It complained that it was too large when I tried to boot it so I used:

gzip < initrd.img > initrd-boot.img

Seems to be working fine though.

Here is my pxelinux.cfg file:
DEFAULT pxeboot
TIMEOUT 20
PROMPT 0
LABEL pxeboot
KERNEL vmlinuzMIN
append initrd=/initrd2.img console=ttyS0 nodiskmount nolvmmount root=/dev/ram0 ramdisk_size=80000000 rootfstype=tmpfs init=/sbin/init

When I try to boot it though, I get an error saying:

Kernel panic - not syncing: No init found. Try passing init= option to kernel.

I checked and my minimal install DOES contain /sbin/init so I'm just wondering why it refuses to work.

Last edited by joshualan; 07-09-2012 at 01:18 PM.
 
Old 07-09-2012, 01:32 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 1,163

Rep: Reputation: 258Reputation: 258Reputation: 258
80GB ramdisk? Hope that's enough.
 
Old 07-09-2012, 01:50 PM   #3
jefro
Guru
 
Registered: Mar 2008
Posts: 10,255

Rep: Reputation: 1256Reputation: 1256Reputation: 1256Reputation: 1256Reputation: 1256Reputation: 1256Reputation: 1256Reputation: 1256Reputation: 1256
It supports the easier to read ramdisk_size=80MB as choice.


Why did you use the /initrd2.img? Put that file in the correct place on your tftp server.

Dunno about the ram0. I forget the difference but you didn't get that far in the boot process.
 
Old 07-09-2012, 02:07 PM   #4
joshualan
LQ Newbie
 
Registered: Jun 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
Yeah, the initrd2.img is already in the tftp server, initrd.img is the uncompressed file so I just named it initr2.img

And that was a typo, I kept getting a read/write error and it only went away when I put an obscenely large number for the ramdisk size.

Last edited by joshualan; 07-09-2012 at 02:13 PM.
 
Old 07-09-2012, 08:38 PM   #5
jefro
Guru
 
Registered: Mar 2008
Posts: 10,255

Rep: Reputation: 1256Reputation: 1256Reputation: 1256Reputation: 1256Reputation: 1256Reputation: 1256Reputation: 1256Reputation: 1256Reputation: 1256
What is the block size of the tftp server?
 
Old 07-09-2012, 09:20 PM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Slackware
Posts: 14,880
Blog Entries: 2

Rep: Reputation: 3806Reputation: 3806Reputation: 3806Reputation: 3806Reputation: 3806Reputation: 3806Reputation: 3806Reputation: 3806Reputation: 3806Reputation: 3806Reputation: 3806
Do you have compiled support for the filesystem of the compressed image into your kernel (not as module)?
Otherwise you have a simple problem: The kernel can't run the init-process, just because it can't access the file-system.
 
Old 07-10-2012, 02:17 PM   #7
joshualan
LQ Newbie
 
Registered: Jun 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
I'm not sure about the block size of my TFTP server, how do I find that out?

TobiSGD, I suspect that's the problem. Would the fix be a make menuconfig and change the ext2, ext3, and ext4 from <m> to <*> file systens on the kernel?

Last edited by joshualan; 07-10-2012 at 02:23 PM.
 
Old 07-10-2012, 02:50 PM   #8
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Slackware
Posts: 14,880
Blog Entries: 2

Rep: Reputation: 3806Reputation: 3806Reputation: 3806Reputation: 3806Reputation: 3806Reputation: 3806Reputation: 3806Reputation: 3806Reputation: 3806Reputation: 3806Reputation: 3806
Yes, that would be the fix if that is really the problem, which I think it. It may be that there are more problems when I take a look at the approach you have chosen, but this should be the first step.
 
1 members found this post helpful.
Old 08-02-2012, 02:09 PM   #9
joshualan
LQ Newbie
 
Registered: Jun 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
Figured It Out

Just in case anyone stumbles on this same problem, initrd needs to be in a CPIO archive! Let's assume in /home/LQ/src you have the root folders like usr, src, var, boot, etc. You'd have to use this command:


cd /home/LQ/src
find . | cpio -o -H newc --verbose | gzip > ../initramfs.gz
 
  


Reply

Tags
centos, minimal, pxe boot, pxeboot


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Centos minimal adam_1784 Linux - Software 3 03-26-2012 07:10 PM
RHGB on centOS minimal (console) ? vzxen Linux - Software 4 05-08-2011 01:33 PM
Minimal centos via kickstart not working abcdefg Red Hat 5 11-01-2008 12:11 PM
CentOS - Minimal Install harry edwards Linux - Server 4 01-22-2008 05:33 AM
Kickstart unable to find pxelinux.cfg/default sp149 Linux - Newbie 2 11-21-2007 03:34 PM


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