[SATLUG] diskless ramdisk booting

Mark Mayfield mayfield_mark at gvtc.com
Thu Jul 21 13:33:07 CDT 2016


On 07/21/2016 11:45 AM, Borries Demeler wrote:
> On Thu, Jul 21, 2016 at 11:29:16AM -0500, Mark Mayfield wrote:
>> Depending on how you want to do it there are some kernel compile
>> options you need to set.
>>
>> NFS capability in the kernel, NFSRoot, dhcp in the kernel and make
>> sure you get your network card drivers in the kernel also.
>>
>> Pretty much all these will not be enabled by default in the kernel
>> config. If you do everything right you don't even need a ramdisk.
>> You can do some of this in the ramdisk but I had better luck just
>> doing it in the kernel. The biggest problem I faced was making sure
>> your network drivers are in the kernel or ramdisk. If you know you
>> will be using one type of nic card it isn't a big problem but if you
>> will use different machines it is more problematic. I've used
>> ramdisk creation options in both fedora (dracut) and debian
>> (mkinitrd I think) that tell the system to put all (or at least
>> nearly all) modules in the ramdisk. Also you have set up your fstab
>> right and if your using a ramdisk make sure the fstab configured for
>> netboot makes it in the ramdisk. Hope the info helps, I haven't
>> messed with it in a while but I worked with net boot systems quite a
>> bit a few years back. At A&M I had a pxe server with a bunch of
>> distro's it, and a custom boot CD for machines outside of the dhcp
>> scope that could still hit the NFS servers.
> Sounds great, thanks for the pointers, we'll look into it.
> I believe we have all the drivers in there, but maybe we missed a critical
> one. It is also possible our initramfs system, or the init script is not correct.
>
> Thanks again, well keep you posted.
> -b.
I never had touch anything in init when I worked with netboot. Out of 
curiosity, what are you using for a bootloader? Ive used syslinux, grub 
and grub2 for pxebooting.

>> On 07/21/2016 10:55 AM, Bruce Dubbs wrote:
>>> Borries Demeler wrote:
>>>> I am hoping someone on this list can explain how diskless booting works.
>>>>
>>>> I have a bunch of high school kids in my lab this summer and we are
>>>> trying to build a diskless linux cluster as a summer project. I have a
>>>> bunch of generic boxes with quad-core processors, on board video and 8
>>>> GB RAM each. We configured one of the boxes with CentOS 6.8 as a head
>>>> node. It has dhcpd, tftpd, nfs working fine now.  We can successfully
>>>> pxe boot various iso images served through the tftp server, the nodes
>>>> get private IP addresses, tftp boot the kernels and ramdisks on the iso
>>>> images, and the nodes can mount nfs shared volumes from the head node.
>>>> All of this works fine.
>>>>
>>>> We now wanted to build our own custom image and wanted to compile a
>>>> minimal kernel and build a minimal ramdisk on which we could nfs mount
>>>> various shares that hold the software and home directories we
>>>> want to have
>>>> accessible on the slave nodes.
>>>>
>>>> But we so far have been unable to build a proper kernel or ramdisk that
>>>> gets past the mounting point where the root ramdisk file system gets
>>>> mounted and cannot figure out where we are going wrong. Any help would
>>>> be appreciated. We tried to follow this guide to the T:
>>>>
>>>> http://eduardo-lago.blogspot.com/2012/06/ram-only-pxe-boot-smallest-diskless.html
>>>>
>>>>
>>>> and searched the internet for all kinds of other documentation
>>>> on the topic.
>>>> But we must be missing something essential, like our init is not getting
>>>> executed or the kernel cannot find the root file system.
>>>>
>>>> Any help for these kids would be greatly appreciated! Can
>>>> someone explain
>>>> how the boot process works exactly step-by-step so we can see where our
>>>> newly built image might be failing? THe boot process always fails at the
>>>> point where the initrd specified ramdisk does not mount root.
>>> Have you made a custom initrd?  See if
>>>
>>> http://www.linuxfromscratch.org/blfs/view/stable/postlfs/initramfs.html
>>>
>>> helps.  You will, of course, need to modify the init.in file.
>>>
>>>   -- Bruce
>>>
>> -- 
>> _______________________________________________
>> SATLUG mailing list
>> SATLUG at satlug.org
>> http://alamo.satlug.org/mailman/listinfo/satlug to manage/unsubscribe
>> Powered by Rackspace (www.rackspace.com)




More information about the SATLUG mailing list