Your message dated Fri, 07 Feb 2014 22:58:06 -0500 with message-id <[email protected]> and subject line wishlist, losetup should support mounting partitions inside a disk image has caused the Debian Bug report #337465, regarding wishlist, losetup should support mounting partitions inside a disk image to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [email protected] immediately.) -- 337465: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=337465 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Package: mount Version: any Severity: wishlist Tags: patch,upstream It will be really useful to be able to loopback mount partitions that resides inside a disk image file (obtained via dd, qemu images and so on). Patch to the kernel by different sources (also NASA!) were created but I think that a script like the one below will be enough for nearly everyone. I know that my little script will not be included upstream ever, but if our beloved debian users needs it that is it: - cut text below and copy it in /usr/local/bin/losetup_p then chmod +x it - #!/bin/sh # Usage: losetup_p <image_filename> [mount_point [partition_#]] FILE=$1 ; MNT=$2 ; PART=$3 FREELO=$(losetup -f) losetup $FREELO $FILE FDISK_OUT=$(fdisk -l -u "$FREELO" 2>&1) losetup -d $FREELO VDEV=$(echo "$FREELO"p"${PART:=1}") CYL=`echo "$FDISK_OUT" | sed -ne "s_^$VDEV[ *]*\([0-9]*\).*_\1_p"` START=$((CYL*512)) echo "loop mounting $FILE on ${MNT:=/mnt/loop/part} at offset $START" mount "$FILE" "${MNT:=/mnt/loop/part}" -o loop,offset=$START - end cut - Warning: you need to "mkdir -p /mnt/loop/part" if you do not want to pass a mount point to the script above. I hope that this will be useful to some people. -- ESC:wq
--- End Message ---
--- Begin Message --------BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Version: 2.20.1-5.3 I believe this was fixed some time ago with the addition of the offset and sizelimit options, though the use of partx is preferred. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCgAGBQJS9atOAAoJEI5FoCIzSKrwH4kH/2n/bRqVQg6RyekdGFrLamjL 5B3TgtlG5NKAUCb88rv2aNepWpJBoXExZefraSl/3ngnUWKR0tEX5qn7jSZzXydZ 2Cvu98W6Eyb0Otty3UBRRew3Atkj55XZO8yU7cU62rEMB2ibwl57c0FediYC55zU au4Q2vlZ8ZoW5otGoHOO0hHCmmiRsk1w+Me8dGH1YHXbJo7K0srswwbORSnbVd/Z dsGLgxdpsT7f9Rxhf4u7Q8w+rcs4eSMd9OV6Q9rIap5iEGtdcEo+10jQhla1KWHy GA3IkW2jWwfktjP10Du3LvS3JxjRmCLSxJFXcDj+Inh1SAVz5bPRW/OJHxkqglQ= =feMG -----END PGP SIGNATURE-----
--- End Message ---

