Score:1

Dual boot: switch to SSD from HDD

in flag

I have Ubuntu as dual boot with Windows. Now I want to switch from HDD(1TB) to SSD(1TB). I want to migrate both Windows and Ubuntu with the same partition. Can I do that?[I am on laptop] If yes how? I want to change my internal disk. enter image description here

ChanganAuto avatar
us flag
Assuming it's UEFI then all the partitions including the ESP would have to be cloned and assuming you don't have internal connections for both you'd also need a temporary USB enclosure. Simply reinstalling both is likely to be faster and cheaper and also give better results. If you need to ask this question it's unlikely you'll learn everything you need to know to do it safely and effectively in a reasonable time.
sudodus avatar
jp flag
Cloning from the HDD to the SSD works, if the SSD is at least as big as the HDD (not one single byte smaller). If that is what you want it is very important to check that (and the nominal size is not good enough, use for example `lsblk -bo name,size,model` to get the drive sizes in bytes. If the SSD is smaller, you had better make a fresh installation. If the SSD is big enough and there is a GUID partition table, GPT, you must also repair the backup partition table at the end of the drive, because the drives have probably not exactly the same size.
sudodus avatar
jp flag
You added a screenshot, but did not write anything more in the edit. There is already an answer to your question, but maybe you need some details (how to do it). In that case please ask for the details that you need (we don't know how much you know already).
Score:1
jp flag

General about cloning

Cloning from the HDD to the SSD works, if the SSD is at least as big as the HDD (not one single byte smaller). If that is what you want it is very important to check that (and the nominal size is not good enough), use for example

lsblk -bdo name,size,model

or with more details

lsblk -bo name,size,fstype,label,model

to get the drive sizes in bytes. If the SSD is smaller, you had better make a fresh installation. If the SSD is big enough and there is a GUID partition table, GPT, you must also repair the backup partition table at the end of the drive, because the drives have probably not exactly the same size. You can repair it with gdisk or gpt-fix a shellscript that uses gdisk.

Cloning tools

There are many cloning tools. Most of them are crude, they simply copy each bit as is from the source device to the target, and the target can be another device or a file (which will become an image file).

  • I use Clonezilla because it is smart enough to copy only the used blocks of the file systems and skip free blocks, the content of swap partitions and unallocated drive space. Clonezilla can clone a whole drive or individual partitions, and it can also create an image (which is not a single file, but a directory with a set of files, where the big files are compressed).

    To use Clonezilla you download an iso file, create a USB boot drive and boot from it. There is a text mode user interface, TUI, to help getting things correctly done.

Other tools may be easier to use, but they are slower, which can make a big difference when cloning a 1 TB drive.

  • mkusb can fix the backup partition table at the end of the target drive automatically, and it helps you avoid mistakes when selecting the target drive.

  • Disks alias gnome-disks is already there in an Ubuntu live drive and ready to use.

  • dd is a very powerful but also very dangerous tool for this purpose. It does what you tell it to do without any questions (no final checkpoint), so you can easily overwrite a drive with valuable data.

Advice

  • Buy an SSD that is big enough, 'one step' bigger than the original drive. If there is no margin in the nominal size, there is a risk that it is slightly smaller than the original HDD, and the standard cloning process will not work.

  • If you already have an SSD, that is slightly smaller than the original HDD, there are work-arounds (shrinking and moving some partition(s) on the original drive before cloning), but these are complicated, slow and risky, and I suggest that you

    • backup all personal files (documents, pictures etc) to a separate drive

    • make fresh installations (Windows first, Ubuntu next). This way you can also get an optimal partition table with suitable sizes of the partitions. You may want a fairly large 'data' partition with the NTFS file system for shared data (personal files) with read/write access from both Ubuntu and Windows. However, notice that Ubuntu will work faster with a Linux file system; ext4 is the standard choice in Ubuntu.

    • copy your personal files from the backup to where you want them in the freshly installed systems.

    I think this is more efficient than the work-arounds, and you get fresh systems too, get rid of old cruft, that occupies drive space and maybe also makes the computer slower.

Score:0
cn flag

Yes you can do that. You can make a disk copy in GNOME Disks from your hard drive and restore that to your ssd. But as ChanganAuto pointed out in the comments, reinstalling both OSses can be faster, but use this way if you dont want to reconfigure both OSses. You also need an external hard drive with 1TB free space to temporarely store your img/iso file

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.