Linux Mastering Development

How to increase the size of a loop virtual disk?

I have generated an image file with dd. The image contains two partitions.

I created a loop virtual disk: losetup -P /dev/loop0 $image_file. I mounted the two loop created partitions (loop0p1, loop0p2) to two mounting points.

My problem is the loop disk is too small for the files I want to add. I looked into the options of losetup, without avail.

Is there a way to increase the loop disk?

Leave a Reply

Your email address will not be published. Required fields are marked *