What is the "Loop" partition in ubuntu?

Solution 1:

A loop device is a file containing a virtual file system inside another file system.

There are two common reasons you may be seeing loop

Reason One

You may see loop if you used WUBI.EXE to install Ubuntu within Windows. This creates virtual partitions in a large file within the Windows file system.

Note that WUBI does not work with computers that came pre-installed with Windows 8 or later.

Reason Two

(Thanks to @mikewhatever for pointing is out in the comments above)

The loop device also shows up when you run Ubuntu from a Live CD/USB. A virtual file system stored in the CD/USB/DVD is mounted as loop.

Reference: Wiki on Loop Device

Hope this helps

Solution 2:

Also worth noting (adding "Reason Three" to @user68186's answer) is that parted shows loop as the "partition table" for disks that actually do not have a partition table (whole disk filesystem).

I ran into this accidentally when I wanted to get an ext4 filesystem on a brand new external NVMe M.2 SSD. Plugged it in to an USB port and used Ubuntu Desktop's Disks tool without getting into the details. Then I was surprised that I had no /dev/sda1 but only /dev/sda to mount. Hope this is not related to the occasional I/O errors I get (probably rather a power issue, using it on a Raspberry Pi 4).