Skip to content

Migrating from HDD to SSD. Opinions?

As the title states, I'd like to migrate my install from an HDD to and SSD. I was wondering what the best way of doing this would be. I considered imaging the hdd to the ssd and just changing the fstab settings to accomodate the SSD, but this seems kinda messy and I would want to delete the swap partition and resize one of the partitions I have with no data loss. I was also considering a base install plus rsync backup/restore. Then I was thinking about just a base install and install all the packages I have installed already. I have quite a few packages from the AUR installed, however and I was wondering if there is a command similar to Pacman -Q that can tell me all the programs I've specifically installed including AUR packages. And if there is, can I save that to a file and pipe it into yaourt and have it install all the packages I had installed previously?

In your opinion, which is the easiest/most correct way to make this transition.

Thanks. :)

10 points8 comments
Open on Reddit
About this post
Posted
Archived
Score
10 · 100% up
Kind
Text
ID
292cho

Author

23
posts
172
comments
4
media
View profile

10 comments

I have migrated a Arch Linux install from a HDD to a SSD, i used this [wiki page.] (https://wiki.archlinux.org/index.php/Full_System_Backup_with_rsync#With_a_single_command)

If you have /home or another directory mounted on a diffrent drive make sure you add that to the exclude part of the command otherwise it's going to be copied.

Install your bootloader on the SSD and make sure the configuration has the correct UUID of the SSD so you can boot. And dont erase your old install until you can verfiy you are booting from the SSD.

3 points

For getting a list of installed packages (and using said package list) look at this

I can't offer you a whole lot of advice regarding the migration. I got an SSD that was the exact same size as my HDD, and I used dd from the arch ISO to clone one to the other. I've not made any changes to fstab yet, though I should. It seems to work well enough without it.

I did have to change the grub configuration for mine, because it was looking for a device that didn't exist anymore. The alternative is to plug the new disk in where the old disk was connected, so that it initializes with the same identifier (e.g., /dev/sda)

1 points

Generally its better to create a new partition and format the SSD, then do an rsync to copy the files. With dd you are copying unnecessary blocks from the old drive, which will take longer and map the entire lba range of the ssd.

If you do decide to use dd, make sure to run fstrim on the ssd filesystem after its been copied.

2 points

My ssd will be around the same size as the hdd. Is it worth imaging and deleting swap and messing around with the fstab? Im on a laptop by the way

1 points

I want to say that cloning from an image of a smaller partition to a freshly created larger partition of the same type using dd if=/path/to/img of=/dev/sda1 (for example; /dev/sda1 might be something different for you.) results in a larger partition containing everything the smaller partition did. I might be wrong, so please double-triple check that.

if nothing else, mounting the image and the new partition to a temporary path and using something like rsync would definitely do the trick.

You would still need to change fstab and anything else that might be relying on information about your disks that has changed, in either of those cases.

I should clarify from my earlier post that I did not make any specialized changes in fstab to optimize it for being an SSD. I think I still had to change it to reflect a new UUID and such.

1 points

I have changed my HDD to SSD and I bought a 512 GB SSD. My previous HDD was 500 GB so the SSD was a bit larger.

What I did and it worked successfully. I had an USB enclosure lying around so I connected that and booted with arch live USB. Used dd to clone the entire disk (was done overnight so dont know how long it took and didnt bother to look too), generated new unique UUIDs for my partitions and then changed the UUIDs in fstab. Boom. No need to fiddle with any of your swap or anything if you have same size of higher size SSDs. It may not be the best method for cloning to a smaller SSD.

1 points

rsync or tar would work well too. Something like:

mkdir /newroot
mount /dev/ssd /newroot
rsync -a --exclude /newroot / /newroot
1 points
unknown author2 hidden

i would recommend extending the exclude to something like this

--exclude={'/dev/*','/proc/*','/sys/*','/tmp/*','/run/*','/mnt/*','/lost+found'}

i read that somewhere in the context of using rsync when doing root-backups, might be a good idea here aswell.

3 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.