What Are All These Loop Devices? (Ubuntu/Snap Users Often Ask This.)

Поделиться
HTML-код
  • Опубликовано: 16 ноя 2024

Комментарии • 66

  • @Danielddiniz
    @Danielddiniz Год назад +29

    Appreciate your passion explaining concepts to the community DT, you’re so nice 👍🏼!

  • @scottb4029
    @scottb4029 Год назад +3

    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.

  • @he8535
    @he8535 Год назад +8

    Should do an video on how Linux boots from power button to graphical application

  • @thingsiplay
    @thingsiplay Год назад +36

    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.

    • @panproteus
      @panproteus Год назад +6

      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
      @paulg3336 Год назад

      Meh lsblk - e 7

    • @thingsiplay
      @thingsiplay Год назад +2

      @@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.

    • @heroclix0rz
      @heroclix0rz Год назад +4

      Old man yells at cloud.

    • @thingsiplay
      @thingsiplay Год назад +1

      @@heroclix0rz That has nothing to do with the cloud. Snaps are not only used by cloud servers. I am on a local machine.

  • @GioGziro95
    @GioGziro95 Год назад +6

    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.

  • @enderprism
    @enderprism Год назад +14

    Thanks for the explanation, I always wondered what they were doing 😀

  • @kipchickensout
    @kipchickensout Год назад

    I would've thought that it would be permanent, so it's good that you "diverged" and went over that as well

  • @eskrest
    @eskrest Год назад +1

    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

  • @BradleyBrown
    @BradleyBrown Год назад +5

    Thanks for doing this, it was very educational!

  • @theodorealenas3171
    @theodorealenas3171 Год назад +1

    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

  • @itildude
    @itildude Год назад +10

    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.

  • @PabloBianchiOK
    @PabloBianchiOK Год назад +3

    Flatpak is also sandboxed and doesn't uses loop devices. How? Why?

  • @DarkCookie586
    @DarkCookie586 Год назад +1

    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.

    • @swimfan6292
      @swimfan6292 Год назад +1

      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.

  • @jimmyrichards5595
    @jimmyrichards5595 Год назад +1

    Have a Happy Christmas and a Merry New Year!
    🎅💫

  • @MerkDolf
    @MerkDolf Год назад

    Hey DT enjoy your content please don't quit your day job!

  • @temari2860
    @temari2860 Год назад +4

    I see that there are no snaps defined in fstab. Does that mean that snap system has separate tools to auto mount your snaps?

    • @DistroTube
      @DistroTube  Год назад +6

      Yea, Snaps automatically create their own mount points so you don't have to fool with them.

  • @swimfan6292
    @swimfan6292 Год назад

    I hope u have a video on interactive shell setup, auto completion.. i need that

  • @linuxstreamer8910
    @linuxstreamer8910 Год назад

    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

  • @SlideRSB
    @SlideRSB Год назад

    This video left me more confused about this topic than I was before.

    • @Winnetou17
      @Winnetou17 Год назад

      What is/are the confusion(s) ? Anything we can help to clear ?

  • @MarkusHobelsberger
    @MarkusHobelsberger Год назад +2

    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?

    • @GioGziro95
      @GioGziro95 Год назад +1

      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.

  • @sys7emH4cked
    @sys7emH4cked Год назад

    Hey DT, can you tell me your system dark gtk theme name which you use in your browsers, pcmanfm etc.. please 🥺.

  • @ashwinalagiri-rajan1180
    @ashwinalagiri-rajan1180 Год назад +3

    can you do similar videos on stuff like sockets, ports, processes, etc.

  • @leksmut
    @leksmut Год назад +2

    What if a loop devices limit achieved then new snap installation will fail?

    • @kpcraftster6580
      @kpcraftster6580 Год назад +3

      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.

  • @the8thark
    @the8thark Год назад

    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.

    • @Winnetou17
      @Winnetou17 Год назад

      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.

    • @theodorealenas3171
      @theodorealenas3171 Год назад

      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

  • @jasonbonifacio2473
    @jasonbonifacio2473 Год назад +1

    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.

    • @Winnetou17
      @Winnetou17 Год назад

      Haven't Debian recently voted to include non-free drivers or something like that ?

    • @josephlh1690
      @josephlh1690 Год назад

      @@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.

  • @helloimatapir
    @helloimatapir Год назад +4

    "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.

    • @kpcraftster6580
      @kpcraftster6580 Год назад +2

      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.

    • @terrydaktyllus1320
      @terrydaktyllus1320 Год назад +1

      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*?

  • @struggle375
    @struggle375 Год назад

    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

  •  Год назад +3

    That's more soy than I can handle.

  • @jmac217x
    @jmac217x Год назад +1

    Check out Shufflecake, it takes this Loopback concept and runs all the way away with it for hidden and recursive filesystems.

  • @valsharess-yt
    @valsharess-yt Год назад +4

    Ubuntu doing Ubuntu things.

  • @nomaddemon
    @nomaddemon 3 месяца назад

    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

  • @kpcraftster6580
    @kpcraftster6580 Год назад +3

    Who are these strange people that complain about snaps and lsblk working as intended?

  • @secretbandreappears244
    @secretbandreappears244 Год назад +1

    Pseudo devices or Sudo devices ammirite

  • @miroslavmakhruk9866
    @miroslavmakhruk9866 3 месяца назад +1

    Oh man... What's wrong with you, Linux guys? Why don't you just call it "virtual" if it is virtual? Why "loop"? 😵‍💫

  • @KhoaNguyen-sy6np
    @KhoaNguyen-sy6np Год назад

    So, just like .dmg files on macOS? Then it's fine to me, I guess.

    • @GioGziro95
      @GioGziro95 Год назад

      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.

  • @derrekvanee4567
    @derrekvanee4567 Год назад

    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.

    • @billfarley9015
      @billfarley9015 Год назад

      That's just what I said.

    • @Winnetou17
      @Winnetou17 Год назад +1

      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.

  • @swimfan6292
    @swimfan6292 Год назад

    Android uses Loop devices...

  • @abhabh6896
    @abhabh6896 Год назад

    Are there any alternatives to Mastadon? New users ruined it. Its like reddit now.

    • @BurgerKingHarkinian
      @BurgerKingHarkinian Год назад

      Oh no, it doesn't feel like a complete ghost town anymore, how hooooorrible!

    • @GioGziro95
      @GioGziro95 Год назад

      _"Are there any alternatives to Mastadon?"_
      Yes. The best alternative is Mastodon. (There are other instances you can move to.)

  • @SteveMacSticky
    @SteveMacSticky Год назад

    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

  • @MichaelMantion
    @MichaelMantion Год назад +1

    delete 10g file

  • @lucasfkam
    @lucasfkam Год назад +1

    First

  • @Valtmens
    @Valtmens Год назад

    First comment :D