I recently removed windows 10 from my pc, how can i merge the unallocated space with /dev/nvme0n1p5? There’s the boot partition between so i can’t just adjust one of them and merge with the other using the resize/move button. How can i do it?

  • It shouldn’t do “nothing”

    Just in case you’re confused: GParted will let you collect a bunch of operations and previes the result. Just clicking the move button doesn’t apply changes to disk; you need to review your changes and hit the green button in the top left to actually alter your disk. This allows you to move the boot partition to the left and extend your main partition without having to wait for a progress bar halfway through your operations. Moving the partitions will take a while, so if they fail quickly, you’ll get an error message at the very least.

    • Gush@lemmy.mlOP
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      I moved the boot parition successfully but i’m afrad that it’s gonna break my system somehow. Do i have to reinstall the grub? How? And by the way now that the two partitions are close together if i try to resize/move the “new Partition #1” i can’t expand it nor move it anywhere, same thing with /dev/nvme0n1p5

      • You shouldn’t need to reinstall Grub if the ESP partition is anything to go by; that indicates the presence of a UEFI system.

        I don’t know what you mean by resize/moving “new partition 1”.

        This is how I would approach your situation:

        1. Starting position (smaller, because VM)

        Make special note of the UUID of the root partition (3d55....). Also write down the UUID of the boot partition (not depicted here).

        1. Move the /boot/efi partition to the left

        1. Grow and move root

        1. Apply changes

        2. Check UUIDs

        If any of the UUIDs changed, mount the root partition and edit /etc/fstab to update the new mount location. Then run whatever your distro uses to update the bootloader (update-grub, or an invocation of grub-mkconfig), initramfs (mkinitramfs, mkinitcpio, dracut, or something else) to make the configuration stick.

        1. Reboot

        Here’s a short video of the resize process:

        Resizing will take longer on your machine, of course.

        Alternatively, you could use this opportunity to add encryption to your system. To do that, I would move the boot partition, create a new, encrypted root partition, mount both root partitions and copy over all the files (rsync -av /mnt/old-root /mnt/new-root), update the partition details as above but also configure /etc/crypttab and add the necessary crypto boot modules (if they weren’t present on your system already). Then delete the old partition, extend the crypto container, extend the root partition, and you have yourself an encrypted-at-rest system. This process would add a whole bunch of potential breaking points so don’t do it if you don’t want to take the risk, but it would make your system more secure in the process.

      • n2burns@lemmy.ca
        link
        fedilink
        arrow-up
        4
        ·
        1 year ago

        Just to add to what @skullgiver@popplesburger.hilciferous.nl said, in case you break Grub, you might want to use Boot Repair on the live disk or something similar. Then you don’t have to deal with the terminal commands people have suggested to you.