Tuesday, September 26, 2017

loopback device

  • The first important data are the units, which are stated to be 512 bytes per sector. We take note of this value as the factor for use in the next operation.
Let's say we want to access the 7th partition, which is 10860003 sectors into the disk, according to the fdisk output. We know that each sector is 512 bytes, so:
# mount -o loop,offset=$((10860003 * 512)) disk.img /mnt
http://madduck.net/blog/2006.10.20:loop-mounting-partitions-from-a-disk-image/

  • loop device is a pseudo ("fake") device (actually just a file) that acts as a block-based device. You want to mount a file (disk1.iso) that will act as entire filesystem, so you use loop.
https://unix.stackexchange.com/questions/4535/what-is-a-loop-device-when-mounting


  • The loopback file can contain an ISO image, a disk image, a file system, or a logical volume image. For example, by attaching a CD-ROM ISO image to a loopback device and mounting it, you can access the image the same way that you can access the CD-ROM device.
A new device can also be created with the mkdev command, changed with the chdev command, and removed with the rmdev command
Use the loopmount command to create a loopback device, to bind a specified file to the loopback device, and to mount the loopback device. Use the loopumount command to unmount a previously mounted image file on a loopback device, and to remove the device.
https://www.ibm.com/support/knowledgecenter/en/ssw_aix_61/com.ibm.aix.osdevice/loopback_main.htm

No comments:

Post a Comment