You are not logged in.

#1 2018-03-10 18:07:41

Annoyingduck
Member
Registered: 2016-08-02
Posts: 179

[SOLVED] Migrating My Entire Installation To Another Computer

I currently have a Dell Optiplex 7010 with an i3-3220 UEFI w/only Arch XFCE installed.  The unit I'll be moving to is a Lenovo M83 i5-4570 UEFI. The hardware is different, but the drivers/modules "should" be similar with those Intel chips. Both only have the onboard Intel HD graphics. Can I simply pop the original SSD disk from the Optiplex into the Lenovo, arch-chroot in from a live usb and reinstall grub to register the boot with the UEFI nvram?  I'm also guessing I'll need to rename the PC, but the UUID's should remain the same correct? The Wiki goes into copying/cloning drives, but I'm not seeing much on actually using the original drive in another computer.

I'm not sure if the method I just described is correct - seems logical. Any help/guidance on a preferred method would be helpful, as I'd rather not do a complete fresh installation.  Thanks.

Last edited by Annoyingduck (2018-03-10 20:40:49)

Offline

#2 2018-03-10 18:38:13

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] Migrating My Entire Installation To Another Computer

Sounds good to me. There's no need to even change the hostname if it won't conflict with another device on the network.

You will probably also need to rebuild your initramfs for the new hardware, you can do this either whilst chrooted in and setting up the nvram or by booting the fallback image and doing it from the newly running system.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2018-03-10 18:48:12

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: [SOLVED] Migrating My Entire Installation To Another Computer

It wouldn't even matter if the hardware was completely different.  Generally you can just swap a disk between machines with no problem at all except for 2 points: 1) you might need to use the fallback initramfs for the first boot, but then you can just rebuild the initramfs with mkinitcpio and that'll be good from then on, and 2) you *may* need to do a boot loader step as you mention for UEFI systems (on BIOS systems you wouldn't need to do any such steps) - but I doubt this is needed.  If the disk has a properly labeled EFI partition, that should be all that's necessary (but I don't have much experience with UEFI).

Last edited by Trilby (2018-03-10 18:49:01)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2018-03-10 18:54:57

progandy
Member
Registered: 2012-05-17
Posts: 5,190

Re: [SOLVED] Migrating My Entire Installation To Another Computer

I believe UEFI boot will work without setting up the bootloader if you have a copy in the default location (esp/EFI/BOOT/BOOTX64.EFI). The wiki mentions the --removable option for grub-install
https://wiki.archlinux.org/index.php/GR … allation_2


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#5 2018-03-10 19:03:38

Annoyingduck
Member
Registered: 2016-08-02
Posts: 179

Re: [SOLVED] Migrating My Entire Installation To Another Computer

Cool, thanks for the advice.  I definitely forgot about rebuilding my initramfs as a step. I'm gonna try this out later today or tomorrow.  I'll attempt to boot fallback mode directly without chrooting/reinstalling Grub after moving the SSD to the new computer and see if it just works out of the box, then troubleshoot from there.  I'll post back my results when I'm done.

Offline

#6 2018-03-10 20:40:05

Annoyingduck
Member
Registered: 2016-08-02
Posts: 179

Re: [SOLVED] Migrating My Entire Installation To Another Computer

@Slithery @Trilby @progandy Thanks for your suggestions.  I've never installed a current running Linux disk from one computer to another before and I can't get over how easy this was. In the past I've tried it with Windows, and well I'm sure you can guess how that went! Anyway as I thought, boot could not be achieved by simply installing the disk and attempting to boot because the computer's UEFI bios does not know that there are any boot devices because nothing is stored in the NVRAM (No Boot Device Error). I just booted the usb, chrooted into the installation, and reinstalled grub.  Then I updated the initramfs for both my Linux and Linux-LTS kernels and regenerated a grub.cfg.  Shut down the live usb, and powered on the Lenovo and BAM......booted right up into my desktop!!  I then changed the hostname and all is well in the world. I'm again just amazed at how easy that was.  Marking thread as solved.

Offline

#7 2018-03-10 20:56:11

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] Migrating My Entire Installation To Another Computer

I'm glad it worked smile

Just for reference Windows detects all of the important hardware (mobo, chipset, controllers etc) on installation and only installs the required drivers; along with being license-locked to that hardware configuration this is the main reason that moving Windows installations between hardware is so problematic.

On the other hand, Arch (and Linux in general) has modules for all available hardware installed as part of the kernel package. The default initramfs only contains modules for hardware that was attached last time mkinitramfs was run whereas the fallback initramfs will auto-detect all attached harware and load the required modules.

Some distros don't have different initramfs's, just the equivalent of Arch's fallback image meaning migrating to new hardware would have been even easier (at the expense of slower boot times due to the more comprehensive image).


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#8 2018-03-19 14:30:45

Stencon281
Member
Registered: 2016-09-21
Posts: 40

Re: [SOLVED] Migrating My Entire Installation To Another Computer

Slithery wrote:

I'm glad it worked smile

Just for reference Windows detects all of the important hardware (mobo, chipset, controllers etc) on installation and only installs the required drivers; along with being license-locked to that hardware configuration this is the main reason that moving Windows installations between hardware is so problematic.

On the other hand, Arch (and Linux in general) has modules for all available hardware installed as part of the kernel package. The default initramfs only contains modules for hardware that was attached last time mkinitramfs was run whereas the fallback initramfs will auto-detect all attached harware and load the required modules.

Some distros don't have different initramfs's, just the equivalent of Arch's fallback image meaning migrating to new hardware would have been even easier (at the expense of slower boot times due to the more comprehensive image).

So migrating the arch distro on my laptop to my desktop shouldn't be much of a hassle?

What kind of speed bumps are to be expected?

Offline

#9 2018-03-19 14:35:07

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,772

Re: [SOLVED] Migrating My Entire Installation To Another Computer

Stencon281 wrote:

What kind of speed bumps are to be expected?

Graphics cards.  Names of Network Devices.  Maybe keyboard scan codes.  Little things -- My laptop has a daemon that monitors G sensors to detect if the laptop is in free fall so it can park the disk heads propr to impact.  If the new machine is a desktop or uses an SSD, not much point.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB