+# Running off a USB disk or other writable media.
+if [ -w /root/cdrom ] && \
+ ! grep -q '^[^ ]* /root/cdrom [^ ]* [^ ]*\<ro\>' /proc/mounts
+then
+
+cat > /root/usr/sbin/update-initramfs << 'EOF'
+#!/bin/sh
+
+update-initramfs.distrib "$@"
+cp /initrd.img /cdrom/live/initrd.gz
+cp /vmlinuz /cdrom/live/vmlinuz