Score:1

Change boot drive, and move all data

ng flag

I want to upgrade from an old HDD 256GB, to a new m.2 SSD 256GB. But, I want to know-how, and the difficulty of transferring all data to the new drive, and making it the boot drive - I know how to in bios, I'm referring to OS settings.

oldfred avatar
cn flag
UEFI or BIOS system. Dual boot or just Ubuntu? I always suggest if just Ubuntu to do a new install using gpt partitiong whether old BIOS or newer UEFI system. And then restore your data, installed apps, /home and maybe some settings in /etc or server apps in / from your normal backup. It then verifies your backup is complete and if not you still have old drive to get data from. Any clone may give you duplicate UUIDs/GUIDS and various configuration issues. If very knowledgeable, you can reset all those, but easier to do new install.
ng flag
Just ubuntu, I really don't want to do a new install, but if that's best. Okay, how would I do the backup, and restore. Is that a native feature, or a separate program?
C.S.Cameron avatar
cn flag
You can clone the full Ubuntu system from the HDD to SSD using dd. `sudo dd if=/dev/sdx of=/dev/sdy` where sdx is the old HDD and sdy is the new SSD. Gnome-Disks will show which is which. Do not make any mistakes, there is no `undo` command with this method and the target drive is completely overwritten. best to backup the HDD before proceeding.
oldfred avatar
cn flag
You should always have a good current backup. If you use dd, you cannot keep HDD connected when you reboot or the duplicate UUIDs will cause major issues. Note that dd's nickname is Data Destroyer. Very powerful & very dangerous, any typo or mistake is permanent & then only recourse is your good backup. Many ways in Linux. https://help.ubuntu.com/community/BackupYourSystem & https://help.ubuntu.com/community/CategoryBackupRecovery I prefer rsync and only backup my data, not system. Better to use rsync, not dd https://askubuntu.com/questions/1331348/can-i-use-dd-to-back-up-a-mounted-partition
C.S.Cameron avatar
cn flag
Thanks @oldfred, we should probably add that dd can take lots of time and does not show any activity while running. Once started let it complete. 256GB could take all day.
ng flag
Okay, might try the "DD method". As, the SSD will be new, and have no data, and the drive isn't fully taken up, it's simply that size of the drive. I don't believe it has even 150GB used.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.