. /scripts/live-functions
-log_begin_msg "Adding APT-CDROM source..."
+log_begin_msg "Adding APT-CDROM source"
# live-initramfs script
-chroot /root apt-cdrom -m add
+if [ -d /root/cdrom ]
+then
+ mount -n -o bind /sys /root/sys
+ mount -n -o bind /proc /root/proc
+ mount -n -o bind /dev /root/dev
+
+ chroot /root apt-cdrom -m add
+
+ umount /root/dev
+ umount /root/proc
+ umount /root/sys
+fi
log_end_msg