Installing a new hard drive

I want to transfer my set up to a new hard drive (to be then installed in the same machine). I’m following https://wiki.archlinux.org/title/Migrate_installation_to_new_hardware#Top_to_bottom as my main guide. Top to Bottom approach using file copying as my transfer method (rsync).

The thing is, I’m only replacing the hard drive and I’m having a bit of trouble extracting the steps I actually need to carry out from those that are relevant to a completely new machine. I wonder if anyone can help me with some clarifications…

The guide says

For each filesystem, copy the files from the old to the new drive, using rsync or other tools that preserve permissions, attributes, etc., see rsync#Full system backup, rsync#File system cloning for further details.

…and following the link we get

This essentially provides a way to convert any root file system to another one.

So I assume rsync deals with everything under / ? That leaves /boot/efi un-transferred (the contents of swap are transient so we can ignore that, right?)

So I assume that’s what’s going on when it says

It is possible to do a successful file system migration by using rsync as described in this article and updating the fstab and bootloader as described in Migrate installation to new hardware.

I get the fstab bit, so that’s not a problem.

So we go to the bootloader bit and I start to get confused. First it says

You might need to reinstall and/or reconfigure the boot loader

Might need to? Presumably the /boot/efi on the new drive is completely empty, I haven’t done anything except create it. How is this a case of possibly needing to re-install? So have I missed a step?

Then things fall apart. We just get

Refer to the article on your boot loader for instructions on how to (re)install it.

but https://wiki.archlinux.org/title/Arch_boot_process#Boot_loader seems to my untrained eye to be a description of the different bootloader options and how they work. I can find anything which looks, to this layman, like a set of instructions on how to (re)install it.

Seems I’ve got lost somewhere…

Have you considered the option to clone the disk/partitions?

https://wiki.archlinux.org/title/Disk_cloning

Please do some research to determine which procedure might serve better your purpose.

2 Likes

I did have a look at that, but I read (from the article)

Over time file systems get new features and the mkfs utilities change their defaults, but not all new features can be enabled without reformatting. So, when moving data to a new drive, instead of cloning the block devices or file systems, consider creating a new file system and only copy the files (and their attributes, ACLs, extended attributes, etc.) with e.g. rsync.

So I assumed rsync was a better option.

1 Like