Run depmod before creating rootfs image
`depmod` needs to be run by `mkrootfs.sh` so that the kernel module dependency information is included in the SquashFS image. Without this information, `modprobe` cannot install kernel modules at runtime.pull/1/head
parent
ad09bd2cdc
commit
09c7277e30
|
@ -17,8 +17,6 @@ mountpoint -q tmp || mount -t tmpfs tmpfs tmp
|
|||
echo 'Copying kernel image to /boot/ ...' >&2
|
||||
cp -a "${destdir}"/lib/modules/"${kver}"/vmlinuz \
|
||||
"${destdir}"/boot/
|
||||
echo 'Running depmod ...' >&2
|
||||
chroot "${destdir}" depmod -a "${kver}"
|
||||
echo 'Building initramfs image ...' 2>&1
|
||||
chroot "${destdir}" dracut \
|
||||
--no-hostonly \
|
||||
|
|
|
@ -42,6 +42,10 @@ dnf --installroot "${destdir}" install -y \
|
|||
--setopt tsflags=noscripts \
|
||||
kernel \
|
||||
--
|
||||
kver=$(rpm --root "${destdir}" -q --qf '%{VERSION}-%{RELEASE}.%{ARCH}' kernel)
|
||||
if [ ! -f "${destdir}"/lib/modules/"${kver}"/modules.dep ]; then
|
||||
chroot "${destdir}" depmod -a "${kver}"
|
||||
fi
|
||||
|
||||
cp -p \
|
||||
"${srcdir}"/cmdline.txt \
|
||||
|
|
Loading…
Reference in New Issue