The shoutbox is currently out of service. Join us on Discord instead.
You can help CodeWalrus stay online by donating here.

Clone a SSD to another one

Started by Hayleia, March 07, 2016, 08:21:26 pm

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Hayleia

Helloes

Not sure this is the exact right place to post due to the "development" part but I didn't find another better place, so I'd assume it's here.

So, I have a SSD with some OSes on it, and I'd like to move everything that's on it to another SSD.
(The reason is that the first SSD is wasting a SATA port while the other one is on a mSATA one, so I can free a SATA port to have a HDD there).

I guess I have to do some dd stuff but I have some questions.

1) Does it matter that gparted says that the "old" SSD is 119.24GB and the "new" one is 111.79GB ? Will I not have problems copying a SSD to a smaller one ?
2) Do I have to run dd from a USB key (as I said, my OSes are on the "old" SSD, so I'm wondering if it's smart to copy my Arch partition from that Arch...)
3) Actually does anyone have a walkthrough or something ? I'm sure it's really just a matter of dd with the right options but I don't really want to write the wrong options :P

Thanks for reading and potentially helping :)

Streetwalrus

For Linux I would just create new partitions, rsync the fs contents over and fix /etc/fstab. See this.

Juju

Yeah, better do whatever @Streetwalrus said, I think.
Read Zarmina!
YUKI-CHAAAANNNN
In the beginning there was walrii. In the end there will be walrii. All hail our supreme leader :walrii: --Snektron



if you wanna throw money at me and/or CodeWalrus monthly it's here

Streetwalrus

I've already used that method to move my system from my HDD to my fancy new SSD raid0 a while ago though I ended up reinstalling the system because it booted too slow.

Hayleia

Ok for Linux, but what about the Windows partition on that SSD ?

Juju

For that one I'm not sure it would work, but I guess you can copy-paste partitions in gparted. Same for the Linux partitions actually, resize one partition so it matches the other drive's size and copy all of them over with gparted.
Read Zarmina!
YUKI-CHAAAANNNN
In the beginning there was walrii. In the end there will be walrii. All hail our supreme leader :walrii: --Snektron



if you wanna throw money at me and/or CodeWalrus monthly it's here

DJ Omnimaga

I'm not familiar with hard drive backup, data moving and stuff, but a few years ago, I thought that I've heard that in order to backup the content of an hard drive on another, both hard drives needed to have identical disk space. Wouldn't that be the case with SSD's too, if that is true?

Juju

Identical or larger space on the target drive, yes, it still stands with SSDs. But in our case, the target drive is smaller, so it's not that easy. One trick, as explained above, would be to resize a partition (the last one, usually) to match the smaller drive's size. No matter what the size is, you still can clone individual partitions, if I remember correctly, you can do that with gparted, but you'd need some knowledge to pull it off with dd and fdisk.
Read Zarmina!
YUKI-CHAAAANNNN
In the beginning there was walrii. In the end there will be walrii. All hail our supreme leader :walrii: --Snektron



if you wanna throw money at me and/or CodeWalrus monthly it's here

Unicorn

Could you copy the hard drives or SSDs to a raid of smaller storage devices that amount up to more than the old device, though?



??? ??? ??? ??? ???

Streetwalrus

I don't think windows likes being copied over to another drive. It's very sensitive about that stuff.

DJ Omnimaga

Do you mean it keeps in memory the computer hardware serial numbers for each parts and that putting that install on another machine or hard drive could cause Windows to reject the new hardware, or do you just mean that since the hard drive is constantly in use by Windows that a backup might have parts that are outdated by minutes?

Streetwalrus

No, it's just that partitions have a unique ID and that if you mess up the IDs by copying to a different drive, it won't like it. I have no idea how to fix that, on Linux it's a simple matter of editing a config file.

Hayleia

I tried what Juju said and what Streetwalrus said happened -.-
Basically, the old SSD is /dev/sda and the new one is /dev/sdc and Windows only boot when /dev/sda is plugged in, even if I choose the loader on /dev/sdc :(

Would the same happen if I copy that Windows partition with dd ? Because I think I read that gparted used ntfsclone.
Or does anyone have any other ideas or do I have to start from a fresh install of Windows ? -.-

Streetwalrus

The problem is in the partition table, you might be able to hack something up but back it up first.

Hayleia

Well, I don't know what caused that since I tried many things, but my "old" Windows partition ended up kind of broken. Like, it still worked once but there was no audio, when I tried to get to the Realtek manager it said "program can't be found", and when I tried to get to the peripherals manager it said "program can't be found" too o.o
So I just reinstalled Windows. And Arch (but that's less of an issue since my Arch partition wasn't even 1 week old so I really didn't lose anything).

Funny part (not really funny). After I installed the new Windows, I noticed with horror that obviously, all my Firefox bookmarks were gone and I forgot to export them. So I booted one last time to the old Windows partition and it was clearly dying. Unlike last time, it didn't even load the bottom bar, the desktop was all black with no icons and stuff... but Super+R worked and managed to launch Firefox, from where I was able to export my bookmarks, and it was the last time I ever managed to boot that partition (next time it was not even detected by grub). Seemed to me like an adventure where your old partner dies but just before that time, they give you what you need to continue the adventure or something :P

Powered by EzPortal