Moving OS install to another laptop

I will soon (in about 2-3 weeks) be moving to another laptop with a different hardware.

Currently, I have a hybrid Intel/Nvidia laptop and I will be moving into a full AMD laptop (AMD CPU, AMD dGPU, AMD Wifi, Bluetooth, Ethernet)

My plan is:

  • Plug in the SSD with the current Manjaro OS into a new laptop.
  • Configure boot in UEFI to the Manjaro on the old SSD.
  • If the boot succeeds, it won’t boot into graphic system, but I should be able to switch to TTY.
  • Uninstall optimus-manager in tty (this eventually can be done before moving to a new laptop).
  • Remove graphical drivers via MHWD in TTY and install free ones via MHWD.

This should allow me to boot into the old system., at least in theory. Did I forget something?

I assume that MHWD will take care of any flags and kernel modules.

In the worst case, I can still do a new install, but at least I can try and see if the old one will be working.

Any thoughts?

Hello @michaldybczak,

I guess the new laptop has also an ssd (or similar) and you would further use the new one? If its so I would suggest to do a new install on the new laptop. And when everything runs great you can copy the content of your home-directory to your new laptop and you got a new clean install on the new machine with your old user data. And a Manjaro install only takes around 20 minutes.

And if something doesnt work you still have your old machine to work on.

So if you doesnt change a lot on the system itself on your current machine its my opinion to do a fresh install on different hardware instead of bend the old install to the new hardware. :slightly_smiling_face:

Just my opinion … and what you do is on your turn. :grinning:

4 Likes

If you buy a new laptop, probably will ship a NVMe (better than SSDs).

If you really don’t want to reinstall, better make a system image with Rescuezilla/Clonezilla to an external disk and restore it on the new NVMe, so you maintain the original installation and if something goes wrong with the new laptop, you have another usable computer.

You can try what you want, play with the new installation, install, uninstall and if something fails, restore again and restart.

1 Like

Why not using the probably faster disk of the new laptop?

In case your current SSD is booted in UEFI mode and you use grub as boot loader you could create an ESP on the new laptop (e.g. via GParted from live ISO) and the other partitions you like to use on the new installation.

Then copy the partition currently mounted as / from old SSD (and - if you have - a partition mounted at /home etc.) to the new disk.

Then manjaro-chroot into the copied partition (via live ISO) and restore the bootloader and fix your graphics driver as you proposed already.

Don’t forget to adjust the /etc/fstab settings as the UUID’s could differ. It’s also worth to double check /etc/default/grub if you have made changes considering your current graphics device.

When you could first time boot into the new disk I would recommend to fully udate the system and to restore the boot loader again to get latest grub version being fully implemented.

2 Likes

AFAIK it shouldn’t stop you from booting but you’ll need to change microcode.

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

2 Likes

Just to add my 2 cents:

You can install microcode packages for both Intel and AMD on the same system, without any negative effects. I did this for years with another distribution that I frequently moved from one machine to another (in a portable caddy).

If you insist on moving the same SSD to the new machine, it should do no harm to install the amd-ucode package before the move.

That said, the better/easiest solution has already been mentioned; in post#2, for example; perform a new install, and then restore your user profile(s).

3 Likes

Thanks to all for your input. Here are my replays.

The new laptop comes with 1TB NVMe, but on the old one, I’m using 2TB NVMe that I bought 2 years ago. Since the new laptop have two NVMe slots, I am planning to move the 2TB one to the new laptop and re-use 500MB one on the old laptop (the one I had before 2TB one).

It’s hard to tell if the new NWMe on the new laptop will be faster or not. If there are differences, I don’t think those are big ones.
I could buy a new laptop with 2TB already, but that would cost 150 EUR more and since I already have one on the current (old) laptop, I decided to use it, instead of buying a new one.

Thanks, didn’t know that. I will definitely look it up.

I assume that MHWD scripts will update the graphic hooks on GRUB, but if not, I will fix it manually. Since there will be a default NWME already in the new laptop (so I’m plugging in a second one from the old laptop) and HDD from the old one will be gone, I will certainly need to update UUIDs.

I have several times used external hard disk to boot same manjaro from different computers and i never had to do anything specific to that. Only thing that comes to mind is to uninstall nvidia drivers unless you are using nouveau.

My experience is the same, that is, if the computers/laptops have the same CPU and dGPU configuration, one can move disc with OS between those without much issue. That wouldn’t work with Windows, but since Linux have most drivers in the Kernel, it makes it more portable.

However, since I’m moving to a different hardware configuration, I created this topic, to check, if I thought of all interventions to adjust the OS to it.

well, in my experience not even moving from older intels to latest amd (many years ago) caused any issues. So the microcode issue mentioned earlier does not seem that important.

I checked the crucial files and here is what I found:

/etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash loglevel=3 udev.log_priority=3 vt.global_cursor_default=0 resume=/dev/sda4 resume_offset=1363968"

resume=/dev/sda4 - is for my HDD on the old laptop. I don’t remember if I added for something specific or if it was added automatically, but this has to go for the new laptop.

I’m also not sure what resume_offset=1363968 does. Should I get rid of it too?

/etc/fstab

tmpfs	/tmp	tmpfs	defaults,noatime,mode=1777	0	0
/dev/disk/by-uuid/05f58c13-0021-44f7-abc9-05a091c4535b	/mnt/05f58c13-0021-44f7-abc9-05a091c4535b	auto	nosuid,nodev,nofail,noatime,x-gvfs-show	0	0
UUID=6f363872-d712-4728-920d-043fb9e3a885	/home	ext4	nosuid,nodev,nofail,noatime,x-gvfs-show	0	0
/swapfile	none	swap	defaults	0	0
/dev/disk/by-uuid/3d3bc3be-74d2-439d-8d1b-8b670faa9e05	/mnt/home-hdd	auto	nosuid,nodev,nofail,x-gvfs-show	0	0
UUID=05f58c13-0021-44f7-abc9-05a091c4535b	/	ext4	defaults	0	0

This will need to be updated. I will remove /mnt/home-hdd and add the 1TB NWMe that comes with the laptop instead. I wonder if I will need the swapfile. I will leave it for a while and see if it is being used. On the old laptop, I have 8GB of RAM and had to add a dynamic swap, which resolved my previous issues with the computer being frozen, when too much RAM was used. The new laptop will come with 32GB of RAM, so the swap will probably be idle.

/etc/mkinitcpio.conf

HOOKS=(base udev autodetect modconf kms keyboard keymap block filesystems fsck)

Seems all right to me. No need to change.
Nvidia modules are invoked by mhwd config, but that will change, when I re-install graphics with MHWD.

I add amd-ucode and it all should work fine. If not, I will do a fresh install, but first I want to try out the old installation.

Again, thanks for all your help! :slight_smile:

I would recommend to rather use the UUID than a block device name.

This is required if you use a swap file.

Reference:
https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#About_swap_partition/file_size

Here you should add the resume hook if you want to hibernate to disk.

Reference:
https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Configure_the_initramfs

2 Likes

Because it can change? I agree, but it hasn’t in a many years so far. Anyway, it should be:

resume=UUID

or some other form?

Thanks. So if I remove swap, this should go away as well. Good to know.

Thanks. Didn’t know why hibernate doesn’t work, but I assumed, it had something to do with the low amount of current RAM (only 8GB), so I relied on suspending.

I probably add this on the new laptop.

Thanks again!

My installation has survived 3 different laptops. I’ve found out that microcode and drivers don’t really matter for hardware that doesn’t exist, i.e.: it doesn’t hurt to have Intel microcode on an AMD CPU as well as Nvidia GeForce driver on an AMD GPU, they simply won’t load.

So, my fastest route so far is to use CloneZilla instead. I just blatantly copy the drive bit by bit, with fsck later expand the partition if necessary (i.e. the new drive has larger capacity). Then just boot, see what can be uninstalled and what can be installed to improve things. AMDGPU driver should be in kernel, no need to install. amd-ucode to replace intel-ucode. That’s all I guess, everything else remains the same.

1 Like

Here is the syntax. Get used to use Archlinux wiki. Certainly, if unclear you can always ask here. :innocent:

2 Likes