lsblk:

I need to enlarge nvme0n1p2 by shrinking nvme0n1p3 (LUKS)

do I have to do something with /boot/efi? enlarge as well?

backing up as of now

  • monovergent 🛠️@lemmy.ml
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    10 days ago

    I got away with a 380 MB /boot during upgrade, though that assumes you aren’t dual booting another distro that also needs some room. Have you tried deleting old kernel versions?

    But if you want to future-proof, the issue is that shrinking a partition from its “top” is not a supported function. For ease of explanation, suppose we want a 1.5 GB /boot partition:

    1. Shrink nvme0n1p3 by 1.5 GB
    2. Create a new partition and format
    3. dd the old boot partition to the new partition
    4. Resize the new /boot partition to the full 1.5 GB
    5. Delete the old boot partition
    6. For good measure, reinstall GRUB to make sure it is aware of the new partition: https://wiki.debian.org/GrubEFIReinstall

    This assumes your fstab file mounts by UUID (default in recent versions of Debian). If not, update /etc/fstab to match the new partition. It’s been a while since I last did this, so definitely have your backup on hand and perhaps double check with other resources in case I left out any steps.

    More precisely, shrinking relies on the presence of empty blocks. A filesystem usually fills from “top” to “bottom”, so there would be no empty blocks to shave off the top of your nvme0n1p3, you can only shave off at the end. If you really don’t want /boot at the end, you’ll have to shrink nvme0n1p3, back it up, delete nvme0n1p3, expand /boot, re-create nvme0n1p3, and dd the backup back into its place.

      • just_another_person@lemmy.world
        link
        fedilink
        arrow-up
        1
        arrow-down
        2
        ·
        10 days ago

        Your entire disk is already allocated. You can’t easily shrink anything and move space around.

        You also shouldn’t need to expand your boot partition at all.

        Who or what is telling you this is needed?

        • arsus5478@lemmy.mlOP
          link
          fedilink
          arrow-up
          4
          ·
          10 days ago

          debian 13 needs more boot space, my boot partition is too small to complete the upgrade

          • isgleas@lemmy.ml
            link
            fedilink
            arrow-up
            2
            ·
            9 days ago

            Have you tried to do some cleaning on your /boot filesystem? It could be you have some old stuff there that may well be wasting storage

        • BCsven@lemmy.ca
          link
          fedilink
          arrow-up
          2
          ·
          10 days ago

          You can resize partitions if disk is all full…depending on fs of course…but shrink, move, grow works.

            • BCsven@lemmy.ca
              link
              fedilink
              arrow-up
              1
              arrow-down
              1
              ·
              10 days ago

              I typically use gparted live, or GNOME disk utily, so I don’t know the command names, I slide the sliders and hit OK 😀