Let me know where to find kernel config to build vmliuz for pxe boot

Hello
I am looking for kernel config information which is supplied as pxeboot/vmlinuz in the official fedora repository.

The background is as follows.
I am trying to build diskless clients system for my intrernal network.
The integration of boot and nfs servers were fine and clients successfully booted up with nfs root filesystem for the time being.
The problem happened after the update. Because the version of vmlinuz and initramfs imgs for pxeboot in the official repository are too old so that the vermagic mismatch makes privente from loading updated kernel modules after the update.

There are 2 options to solve the problem. The one is to downgrade and to exclude from updating kernel pkgs to match the officially supplied vmlinuz or the other is to rebuild vmlinuz and initrd.img to match the updated kernel pkgs.

Currently Iā€™ve done the first one for workaround, but it seems better to catch up the update for the client usage.

I found dracute configuration from official pxeboot/initrd.img but no kernel configuration is compiled in the pxeboot/vmlinuz image. It is quite reasonable to strip out those information from primitve part.
But itā€™ too sad that I could not find any documents or information about the kernel configuration which is in the repositry.

I would like to build with exact same kernel configuration as which fedora officially supplied in the repository.
Please let me know where to look for.

iā€™m not native English speaker so that apologize my poor English.
raio

Hi @raio! Welcome to the community! Please do take a few minutes to go over the introductory posts in #start-here when you have the time. They contain lots of useful information.

I havenā€™t tried netbooting Fedora, but I did with Ubuntu, and it didnā€™t require special initrd.img. As far as I remember, I used standard Ubuntu initrd, just with some changes to include, maybe, nfs kernel module in it.

Then after updating your system and your kernel initrd gets rebuilt ā€“ just as it does on a local installation, ā€“ and thatā€™s the initrd image you should use for booting updated systems.

If my thoughts arenā€™t clear enough ā€“ please say so, weā€™ll discuss this in more details.


Also Fedora Magazine has three-article series on building a boot server. I donā€™t remember if they covered updating kernel/initrt images in the articles, but still it can be useful, check it out if you havenā€™t seen it:

1 Like

Iā€™ve checked a bit, the first article covers creating boot image, it explains initramfs creation and kernel installation (without many details though).

Basically, you could, for example, manually remove kernel from your boot image (i.e. dnf remove ā€˜kernel*ā€™), then install a newer (updated) one ā€“ and initramfs image gets rebuilt with newer kernel. Maybe other way around ā€“ first install newer one, then remove one you donā€™t need anymore ā€“ actually I myself do it in this order.

And part 2 of the article has a section Upgrading the Image, including updating the kernel ā€“ thatā€™s the part you need:

It maybe doesnā€™t answer your exact question:

but it provides you with working alternative.

1 Like

Thanks Nightromantic

I read the articles you mentioned and the ā€œimageā€ that in the article means whole file system for the clients use. In my case the same as the contents of the /var/lib/nfsroot/, and they exclude to keep kernel version from upgrading.

I currentlly build my boot server with using tftp+nfsroot because Iā€™ve already have them for installation server several years.

i would like to shrink initrd.img as small as possible, because of the foot print issue since my tftp server, is installed on the HPā€™s thin client which I got some of them only $7 each from the weekend pedestrian junk stall in akihabara, is very slow. : -p
So, I am using a thin client for boot server! and booted others from it. they will be my tiny cluster system.

As I mentioned in the first post, I found the way to get dracute configuration from initrd.img itself.
lsinitrd /path-to-the-dir/initrd.img
above command gave me enough imformation to build initrd.img

Iā€™ve tried using kernel img pulled from updated pkg but it did not work.
I would like to make sure what is the difference between pxeboot/vmlinuz and nomal kernel.
There must be a kernel config file somewhere in the dev team. because they build vmlinuz for each release.
I just want them putting config file in the same directory as they placed compiled kernel img in the repo or somewhere else.

raio

@raio,

Are you sure thereā€™s a difference? Can you please give a link to pxeboot/vmlinuz file from the repi youā€™re talking about?