5 # initramfs-tools header
21 # live-initramfs header
23 . /scripts/live-functions
25 log_begin_msg "Possibly disabling update-initramfs (useless on a live CD)..."
27 # live-initramfs script
29 chroot /root dpkg-divert --add --rename --quiet \
30 /usr/sbin/update-initramfs
32 # Running off a USB disk or other writable media.
33 if [ -w /root/cdrom ] && \
34 # rw is guaranteed to be first.
35 grep -q ' /root/cdrom rw[, ]' /proc/self/mountinfo
38 cat > /root/usr/sbin/update-initramfs << 'EOF'
41 update-initramfs.distrib "$@"
42 cp /initrd.img /cdrom/live/initrd.gz
43 cp /vmlinuz /cdrom/live/vmlinuz
49 cat > /root/usr/sbin/update-initramfs << EOF
52 echo "update-initramfs is disabled since running on read-only media"
58 chmod 0755 /root/usr/sbin/update-initramfs