Discussion:
build owd Fedora vmlinuz/initrd
Artem Bityutskiy
2016-09-09 12:05:54 UTC
Permalink
Hello,

would anyone please give me some pointers to solve the following task.

I am using PXE mechanism to provision servers with Fedora. Usually I
take the vmlinuz/initramfs from here:

https://www.mirrorservice.org/sites/dl.fedoraproject.org/pub/fedora/linux/releases/24/Server/x86_64/os/images/pxeboot/

and things just work.

However, this time I want my vmlinuz to be the latest upstream kernel, say, v4.7,

The question is - how do I generate ones?

I guess I need to compile the kernel I want, then use dracut to
generate the initramfs. I need to tell dracut to include anaconda there
and a bunch of other sutff. I guess dracut can just take anaconda from
my builder host which runs F24.

May be there is an easier way, or step-by-step instructions somewhere? 

Thanks,
Artem.
Artem Bityutskiy
2016-09-15 12:29:29 UTC
Permalink
Post by Artem Bityutskiy
The question is - how do I generate ones?
Let me reply my own e-mail in case this information is useful for
others.

I've successfully used the 'lorax' tool to complete the task. I used
the CentOS'es own lorax package, which is old, but worked fine for me.

First of all, if you gonna use 'lorax', make sure the kernel you have
to put to the pxeboot vmlinuz/initrd files is packaged (RPM-ed).

In my specific case I simply wanted to generate images with the EPEL
kernel, which are already packaged. I did just what the very first
example in the lorax documentation suggests:

lorax -p CentOS -v 7 -r 7 -s URL1 -s URL2 -s URL3 results

In my case the URLs were:

URL1 - the base CentOS7 repo
URL2 - the updates repo
URL3 - the elrepo-kernel repo - http://elrepo.org/linux/kernel/el7/x86_64/RPMS/


Once the tool finished, the 'results' directory contained all the stuff.

One note, though: the elrepo kernel name is 'kernel-ml' or 'kernel-lt',
so I changed this lorax template file: runtime-install.tmpl right in
'/usr/share/lorax'. You just tell that you want the 'kernel-ml'
package, not 'kernel' package there.

Once lorax finished, the 'results' directory contained everything
needed, including the pxeboot files and the the .treeinfo file.

HTH,
Artem.

Loading...