DT, I was thinking while I was watching this video. ( Which is very good. Perfect for my level. ) That you spoke about other viewers in a previous video had told you that you would be great doing voice work. I agree. You should seek out an agent involved with radio and television. One of my employees when I was a technical director at a large regional childrens theater, worked as voice over for local TV and radio as well as working as a scenic painter. She made more with the voice over work. Its out there, even in Louisiana. This was twnety years ago in Birmingham AL. Im sure you would get some offers. Thanks for all of the videos you make . You have taught me alot. Hopefully this finds you well and you can profit from it.
The loop-devices is actually one of the reasons I switched away from Ubuntu. Every time I wanted to do something to backup or anything with my hard drives, list or whatever, these loop-devices always spammed my workflow. And Ubuntu going harder and more on Snaps, this would become more and more of a problem for me.
Exactly this. Annoyance. When I want to manage storage, I don’t want to be bothered with management of packages. #apt purge snapd is the first I do on any new Ubuntu now.
@@paulg3336 That's just one application. There are so many other applications I use, that are spammed. Either there is no option to turn it off, or I have to find the way for every program I use how to do that. And don't forget it for that program as well. lsblk is not the only program in the world. Since I don't have loop-devices from Snaps anymore, it is so much better for me.
Derek, I think you missed the core reason why loop devices are useful. There is almost no benefit of using loop devices instead of just mounting the filesystem from the image directly if the file is a partition image and contains a valid filesystem. After all, block devices are also files in Unix and it works the same way for ordinary files as well. But the full disk images are trickier. On Linux, udev automatically creates device files for the individual partitions (sda1, sda2, sdb1, nvme0n1p1, mmcblk0p1, etc.), but there is no equivalent functionality for disk images by default, so you can't mount partitions when they are inside a disk image. One way to get around this is to create a loop device with the offset of that specific partition you want to mount using with _-o_ option and then mounting the loop device - just like as you mount a partition.
This is incredible. So basically I can make a file and mount it as a virtual drive, use it to store data and then copy it on a new system? Copying just one file takes much less time, and I could use this method for my /home directory. This way I can take it anywhere. I could put in on a flash drive and copy to a new system and mout it there
I immediately stopped watching and went on to try the commands, all in /tmp because I'm scared. I'm so glad you accidentally went over them! I put stuff in my image file and mounted and unmount it over and over
I must be missing something but I just don't see the architectural need for Snap to use loop devices. Segregation can be achieved without it which seems more logical, but maybe that's just me.
You can install so many programms that never need loop devices and then theres snap that uses them for stuff like a calculator. I think less people would complain about that if it was actually needed and not just spam when you run lsblk.
Why do snaps need the loop devices anyway? Can't they just mount the file directly? SInce everything is a file on Linux, what's the point of guiding the file through /dev/loop?
I don't know why Snaps need them; but, generally speaking, if a file contains entire disk image, you can't mount its partitions directly. You can get around this by creating and mounting a loop device instead which maps to the disk image with a specific offset for that partition. Offset can be specified with _-o_ option of _losetup_ command.
Old kernel versions were limited to hundreds of loop devices, but that's been well over a million for like a decade now. So in practice this should never be a problem, but that doesn't answer your question from a theoretical POV. I suspect that you are correct and the installation will fail with some "device unavailable" error.
Very nice video about disk images on linux. I do wonder they they are not all just installed on the main drives instead of just run on their own individually mounted disk image. This whole concept of snaps being mounted disk images where the application within is run seems rather pointless.
DT mentioned in the video, but I guess it's not something very obvious: dependencies. You can upgrade a specific app and not have to worry that some library that it uses will also be upgraded and make another program not work anymore, because that program only works with the old version of the library. Also, I think it's easier to the program to only see its own stuff like that and not be able to touch the rest of the system.
@@Winnetou17 yes they did, but they had good reason to. Drivers ultimately ended up being too difficult to keep up with. They still hold a strong preference to use open source drivers as much as possible, using non free drivers only when it’s too inconvenient to work around certain difficulties, which is not a very common occurrence, plus there is the fact that some proprietary drivers can perform far better then the open source equivalent, long story short, it’s going to be a case by case implementation.
"Pollute the output in lsblk." Lmao. People will complain about anything related to snaps. For people willing to learn, there are other methods to hide the "loop spam" when using lsblk. You can use lsblk -f zfs/ext4/xfs etc to list a specific filesystem. You could also simply use lsblk / to list your root directory.
Yeah, if you don't know how to use lsblk, you're not in much of a position to complain about its output being "polluted". There are plenty of legitimate grievances about snap, this really isn't one.
But remember, the whining and self-entitled millennials don't want to use the command line - with them it's all about "me me me" and having it their way because their parents didn't say the word "no" enough to them when they were growing up. And now you're expecting them to use *COMMAND LINE SWITCHES*?
Linux is fun and all but honestly its so frustrating trying to remember specific or "quirky" commands/parameters for one scenario. Like "lsblk -e 7" who comes up with this stuff
they also polute gparted, iam not sure where root is when i see like 12 devices on single partition. i would happily use snaps on server, just.. get rid of this loop devices plz
No, LOL. It's a device file device mapper creates in Linux. macOS and other *nix systems also have them. DMG (a.k.a. Apple Disk Image) is a disk image format macOS uses, similar to ISO, VMDK, and QCOW2.
Good reason to drop Ubuntu and switch to arch or at least Debian, or ventoy and combine the loops. Loop de doop hoolahoop got too many loops from my live oses. Hula hoop loop de doop hulahoop through the loop.
If by good reason you mean "because it pollutes lsblk", this alone is one of the dumbest reasons to drop Ubuntu. Or any other distro for that matter. That's like saying that you'll never buy a Bugatti Veyron because, say, you don't like the silver color (theoretically, I don't know what color(s) it has). Like really, I can't think of anything that would be smaller/pettier than this, to complain about and above else, to ditch an entire distro. And I say that as someone who doesn't like Ubuntu in its current state, and I'm not a fan of snaps either.
Appreciate your passion explaining concepts to the community DT, you’re so nice 👍🏼!
Thanks! :D
DT, I was thinking while I was watching this video. ( Which is very good. Perfect for my level. ) That you spoke about other viewers in a previous video had told you that you would be great doing voice work. I agree. You should seek out an agent involved with radio and television. One of my employees when I was a technical director at a large regional childrens theater, worked as voice over for local TV and radio as well as working as a scenic painter. She made more with the voice over work. Its out there, even in Louisiana. This was twnety years ago in Birmingham AL. Im sure you would get some offers. Thanks for all of the videos you make . You have taught me alot. Hopefully this finds you well and you can profit from it.
Should do an video on how Linux boots from power button to graphical application
The loop-devices is actually one of the reasons I switched away from Ubuntu. Every time I wanted to do something to backup or anything with my hard drives, list or whatever, these loop-devices always spammed my workflow. And Ubuntu going harder and more on Snaps, this would become more and more of a problem for me.
Exactly this. Annoyance. When I want to manage storage, I don’t want to be bothered with management of packages. #apt purge snapd is the first I do on any new Ubuntu now.
Meh lsblk - e 7
@@paulg3336 That's just one application. There are so many other applications I use, that are spammed. Either there is no option to turn it off, or I have to find the way for every program I use how to do that. And don't forget it for that program as well. lsblk is not the only program in the world.
Since I don't have loop-devices from Snaps anymore, it is so much better for me.
Old man yells at cloud.
@@heroclix0rz That has nothing to do with the cloud. Snaps are not only used by cloud servers. I am on a local machine.
Derek, I think you missed the core reason why loop devices are useful.
There is almost no benefit of using loop devices instead of just mounting the filesystem from the image directly if the file is a partition image and contains a valid filesystem. After all, block devices are also files in Unix and it works the same way for ordinary files as well.
But the full disk images are trickier. On Linux, udev automatically creates device files for the individual partitions (sda1, sda2, sdb1, nvme0n1p1, mmcblk0p1, etc.), but there is no equivalent functionality for disk images by default, so you can't mount partitions when they are inside a disk image. One way to get around this is to create a loop device with the offset of that specific partition you want to mount using with _-o_ option and then mounting the loop device - just like as you mount a partition.
Thx man
Thanks for the explanation, I always wondered what they were doing 😀
I would've thought that it would be permanent, so it's good that you "diverged" and went over that as well
This is incredible. So basically I can make a file and mount it as a virtual drive, use it to store data and then copy it on a new system? Copying just one file takes much less time, and I could use this method for my /home directory. This way I can take it anywhere. I could put in on a flash drive and copy to a new system and mout it there
Thanks for doing this, it was very educational!
I immediately stopped watching and went on to try the commands, all in /tmp because I'm scared. I'm so glad you accidentally went over them! I put stuff in my image file and mounted and unmount it over and over
I must be missing something but I just don't see the architectural need for Snap to use loop devices. Segregation can be achieved without it which seems more logical, but maybe that's just me.
Flatpak is also sandboxed and doesn't uses loop devices. How? Why?
You can install so many programms that never need loop devices and then theres snap that uses them for stuff like a calculator. I think less people would complain about that if it was actually needed and not just spam when you run lsblk.
They do it to keep their "property" separate from other software. And out of reach from the majority of users where their files co-mingle with theirs.
Have a Happy Christmas and a Merry New Year!
🎅💫
Hey DT enjoy your content please don't quit your day job!
I see that there are no snaps defined in fstab. Does that mean that snap system has separate tools to auto mount your snaps?
Yea, Snaps automatically create their own mount points so you don't have to fool with them.
I hope u have a video on interactive shell setup, auto completion.. i need that
i don't have any snaps because flatpaks do what i want them to also not a fan of snaps but if you want to use them that is fine
This video left me more confused about this topic than I was before.
What is/are the confusion(s) ? Anything we can help to clear ?
Why do snaps need the loop devices anyway? Can't they just mount the file directly? SInce everything is a file on Linux, what's the point of guiding the file through /dev/loop?
I don't know why Snaps need them; but, generally speaking, if a file contains entire disk image, you can't mount its partitions directly. You can get around this by creating and mounting a loop device instead which maps to the disk image with a specific offset for that partition. Offset can be specified with _-o_ option of _losetup_ command.
Hey DT, can you tell me your system dark gtk theme name which you use in your browsers, pcmanfm etc.. please 🥺.
can you do similar videos on stuff like sockets, ports, processes, etc.
What if a loop devices limit achieved then new snap installation will fail?
Old kernel versions were limited to hundreds of loop devices, but that's been well over a million for like a decade now. So in practice this should never be a problem, but that doesn't answer your question from a theoretical POV. I suspect that you are correct and the installation will fail with some "device unavailable" error.
Very nice video about disk images on linux.
I do wonder they they are not all just installed on the main drives instead of just run on their own individually mounted disk image. This whole concept of snaps being mounted disk images where the application within is run seems rather pointless.
DT mentioned in the video, but I guess it's not something very obvious: dependencies. You can upgrade a specific app and not have to worry that some library that it uses will also be upgraded and make another program not work anymore, because that program only works with the old version of the library.
Also, I think it's easier to the program to only see its own stuff like that and not be able to touch the rest of the system.
If I understood, it's containerized, so somehow the program can't reach files outside the loop image. Not that it would try to rob you
Just use Debian, guys. There’s such a thing as nonfree repos, backports, testing, and even appimages. There’s no reason to deal with middlemen.
Haven't Debian recently voted to include non-free drivers or something like that ?
@@Winnetou17 yes they did, but they had good reason to. Drivers ultimately ended up being too difficult to keep up with. They still hold a strong preference to use open source drivers as much as possible, using non free drivers only when it’s too inconvenient to work around certain difficulties, which is not a very common occurrence, plus there is the fact that some proprietary drivers can perform far better then the open source equivalent, long story short, it’s going to be a case by case implementation.
"Pollute the output in lsblk." Lmao. People will complain about anything related to snaps.
For people willing to learn, there are other methods to hide the "loop spam" when using lsblk. You can use lsblk -f zfs/ext4/xfs etc to list a specific filesystem. You could also simply use lsblk / to list your root directory.
Yeah, if you don't know how to use lsblk, you're not in much of a position to complain about its output being "polluted". There are plenty of legitimate grievances about snap, this really isn't one.
But remember, the whining and self-entitled millennials don't want to use the command line - with them it's all about "me me me" and having it their way because their parents didn't say the word "no" enough to them when they were growing up.
And now you're expecting them to use *COMMAND LINE SWITCHES*?
Linux is fun and all but honestly its so frustrating trying to remember specific or "quirky" commands/parameters for one scenario. Like "lsblk -e 7" who comes up with this stuff
That's more soy than I can handle.
Check out Shufflecake, it takes this Loopback concept and runs all the way away with it for hidden and recursive filesystems.
Ubuntu doing Ubuntu things.
they also polute gparted, iam not sure where root is when i see like 12 devices on single partition.
i would happily use snaps on server, just.. get rid of this loop devices plz
Who are these strange people that complain about snaps and lsblk working as intended?
Pseudo devices or Sudo devices ammirite
Oh man... What's wrong with you, Linux guys? Why don't you just call it "virtual" if it is virtual? Why "loop"? 😵💫
So, just like .dmg files on macOS? Then it's fine to me, I guess.
No, LOL. It's a device file device mapper creates in Linux. macOS and other *nix systems also have them.
DMG (a.k.a. Apple Disk Image) is a disk image format macOS uses, similar to ISO, VMDK, and QCOW2.
Good reason to drop Ubuntu and switch to arch or at least Debian, or ventoy and combine the loops. Loop de doop hoolahoop got too many loops from my live oses. Hula hoop loop de doop hulahoop through the loop.
That's just what I said.
If by good reason you mean "because it pollutes lsblk", this alone is one of the dumbest reasons to drop Ubuntu. Or any other distro for that matter.
That's like saying that you'll never buy a Bugatti Veyron because, say, you don't like the silver color (theoretically, I don't know what color(s) it has). Like really, I can't think of anything that would be smaller/pettier than this, to complain about and above else, to ditch an entire distro. And I say that as someone who doesn't like Ubuntu in its current state, and I'm not a fan of snaps either.
Android uses Loop devices...
Are there any alternatives to Mastadon? New users ruined it. Its like reddit now.
Oh no, it doesn't feel like a complete ghost town anymore, how hooooorrible!
_"Are there any alternatives to Mastadon?"_
Yes. The best alternative is Mastodon. (There are other instances you can move to.)
Loop de loop
This is kinda half ass demo with all the “ I didn’t mean to …”😂 however I do appreciate many of your other videos
delete 10g file
First
First comment :D