initramfs: Only include necessary drivers
*dracut* includes a ton of kernel modules in the initramfs by default. These are totally unnecessary and make the image file huge, which makes it take forever to load via TFTP. We can save a lot of space and time by only including the specific drivers we need to mount the root filesystem.
This commit is contained in:
@@ -22,8 +22,9 @@ chroot "${destdir}" depmod -a "${kver}"
|
|||||||
echo 'Building initramfs image ...' 2>&1
|
echo 'Building initramfs image ...' 2>&1
|
||||||
chroot "${destdir}" dracut \
|
chroot "${destdir}" dracut \
|
||||||
--no-hostonly \
|
--no-hostonly \
|
||||||
--add 'nbd' \
|
--modules 'nbd udev-rules dracut-systemd shutdown' \
|
||||||
--add-drivers 'genet nbd squashfs' \
|
--drivers 'genet nbd squashfs' \
|
||||||
|
--force-drivers 'bcm2835_wdt' \
|
||||||
--force \
|
--force \
|
||||||
/boot/initramfs.img \
|
/boot/initramfs.img \
|
||||||
"${kver}"
|
"${kver}"
|
||||||
|
|||||||
Reference in New Issue
Block a user