May 2017
Beginner
552 pages
28h 47m
English
Suppose we want to create a loopback file, partition it, and finally mount a sub-partition. In this case, we cannot use mount -o loop. We must manually set up the device and mount the partitions in it.
To partition a file of zeros:
# losetup /dev/loop1 loopback.img
# fdisk /dev/loop1
Create partitions in loopback.img and mount the first partition:
# losetup -o 32256 /dev/loop2 loopback.img
Here, /dev/loop2 represents the first partition, ...