| Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
07-09-2012, 01:17 PM
|
#1
|
|
LQ Newbie
Registered: Jun 2012
Posts: 7
Rep: 
|
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.
|
|
|
|
07-09-2012, 01:32 PM
|
#2
|
|
Member
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 740
Rep: 
|
80GB ramdisk? Hope that's enough.
|
|
|
|
07-09-2012, 01:50 PM
|
#3
|
|
Guru
Registered: Mar 2008
Posts: 8,713
|
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.
|
|
|
|
07-09-2012, 02:07 PM
|
#4
|
|
LQ Newbie
Registered: Jun 2012
Posts: 7
Original Poster
Rep: 
|
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.
|
|
|
|
07-09-2012, 08:38 PM
|
#5
|
|
Guru
Registered: Mar 2008
Posts: 8,713
|
What is the block size of the tftp server?
|
|
|
|
07-09-2012, 09:20 PM
|
#6
|
|
Moderator
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Slackware, Debian
Posts: 12,522
|
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.
|
|
|
|
07-10-2012, 02:17 PM
|
#7
|
|
LQ Newbie
Registered: Jun 2012
Posts: 7
Original Poster
Rep: 
|
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.
|
|
|
|
07-10-2012, 02:50 PM
|
#8
|
|
Moderator
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Slackware, Debian
Posts: 12,522
|
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.
|
08-02-2012, 02:09 PM
|
#9
|
|
LQ Newbie
Registered: Jun 2012
Posts: 7
Original Poster
Rep: 
|
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
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 08:34 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|