Initramfs Scripts
| Newsgroups | gmane.linux.lfs.beyond.devel |
|---|---|
| Message-ID | <CAPO7B=bwQxi=338Y_oy1P7q3faybxrahqU_oCTmobh7Q+MMKtw@mail.gmail.com> |
Currently the initramfs scripts in BLFS are entirely broken, meaning even the limited subset of features we say to use an initramfs for (drive encryption, network boot, and LVM) don't function. Here is a list of the issues 1. /etc/group missing -- The default 50-default-udev rule requires the base groups from LFS in order to load properly 2. Missing libkmod.so files, udev (at least on systemd) can't load modules without a library link to kmod 3. Missing cgroup mount -- Control groups are almost required nowadays to load modules properly, we need to add a control group mount in /sys/fs/cgroup to fix this 4. udevadm trigger command. I don't know when this changed but udevadm trigger doesn't load modules anymore, you need to add the --action=add flag for it to actually load the modules Other fixes I did a long time ago 5. This is an issue I had fixed a few years ago in my homebrewed version of the initramfs scripts -- The initramfs scripts currently pick a subset of modules on the system. In this version, it dynamically finds the modules currently loaded and adds them to the initramfs 6. Firmware -- Loading firmware in the initramfs (required for some RAID cards and network cards) was not supported with the old scripts. These one's copy the firmware based on the modules that are currently loaded. Other nice to haves in this version 7. Forceful early module load -- I added a /etc/early-modules-load.conf file cat > /etc/early-modules-load.conf << EOF # This file is for loading modules in the early boot stages in the initramfs EARLY_LOAD_MODULES="" EOF To allow for loading modules that aren't required for the system (e.g vfio or kvmgt for gvt-g/iommu) 8. Modprobe.d support -- to support the last point, config files in /etc/modprobe.d are obeyed. If someone could test this on sysv and let me know how it goes I can push this to the book and file an errata. See attached, you can diff the current one from https://www.linuxfromscratch.org/blfs/view/stable-systemd/postlfs/initramfs.html and this one to see the changes. -- Thanks, Rahul -- http://lists.linuxfromscratch.org/sympa/info/blfs-dev Unsubscribe: See the above information page
mkinitramfs
(application/octet-stream, 8.2 KB) - not displayed
init.in
(application/octet-stream, 3.4 KB) - not displayed