8

I have some normal x86_64 desktop Linux installed in a single ext4 root partition on some 500GB HDD.

Now if I want to migrate this installation to a 500GB SSD (rest of the system stays the same), do I just clone the disk and run genfstab (I know that from the Arch installation guide, do I even need that?) and done?

Or is there more to it?


That is, everything is in that single partition. I do not have a swap partition, but a swap file, and my system can easily do without that too if it should be an issue.

2 Answers 2

9

After some research, I found that ext4 is apparently quite usable on SSDs, so I went with the clone approach. Here is what I did, step by step:

  1. Install the SSD
  2. Boot from a USB and clone the HDD to SSD with dd
  3. Change the UUID of the new filesystem. I missed that one at first, which caused funny results as grub and other software got confused
  4. Update the fstab on the new filesystem. I used the genfstab script from the Arch USB for that
  5. Re-generate initramfs, reinstall and reconfigure grub
  6. Move SSD to the top in boot priority, done

The above worked for me; however, I am very much a novice admin, so I'm not sure if every step is actually necessary and useful.

4
  • What if your HDD is bigger than your new SSD? Sep 28, 2017 at 10:11
  • @JasonStack You cannot just clone the disk then afaict. See e.g. askubuntu.com/q/409204 Sep 28, 2017 at 10:34
  • Can I just clone /boot and /? Sep 28, 2017 at 10:38
  • @JasonStack If you have sufficiently large target partitions, I guess so? However, as I said before, I'm not good at that admin business, you might want to ask a new question for that to be sure. Sep 28, 2017 at 10:40
2

Yes, but...

yes, you can simply clone/copy the HDD content in the new SSD, because an SSD is a disk, just as an HDD.
but also SSD is a completely different technology, so you have to adjust swap partition and discard setting.

Anyway, I suggest you a clean install

5
  • I don't use a swap partition, but a swap file. The entire installation lives in a single partition. I'll try to clarify that in my question. Mar 8, 2017 at 22:24
  • "but also SSD is a completely different technology" Swap aside, what are the potential issues with that? Mar 8, 2017 at 22:31
  • TRIM support mainly and you can choose a file-system SSD friendly
    – mattia.b89
    Mar 8, 2017 at 22:34
  • That's an interesting point, thanks. I'll look into that. Mar 8, 2017 at 22:40
  • That file-system argument appears to be important, I guess I probably want btrfs now or smth. unix.stackexchange.com/questions/13314/… Mar 8, 2017 at 23:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .