this post was submitted on 06 Sep 2026
135 points (99.3% liked)

linuxmemes

32704 readers
342 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack users for any reason. This includes using blanket terms, like "every user of thing".
  • Don't get baited into back-and-forth insults. We are not animals.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry of any kind will not be tolerated. This is an LGBTQ+-friendly community -- if that is a problem for you, you should leave.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn, no politics, no trolling or ragebaiting.
  • Don't come looking for advice, this is not the right community.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, <loves / tolerates / hates> systemd, and wants to interject for a moment. You can stop now.
  • 5. πŸ‡¬πŸ‡§ Language/язык/Sprache
  • This is primarily an English-speaking community. πŸ‡¬πŸ‡§πŸ‡¦πŸ‡ΊπŸ‡ΊπŸ‡Έ
  • Comments written in other languages are allowed.
  • The substance of a post should be comprehensible for people who only speak English.
  • Titles and post bodies written in other languages will be allowed, but only as long as the above rule is observed.
  • 6. (NEW!) Regarding public figuresWe all have our opinions, and certain public figures can be divisive. Keep in mind that this is a community for memes and light-hearted fun, not for airing grievances or leveling accusations.
  • Keep discussions polite and free of disparagement.
  • We are never in possession of all of the facts. Defamatory comments will not be tolerated.
  • Discussions that get too heated will be locked and offending comments removed.
  • Β 

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't remove France.

    founded 3 years ago
    MODERATORS
     

    I feel like an idiot realizing block devices are just... block devices.
    They just hold data.
    Shocker, I know.
    But it just hit me when playing around with LVM. I can create a PV directly on a disk. I can even directly format a disk with FS. Floppies don't tend to have a partition table either. On the other hand, I can partition a partition. I can also just write a Tar directly to disk, like with tape. Or any file.

    But with multiple files it starts to become a problem. A-ha! I can just write files to partitions just the same to make reading them simpler.
    In this case:

    Device      Start    End  Size Name
    /dev/sda1    2048  70704 33.5M Limahl - Never Ending Story
    /dev/sda2   71680 127492 27.3M Alphaville - Big in Japan
    /dev/sda3  129024 201967 35.6M Alphaville - Sounds Like a Melody
    /dev/sda4  202752 259447 27.7M Bronski Beat - Junk
    /dev/sda5  260096 324229 31.3M Chris De Burgh - High On Emotion
    /dev/sda6  325632 386300 29.6M Jermaine Jackson - When the Rain Beg
    /dev/sda7  387072 437492 24.6M Kylie Minogue - The Loco-Motion
    /dev/sda8  438272 493179 26.8M Mauro - Buona Sera Ciao Ciao
    /dev/sda9  493568 545532 25.4M Olivia Newton-John - Xanadu
    /dev/sda10 546816 613761 32.7M Radiorama - Yeti
    

    I don't know if it's the limitation of GPT, but fdisk let's me theoretically get up to 2^32^ partitions (default is 2^7^). In practice, this will be lower.
    For example:

    Expert command (m for help): l
    New maximum entries (1-4294967295, default 134217728): 268435456
    Not enough space for new partition table!
    
    Expert command (m for help): p
    
    Disk /dev/sda: 57.3 GiB, 61524148224 bytes, 120164352 sectors
    

    Right now I just did it manually. Check file size, divide by sector size, add one if remainder, make partition of that number of sectors, name partition, write partition table, copy file with dd and repeat.

    But I should try to automate this. It could be a bash script, but I want to learn C beyond basics, so I guess I should try writing it in that.
    Take destination drive and files as arguments, then do what I wrote above. And try not to nuke the wrong disk in the process.
    On the other hand, I am so lazy I can't typically even start with my hobbies. Which sucks because I want to, I just can't... start.

    Anyway, hundreds of files and partitions can't be processed by hand any easier.

    you are viewing a single comment's thread
    view the rest of the comments
    [–] diaphragmwp@discuss.tchncs.de 9 points 4 hours ago* (last edited 4 hours ago)

    Only now you discovered that? Amazing for you, actually.

    Wait until you see Plan9. No, I have not (majorly) used it, but imagine it's stuff being files and filesystem drivers everywhere. The internet is a couple of filesystems. To download stuff from a website, you use the TCP filesystem to mount an HTTP filesystem.