As well as all my important stuff in /home, can I transfer over the operating system as well as everything in the root partition? What about the Windows Partition? Thanks in advance.

  • @Agent641@lemmy.world
    link
    fedilink
    2
    edit-2
    56 minutes ago

    I’ve always used Acronis Clonedisk, but there are probably newer tools that do the job.

    I think it costs money, but I stole my copy from work.

    It’s very easy to use, just a few clicks on the default options, and it also auto-scales the partition to fit the destination dish, whether blarger or smaller.

    It boots from a USB drive and is OS-agnostic.

    I use it whenever I’m swapping out my windows boot drive for something faster or bigger. Never had any problems from using it

  • I did this a few weeks ago with two M.2 drives and just one slot on my motherboard.

    • boot into clonezilla
    • clone smaller drive onto the bigger one (I used and external enclosure via USB)
    • shutdown and swap drives
    • reboot into live medium
    • resize partitions on the new drive with gparted
    • reboot and check/adjust UEFI settings if needed
    • This sounds fairly straightforward. Does it work to note down the partition sizes initially, and then just make sure they’re the same type and bigger on the new drive?

      • Clonezilla creates a 1:1 copy on the new drive. I went from 1 to 2 TB and had 1 TB of unallocated space left. You can use the space to increase other partitions or make new ones.

    • Bookmarking this, but still sounds a bit more of a hassle than it should be. I’ve done this before with some paid software packages and am disappointed this is not part of the operating system. Like, hey OS. It’s 2024 and I’d like to upgrade my HD. Can you give me a hand? Go fuck myself? - go spend 4 hours nervously playing with software I’ve never heard of before? OS I thought we were cool??

  • @boredsquirrel@slrpnk.net
    link
    fedilink
    4
    edit-2
    11 hours ago

    Clonezilla, automatically resize GPT partition table.

    Nothing better than that.

    If you use an LVM or a modern filesystem like BTRFS, you can just increase it afterwards, so that your partitions grow to the entire available space.

    This is not possible with regular static partitions.

    Otherwise afaik you can delete it and recreate it to fill up all usable space.

    But well, just use BTRFS or maybe LVM.

      • @boredsquirrel@slrpnk.net
        link
        fedilink
        215 minutes ago

        No it doesnt. Partitions need to start at the exact bit they start, but can end at something bigger.

        Thats the trick.

        Using gdisk you would print the table, make a photo, delete it, create them new and set the max for the storage partition (if you use BTRFS or LVM like a normal person) to the original start, but max available end

        Then you print again and verify and write to apply the changes.

        Then there is space but the partitions need to fill that up still, with btrfs on Fedora that would be sudo btrfs resize max / I think

  • Björn Tantau
    link
    fedilink
    814 hours ago

    You can use dd to transfer literally everything, like partitions, boot sector and filesystems over and then use gparted to grow the partitions. Boot any Linux live image to do it.

  • Rentlar
    link
    fedilink
    5
    edit-2
    13 hours ago

    If you’re feeling risky, dd can do everything you want to but it can also fuck everything up if you make a mistake (so can ignoring warnings on gui programs). So triple check everything (the if= and of= portions in particular) before you run any dd command. Launch a live distribution off a CD or USB to use a disk image maker or dd, don’t make images of the operating system disk while it’s being used for best results. A couple sample methods:

    • make an image of the entire smaller disk, place it on a third storage disk
    • restore the image from the third disk to the destination disk you want
    • then resize the partitions or add new ones on the second disk using Gparted for the remaining storage space.

    The quicker but riskier method is to directly clone the first disk to the second larger disk, then adjusting the second disk using Gparted to add or expand partitions.

    Either way it will copy everything from the old disk including windows and root partitions.