[Solved] image to SSD

General support questions
Post Reply
lightman47
Posts: 1250
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

[Solved] image to SSD

Post by lightman47 » 2021/02/07 20:51:50

I have a CentOS7 dual boot Windows 10 spinning 2TB drive for which I just ordered an SSD 2TB drive. Both are SATA drives. My intent is to plug in the SSD and Clonezilla the spinning drive to the new SSD.

My question is: will I be then able to un-plug the spinning drive, reboot - and have it all just work?

Thank you.
Last edited by lightman47 on 2021/02/10 15:15:35, edited 1 time in total.
Remember - importing/building packages will likely "byte you in the butt" come update time, long after you'd forgotten you did that! Use repos whenever possible.

User avatar
jlehtone
Posts: 3335
Joined: 2007/12/11 08:17:33
Location: Finland

Re: image to SSD

Post by jlehtone » 2021/02/08 07:29:17

Looks promising. Besides, you can try again since spinner remains intact.

UEFI boot? The UEFI menu entries are on the motherboard. I can't remember how they refer to disks, but UEFI should detect ESP from every disk.

lightman47
Posts: 1250
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: image to SSD

Post by lightman47 » 2021/02/08 10:46:56

Sorry I forgot to mention - non-UEFI on this particular machine.

Thank you.
Remember - importing/building packages will likely "byte you in the butt" come update time, long after you'd forgotten you did that! Use repos whenever possible.

User avatar
TrevorH
Forum Moderator
Posts: 30314
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: image to SSD

Post by TrevorH » 2021/02/08 14:51:26

Personally I'd install both drives, boot from rescue media and dd the one to the other (making sure to be going in the right direction!) then remove the old drive and try booting up.
CentOS 6 died in November 2020 - migrate to a new version!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

User avatar
jlehtone
Posts: 3335
Joined: 2007/12/11 08:17:33
Location: Finland

Re: image to SSD

Post by jlehtone » 2021/02/08 15:09:12

Isn't that just what "Clonezilla the spinning drive to the new SSD" would do (at least with some options)?


All "2TB" drives do not have same amount of sectors. If SSD is smaller, then raw copy would fail?

Does the spinner have "aligned" partitions? Old tools did place start of first partition to sector 63.
SSD's have physical sectors that are larger than 512 bytes and hence 63 is "mis-aligned".

User avatar
TrevorH
Forum Moderator
Posts: 30314
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: image to SSD

Post by TrevorH » 2021/02/08 22:21:36

All good points. AFAIK, fdisk from CentOS 6 onwards knew about sector alignment and did it correctly so hopefully that's not going to be a problem.
CentOS 6 died in November 2020 - migrate to a new version!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

mathog
Posts: 256
Joined: 2008/07/09 23:52:06

Re: image to SSD

Post by mathog » 2021/02/08 23:30:14

lightman47 wrote:
2021/02/07 20:51:50
I have a CentOS7 dual boot Windows 10 spinning 2TB drive for which I just ordered an SSD 2TB drive. Both are SATA drives. My intent is to plug in the SSD and Clonezilla the spinning drive to the new SSD.

My question is: will I be then able to un-plug the spinning drive, reboot - and have it all just work?
If the number of blocks in both disks is the same then that should work. If there are more in the spinning disk then something on the end will not fit onto the SSD, and if it is less in the spinning disk there will be blocks which are not used in the SSD. The partition table should not extend beyond the end of the disk. So you might need to use parted to shrink the last partition in the spinning disk slightly to make this work. Just don't try to boot with both the SSD and spinning disk in because the same BLKIDs will be present on both disks.

If that is an old spinning disk with a 512 block and the SSD uses 4K blocks the partitions may not be lined up properly. (Probably are though, even so.)

If all the partitions are XFS I would be tempted to format those on the new disk, use the backup/restore options to populate the partitions. Then check the blkids, fix them in the SSD's /etc/fstab. Then shut down, pull the HDD, boot from a USB key or CD, fix/install grub on the SSD, then boot from that.

lightman47
Posts: 1250
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: image to SSD

Post by lightman47 » 2021/02/10 15:15:12

Result: Clonezilla worked, but the Windows boot got hosed somehow. A repair with the Windows DVD and several reboots fixed that problem.

Thank you all.
Remember - importing/building packages will likely "byte you in the butt" come update time, long after you'd forgotten you did that! Use repos whenever possible.

Post Reply

Return to “CentOS 7 - General Support”