[Pkg-ltsp-devel] Bug#780591: ltsp-client-builder fails when installing Debian Edu combined server in virtualbox environment

Vagrant Cascadian vagrant at debian.org
Mon Mar 30 00:34:40 UTC 2015


Control: tag -1 patch

On 2015-03-24, Wolfgang Schweer wrote:
> On Mon, Mar 23, 2015 at 12:02:05PM -0700, Vagrant Cascadian wrote:
>> >> On Tue, Mar 17, 2015 at 10:00:08PM +0100, Wolfgang Schweer wrote:
> Confirmed after having started an USB stick installation on real (and 
> very old) hardware; something like /dev/sdXY is mounted on /cdrom inside 
> d-i environment.
>
> Inspired by this observation I tried this patch in the virtualbox 
> environment (booting from 'cd') and as well on bare metal w/ USB stick:

Here's an alternate patch that worked for me with both CD and USB
installs, and has a fallback to the old behavior if none of the mounts
contain .disk/info. Please try it and let me know if it solves your
issue:

diff --git a/ltsp-client-builder.postinst b/ltsp-client-builder.postinst
index 4b9c057..6b9dd59 100644
--- a/ltsp-client-builder.postinst
+++ b/ltsp-client-builder.postinst
@@ -64,8 +64,20 @@ done
 db_progress STEP 1
 
 if [ "$USE_CDROM" != "false" ] && [ ! -f /target/media/cdrom/.disk/info ]; then
-    chroot /target mount /media/cdrom
-    log "mounting /media/cdrom"
+    # Read mountpoints of cdrom devices from /proc/mounts, and mount
+    # at /target/media/cdrom/
+    while [ ! -f /target/media/cdrom/.disk/info ] && read device mountpoint otherstuff ; do
+        case "$mountpoint" in
+            *cdrom*) log "mounting $device on /target/media/cdrom"
+                 mount "$device" /target/media/cdrom
+                 ;;
+        esac
+    done < /proc/mounts
+    if [ ! -f /target/media/cdrom/.disk/info ]; then
+	# Last-ditch failsafe...
+	log "Mounting /media/cdrom in the chroot."
+	in-target mount /media/cdrom
+    fi
 fi
 
 # workaround for: http://bugs.debian.org/390647


As an added bonus, I think it will also fix:

  https://bugs.debian.org/540990


live well,
  vagrant
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-ltsp-devel/attachments/20150329/d6fae4ec/attachment-0001.sig>


More information about the Pkg-ltsp-devel mailing list