I'll start this question by listing all drives available on my system right after the login into my Linux Mint 19.2 Cinnamon:
# fdisk -l
Disk /dev/loop0: 89,1 MiB, 93454336 bytes, 182528 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop1: 89,1 MiB, 93429760 bytes, 182480 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop2: 202,9 MiB, 212713472 bytes, 415456 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/nvme0n1: 477 GiB, 512110190592 bytes, 1000215216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 989573D5-37E7-437A-B680-9410F7234A94
Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 194559 192512 94M EFI System
/dev/nvme0n1p2 194560 1000214527 1000019968 476,9G Linux filesystem
Disk /dev/sda: 232,9 GiB, 250059350016 bytes, 488397168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: B05FAE90-8E4B-4CCC-AC77-D35D4B260C8A
Device Start End Sectors Size Type
/dev/sda1 2048 1026047 1024000 500M EFI System
/dev/sda2 1026048 1288191 262144 128M Microsoft reserved
/dev/sda3 1288192 459608774 458320583 218,6G Microsoft basic data
/dev/sda4 459610112 461398015 1787904 873M Windows recovery environment
/dev/sda5 461398016 485992447 24594432 11,7G Windows recovery environment
/dev/sda6 485992448 488396799 2404352 1,2G Windows recovery environment
Here, I should probably add, I don't even know what a loop device is. I just mount a lot of disks daily, make images of them, work with those and such. I have noticed those loop devices 0, 1, 2 as of this moment, but they might very well be here for ages, maybe I just did not pay attention to them, due to work stress.
Listing them does not reveal when they originated probably as I see today's date:
# ll /dev/loop[012]
brw-rw---- 1 root disk 7, 0 Nov 13 2019 /dev/loop0
brw-rw---- 1 root disk 7, 1 Nov 13 2019 /dev/loop1
brw-rw---- 1 root disk 7, 2 Nov 13 2019 /dev/loop2
Why they're on my system even if I reboot? Isn't that strange?
Here is my /etc/fstab
:
UUID=f1fc7345-be7a-4c6b-9559-fc6e2d445bfa / ext4 errors=remount-ro 0 1
UUID=4966-E925 /boot/efi vfat umask=0077 0 1
none /ramdisk tmpfs size=1G,mode=0777 0 0
UUID=01D480EF7EDA45C0 /mnt/windows ntfs nosuid,nodev,nofail,noexec,rw 0 0
How do I get more information about these 3 loop devices?
I tried fdisk
now:
# fdisk /dev/loop0
Welcome to fdisk (util-linux 2.31.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
The old squashfs signature will be removed by a write command.
Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0xc54bc258.
Command (m for help): v
Remaining 182527 unallocated 512-byte sectors.
Command (m for help): p
Disk /dev/loop0: 89,1 MiB, 93454336 bytes, 182528 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xc54bc258
I've already regenerated my initramfs
image with no change, they're still there after reboot.
I'd rather know more about them before actually trying to delete them.
Questions and answers to comments:
Why are you not as concerned by the various
/dev/tty*
devices as by theloop
devices?
Well, this is a tough question, as I don't know exactly what those tty
devices purpose is. So, I guess ignorance is bliss, sort of speak.
Why do you want to delete the
/dev/loop*
devices specifically?
I said I want to know more about them, to investigate what they contain, well, and as per fdisk
output, they do not, correction, contain any partition table. What's more, these loop
devices are not present on any other Linux I am directly working with.
It seems, it has some relation to Snap daemon.
# losetup -a
/dev/loop1: [66306]:6161256 (/var/lib/snapd/snaps/core_8039.snap)
/dev/loop2: [66306]:6160663 (/var/lib/snapd/snaps/core_7917.snap)
/dev/loop0: [66306]:6160545 (/var/lib/snapd/snaps/vlc_1049.snap)
# losetup -l
NAME SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE DIO LOG-SEC
/dev/loop1 0 0 1 1 /var/lib/snapd/snaps/core_8039.snap 0 512
/dev/loop2 0 0 1 1 /var/lib/snapd/snaps/core_7917.snap 0 512
/dev/loop0 0 0 1 1 /var/lib/snapd/snaps/vlc_1049.snap 0 512
mount -o ro,offset=$(( 512 * 2048 )) memtest86-usb-v8.2.img mnt1/
which I don't remember how it ended up, I copy-pasted it from the history. – Vlastimil Burián Nov 13 '19 at 12:39/dev/loop
devices by default; right now, only one of them is actually used, and only that one shows up infdisk -l
’s output (orlesetup -l
), the rest can be ignored.mount -o
uses/dev/loopX
behind the scenes. – Stephen Kitt Nov 13 '19 at 12:50