[baseimage]: move update initramfs to later stage

some platform drivers install blacklist.conf in /etc/modprobe.d.
Those configuration should be proprogated into initramfs to avoid
loading those blacklisted driver.
This commit is contained in:
Guohan Lu 2018-03-05 07:07:40 +00:00
parent 91891af27e
commit 0d2ffd885f

View File

@ -150,7 +150,6 @@ sudo chmod +x $FILESYSTEM_ROOT/etc/initramfs-tools/scripts/init-bottom/mgmt-intf
sudo cp files/initramfs-tools/union-fsck $FILESYSTEM_ROOT/etc/initramfs-tools/hooks/union-fsck
sudo chmod +x $FILESYSTEM_ROOT/etc/initramfs-tools/hooks/union-fsck
pushd $FILESYSTEM_ROOT/usr/share/initramfs-tools/scripts/init-bottom && sudo patch -p1 < $OLDPWD/files/initramfs-tools/udev.patch; popd
sudo chroot $FILESYSTEM_ROOT update-initramfs -u
## Install latest intel ixgbe driver
sudo cp target/debs/ixgbe.ko $FILESYSTEM_ROOT/lib/modules/${LINUX_KERNEL_VERSION}-amd64/kernel/drivers/net/ethernet/intel/ixgbe/ixgbe.ko
@ -369,6 +368,9 @@ if [ "${enable_organization_extensions}" = "y" ]; then
fi
fi
## Update initramfs
sudo chroot $FILESYSTEM_ROOT update-initramfs -u
## Clean up apt
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get autoremove
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get autoclean