Moving system to newly added disk - am I doing it right?

SUPPORT

Hi,

I have just added a new SSD to my laptop alongside the original HDD. I plan to use SSD for system, and HDD for data. I intend to do it following way:

  1. copy stuff from / to new disk (boot, etc, opt, root, usr, var)
  2. create links and mountpoints (like bin, home, mnt...)
  3. replace the entries in fstab (remove old root partition on HDD, add new partition on SSD)
  4. set the SSD as bootable
  5. reboot

I do not plan to touch the old root partition on HDD in order to have some backup option. At least for now.

Now the question is:

Would it work properly? Or did I miss something?

​

Edit:

I forgot about installing grub - thanks for reminding about it!

System is now moved and running properly. I made two mistakes along the way: first I incorrectly partitioned new SSD, and later I put wrong mounting parameters in new fstab.

Old root partition is left in place, and by choosing in BIOS which disk to use, I can boot one or other system - just in case.

​

Thanks all for help!

Posted Nov 28, 2020, 10:48 PM UTC · edited

315

I've done this, but I did it via clonezilla, doing a full disk clone, then expanded the partition to fit the new available space, then chrooted in via the install medium to regen fstab and reinstall the bootloader. I actually did it to move an install to a new computer entirely. Worked fine. I would 100% back up your home directory before you try though.

3
devastator_pcOP•

Thanks for reminding me of the bootloader reinstall. I forgot that!

System is up and running.

1
whenthe_brain•

probably should use clonezilla

2
Trainzkid•

I've done this and had it work pretty well, only issue I run into is some programs don't want to work at first because of file permissions, but a quick look through all the files that pertain to the program and some chown use and it's all cleaned up

2
devastator_pcOP•

Yes, I used cp -rp for that.

2
Trainzkid•

Ah, -p keeps permissions or something

1
devastator_pcOP•

permissions and ownerships, yup.

2
TopDownTom•

You'll also need to update grub so it looks in the new location for your installation, especially since you're leaving your HDD 'old' root and boot in place.

If you haven't seen this link you should give it a read-through before proceeding.

2
devastator_pcOP•

I missed that page in wiki. Thanks!

2
TopDownTom•

Indeed!

1
devastator_pcOP•

System moved to new SSD, and running properly. Thanks for help!

1
idontchooseanid•

You shouldn't copy stuff. What you need is a raw partition image and an exactly matching partition table of your old disk. If the capacity of SSD is smaller you need to shrink your partitions.

2
Alpha_Mineron•

I’m not entirely knowledgable in this but I got a strong feeling that this will probably brick your system.

This kinda stuff is what LVM was made for...

1
devastator_pcOP•

Well, it worked well this time. Probably I just used all my luck for that ;)

2
Alpha_Mineron•

Great News then!

2
[deleted]•

[deleted]

1