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

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.

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.



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