I’m in the process of upgrading the storage on my laptop and I’m looking for some advice on migrating my dual-boot system to a new disk. Currently, my laptop is set up with two disks:
Disk 1 (512GB) which contains:
fat32 for EFI
unknown for Windows 10 reserved
ntfs for Windows 10 system
ntfs for Windows 10 recovery
btrfs for openSUSE system
Disk 2 (1TB) which contains:
ntfs for Windows 10
btrfs for openSUSE user home directory
swap for openSUSE
I recently purchased a 2TB disk and I want to migrate the data on Disk 2 to the new disk. I have searched online for a good guide on how to do this, but I haven’t found anything specific to my situation. While I’m aware of general best practices like backing up my data before migration, I would appreciate any specific tips or recommendations for this process.
In particular, I would like to know the recommended steps for the following scenarios:
Migrating only the data on Disk 2 to the new disk.
Migrating the entire system on Disk 1 to another disk in the future.
Thank you in advance for any advice you can offer!
There are a number of “solutions” for accomplishing this … and certainly this is a common challenge for many folks.
Although I’ll not propose a step-by-step description for each of the two scenarios, I’ll only offer a suggestion or two for external research.
The one challenge is with the first disk with, I’m assuming it’s a native / original install of Windows. IMO, Windows is not necessarily flexible with respect to reorganizing an existing disk or migration to a new disk. I’d be inclined to leave it be.
But overall, a couple of well known “Linux” oriented options is the “dd” command, or a “clone disk” tool like CloneZilla, or maybe “rsync”.
If I were to reinstall / change partition structure (or replace a drive) on one of our two desktops or two laptops (all run TW exclusively … no duel [sic] booting with Windows), I would simply create the new partitions, do a fresh install of TW, then “rsync” my backup I made of orig /home to the new /home.
My recommendation at this point is some external research … google
“migrate to new disk using dd vs”
… yes, do not specify anything after “vs”, that way you can see the other various options that have historically been offered and the strengths and weaknesses of each.
Do not discount solutions and questions about this at other Linux distro sites, because, overall, the various solutions are not distro specific.
(1) I would physically mount the new disk in an external disk container (USB). I actually have something called a “SATA docking station” for that.
(2) I would plug in the USB container. And I would then use “fdisk” (or “gdisk” or “Yast partitioner” to partition the new disk as I want. I would then mount the new partitions and start copying. I would probably use a tar pipe (ask if you need an explanation) for that. I would probably boot into Windows to copy over the Windows partition. Maybe I would create that partition while running Windows.
(3) I would then modify “/etc/fstab” so that it would mount the new partitions when I next boot. Best to use UUID to identify the partitions, since those don’t depend on how the disk is connected.
(4) Shutdown the computer. Install the new disk in the physical computer, and the old disk in the external drive container.
(5) Boot up, and hope for the best.
Hmm, before I started, I would make sure that I have a live system, either on a DVD or USB flash drive, so I could boot to that to fix things if anything goes wrong. Perhaps I would do the copying from that live system rather than from the system that I am copying.
This is typically a case for some answers of the kind “I would probably do …”. Which is not bad because it gives you something to study, probably gives you new ideas and it certainly will give you something to choose.
For me it is a bit difficult for a “I would probably do …”, because I never would have any Windows partitions on my system. But apart from that and because you only want to change things on the second disk, I would probably:
copy the NTFS file system to a partition of the same size on the new disk using a byte for byte copy (I prefer dd);
create a partition for the new /home file system (will probably larger then what you have now?), create a file system on it (why is the old one Btrfs?, have seen that for root file systems, but not on others) and copy all files using cp, or tar or rsync;
The Swap partition can of course made to your liking irrespective on what it was.
Because the system itself is not touched, basically this can be done from the running system which no users loged in except root from the real console (my advice, go to multi-user.target).
After all the copying is done, adapt /etc/fstab to the new UUIDs, likewise change the UUID od the Swap partition in the kernel parameters in the Grub config, shut-down, remove the old disk and then things should be OK.
BUT, check and re-check and first and for all, understand what every step is doing.
And of course I have no idea if Windows will be upset by this.
Choose the correct source and target, then start cloning.
The new disk has the same UUID of each partition as Disk 2.
Boot into an openSUSE Leap 15.5 live USB system. Use KDE Partition Manager to resize some of the partitions.
During moving/resizing the swap partition, an error occurred. Therefore I have to wipe the swap partition and create a new swap partition with a new UUID.
Modify /etc/fstab for openSUSE Tumbleweed to match the new UUID.
Boot into Windows 10. Everything works fine.
Optionally run chkdsk D: /r to verify.
Boot into openSUSE Tumbleweed. System is stuck at the splash screen: