summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-05-18 23:24:19 +0200
committerChristian Poessinger <christian@poessinger.com>2019-06-18 19:20:25 +0200
commit29f6a92ed1df90e4db5aafee548de9685d5c164f (patch)
treedeefe25e1ef9c1f651aa8a2eeae90b3f15095cc6 /data
parent1f9fdad4697ace9ed3373bcf91fb37d6dbb3bac3 (diff)
downloadvyos-build-29f6a92ed1df90e4db5aafee548de9685d5c164f.tar.gz
vyos-build-29f6a92ed1df90e4db5aafee548de9685d5c164f.zip
Packages/kernel: ensure proper initramfs handling
When building the kernel with 'make deb-pkg' insted of 'make-kpkg' - which is the new official way - an initramfs will be deployed. This break's VyOS! Delete all possible initramfs image(s) before building the final VyOS initramfs image. (cherry picked from commit 5f669b4158fbf00cee401f81cb36bf57e3c50c1c)
Diffstat (limited to 'data')
-rwxr-xr-xdata/live-build-config/hooks/live/17-gen_initramfs.chroot4
1 files changed, 4 insertions, 0 deletions
diff --git a/data/live-build-config/hooks/live/17-gen_initramfs.chroot b/data/live-build-config/hooks/live/17-gen_initramfs.chroot
index 0f5e0ece..87b53bd6 100755
--- a/data/live-build-config/hooks/live/17-gen_initramfs.chroot
+++ b/data/live-build-config/hooks/live/17-gen_initramfs.chroot
@@ -5,4 +5,8 @@ echo I: Create initramfs if it does not exist.
# Kernel complains about non available nls_ascii module when booting from USB pendrive
echo "nls_ascii" >> /etc/initramfs-tools/modules
+if [ -e /boot/initrd.img-* ]; then
+ rm -f /boot/initrd.img-*
+fi
+
update-initramfs -c -k `ls /boot | grep vmlinuz- | sed 's/vmlinuz-//g'`