I have the unique pleasure of waiting as /usr is copied back to my Ubuntu SSD after offloading it to a sea of spinning rust to save some space. Surprise surprise Ubuntu keeps almost everything in /usr these days and it didnt boot :l but hey, at least BusyBox in initramfs has my back for times like these. Can i mount a specific ext4 directory with options? the issue seems to be my attempt at using a bind mount fails while running from the ramdisk, for whatever reason it wont mount my large data drive on /data

  • wmassingham@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    I would think you could put /usr on a separate disk just fine, as long as it was available to mount at boot time.

    How small is your SSD that you’re trying weird stuff to save space? Even in the tens of gigs should be enough to run Ubuntu. I just checked two full desktop systems, and they are 32 and 24 GB used for the root partition.

    • mvirts@lemmy.worldOP
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      I’m just irresponsible with installing software on my desktop machine. It’s a 50g partition but I use it for music, software development, and some games (looking at you flightgear) which eventually add up. I’ve been slowly moving pieces of the setup onto a 3tb rust gyroscope with mostly success. Luckily this blunder was recoverable and I’m back to where I was before

  • burningquestion@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    1 year ago

    You didn’t mention why you’re trying to bind-mount your /data volume from your initramfs environment, but the only reason I can even guess at is that you’re trying to use it as part of your recovery environment. In which case, you’d probably be better served by doing the recovery from an Ubuntu live usb rather than try to cobble together a working environment from the shrapnel you left scattered across your drive.

    This process should literally look like – boot, mount drives, rsync /usr back to root volume, clean up fstab/any other config changes, reboot, try again later after you’ve done more reading.

    • mvirts@lemmy.worldOP
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      1 year ago

      Interestingly, when I added the bind mount to /usr the init environment failed when trying to set up the actual root fs because it was trying to bind mount from the init ramdisk filesystem paths into the new root path. im sure I could cloodge together a script to patch things up in the initrd but my days of straying from a sane upgrade path on Ubuntu are over (now I just do that on nixos because I don’t know what I’m doing)

    • TheWoozy@lemmy.fmhy.ml
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      I’m surprised you can’t put /usr on a separate partition. Back in my SunOS days, we used to NFS mount /usr on all our workstations.

      • burningquestion@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        There was a movement to make /bin /sbin etc symlinks to /usr a few back. I honestly don’t remember the rationale, but here’s Debian’s page about the change: https://wiki.debian.org/UsrMerge. If I hadn’t been following the distros at the exact moment they did the changeover it probably would have thrown me for a loop too.

        I think it had to do with the fact that these days relatively few people need /usr on a separate partiton and so it very rarely happens and something about system binaries being easier to manage if they’re actually all in one place. People are ready for some tweaks to the FHS, I guess.

      • mvirts@lemmy.worldOP
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        1 year ago

        You totally can, this is some weirdness in the mount order during boot and not having the disk available at the same path in the init ramdisk

        Also, Ubuntu making bin a link to /usr/bin doesn’t help :P

  • Maxy@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    1 year ago

    I’m not too familiar with Ubuntu, but the arch wiki has a section about moving /usr to a separate partition: https://wiki.archlinux.org/title/Mkinitcpio#/usr_as_a_separate_partition

    Maybe using these instructions, you can still offload /usr to a mechanical drive.

    Just out of curiosity, how large is your /usr directory? Mine is only 30GiB (arch Linux, kde plasma with all apps + hyprland), which only takes up 17GiB on my disk due to btrfs compression (zstd level 15).

    • mvirts@lemmy.worldOP
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      Ohh I like the sound of that compression ratio, I’ll have to look into it. I’m just using ext4, plus I should repartition the whole disk I’m throwing away another 50Gb keeping my home partition on the SSD…

      My /usr is 35Gb but I’m squeezing Ubuntu into a 50Gb partition and between docker, snapd, postgres, apt, and Minecraft it’s hitting 100% weekly.

      Im pretty sure it would be fine if i was trying to dedicate a whole partition to /usr, maybe that’s the right answer after all