Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

Best method to transfer to new laptop

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
15 posts • Page 1 of 1
Author
Message
jserink
Veteran
Veteran
Posts: 1037
Joined: Fri Jan 30, 2004 7:57 am

Best method to transfer to new laptop

  • Quote

Post by jserink » Mon May 11, 2026 2:35 am

Hi All:

What is the suggested best method to transfer my current system to a new laptop?
I have used the dd in the past but was made aware that its sort of a "blunt" way to do it.
Any suggestions on this?

Cheers,
John
Top
Banana
Administrator
Administrator
User avatar
Posts: 2524
Joined: Fri May 21, 2004 12:02 pm
Location: Germany
Contact:
Contact Banana
Website

Re: Best method to transfer to new laptop

  • Quote

Post by Banana » Mon May 11, 2026 5:42 am

dd just copies "everything" and you have a copy which likely does not match your new hardware. Which means, if you have the exact same hardware again, you can use dd.

I'm guessing the new laptop does also have new hardware. In this case it can be simpler to install it from the start and then copy over your data (your home folder and usage data from other applications.). Done.
Forum Guidelines

PFL - Portage file list - find which package a file or command belongs to.
My delta-labs.org snippets do expire
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56264
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

Re: Best method to transfer to new laptop

  • Quote

Post by NeddySeagoon » Mon May 11, 2026 9:07 am

jserink,

Cheat :)

Do a new install but before you update @world copy over /home, /etc/portage and your world file.

Change the content of /etc/portage to suit your new hardware.

Now emerge -e @world to rebuild all your installed applications in their new home to match the new hardware.

When you add your normal users, make sure they have the same userIDs on both systems.
if you don't want to rotate your passwords *carefully* copy the /etc/shadow entries for your normal users from the old system to the new one.
You should really rotate credentials though.

dd does a block by block copy, so incurrs one write cycle for used and unused space on SSD. With modern Flash storage, it probably won't matter but in general, it's a bad thing.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
Hu
Administrator
Administrator
Posts: 24556
Joined: Tue Mar 06, 2007 5:38 am

Re: Best method to transfer to new laptop

  • Quote

Post by Hu » Mon May 11, 2026 1:37 pm

Another reason to discourage dd is that since it copies everything, it can be much slower than necessary. If your old system has only 25% of its disk space currently used, a file-aware copy can copy that 25% and skip the 75% of empty space. dd will copy the used 25% and the unused 75%, so even if you don't mind the unnecessary writes to the new storage, you wait much longer than necessary.

As another alternative, if we assume that your new hardware is a superset of what your old system actually uses[1], and we assume you prioritize getting the new system up as soon as possible, then you could make the filesystems on the new system, boot the old system in a read-only state, then rsync all the files over from the old. Be very careful with your rsync options, to avoid inappropriate permissions changes, unintended disconnection of hard links, and so on. This requires a bit of thought up front, but the upside is zero required rebuilds on the new system.

[1]: This depends on whether the CFLAGS of your old system allow the compiler to use any features that the new system does not offer. I believe I have seen references to some recent AMD CPUs deliberately dropping features that were available in AMD CPUs offered a few years prior. I don't know if Intel has done the same. If you're switching from AMD to Intel or vice versa, the risk of incompatibility is even higher. If in doubt, go with Neddy's approach instead. If you want to pursue this route, tell us your old CFLAGS and as much as you can about the old and new hardware.
Top
figueroa
Advocate
Advocate
User avatar
Posts: 3061
Joined: Sun Aug 14, 2005 8:15 pm
Location: Edge of marsh USA
Contact:
Contact figueroa
Website

Re: Best method to transfer to new laptop

  • Quote

Post by figueroa » Mon May 11, 2026 4:52 pm

If computer 2 is very different from computer 1, you may just have to rebuild everything anyway. Therefore, a fresh install may be the easiest. Otherwise;

Restore a current back from computer 1 to computer 2.
Reconfigure kernel if necessary, i.e. using gentoo-sources. If using a binary kernel, it may just work.
Make other configuration changes needed to new partition layout in /etc/fstab, and /etc/conf.d/net if needed.
Install boot loader.
Reboot; enjoy.

I do this all the time between machines with identical or very similar hardware. Note: If you haven't mastered the backup/restore routine, you should work on that.
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi -wayland
Top
saturnalia0
Apprentice
Apprentice
User avatar
Posts: 185
Joined: Thu Oct 13, 2016 3:09 am

Re: Best method to transfer to new laptop

  • Quote

Post by saturnalia0 » Mon May 11, 2026 10:53 pm

I recently changed MOBO and CPU which is somewhat similar, but I kept the drives. Sounds like you'll not keep the drives. In this case a fresh install as suggested above is probably the best option. If you or anyone reading this intends to keep the drives though, here is an alternative approach: viewtopic.php?t=1177300
Top
rab0171610
l33t
l33t
Posts: 761
Joined: Sat Dec 24, 2022 1:41 am

Re: Best method to transfer to new laptop

  • Quote

Post by rab0171610 » Tue May 12, 2026 3:33 am

I feel like this is maybe not a popular answer, especially in highly configurable Linux distribution circles such as with Gentoo and/or Arch communities. I don't expect you will do this but I want to put it out there for the permanent record in case any users on the web, even if they are not Gentoo users, stumble across this conversation.
I personally use Timeshift. It is now maintained by Linux Mint, I maintain my own ebuild in my local repository. It is really just a frontend for rsync, which the command used under the hood.
Timeshift can back up (i.e. create a copy of) the entire system on a separate drive, home directories (if selected) and root. The drive for the backup can also be an external USB drive or removable media. By default, It will skip necessary and temporary files and directories (i.e. "/dev/*", "/proc/*", "/sys/*", "/media/*", "/mnt/*", etc.) Linux Mint includes timeshift on their live install media. I then boot using that media, create my partitions on the new disk and then do a Timeshift restore to the new drive. Timeshift has a graphical interface but also a command line interface that works just as well. A Timeshift restore will automatically update the restored system's /etc/fstab to reflect the new UUID's of the new partitions. If the hardware is completely different I may use a gentoo install media to chroot into the system and make any adjustments and rebuild the system as needed. This may also include editing make.conf for the new system, any updates or rebuilds, modifying any configuration files, and/or rebuilding the kernel, updating grub, etc. Most of the time this is seamless and results in the least amount of direct hands on work for me.
Everyone has a different approach. I have found this method to provide good reliable results, time after time.
I think Timeshift is an overlooked application that many assume is geared only towards inexperienced users (newbies) and those with little Linux skills or knowledge. Over the last 25+ years, I have used everything from Clonezilla, dd, and rsync (rsync -axHAWXS --numeric-ids --info=progress2). Timeshift has always been the easiest and foolproof of all the methods and I use it as a backup solution on all of my systems. If I wasn't using Timeshift, my next peferred option is creating the new partitions on the new drive and then using the previous rsync command (with the options) to copy the entire contents of an existing offline partition to the new partitions, one at a time. I usually take the system offline to do this by using a live media or when possible remove the drives to a separate system.
As a side note, I could be wrong but I believe Timeshift was originally created by TeeJeeTech before it was turned over to the Mint Linux team for further development. If that is correct, I believe teejee is now a developer of ZenLake OS, a distro originating from India which was just added to Distowatch this past week. As I have always loved Timeshift utility since I discovered it, I always wondered about this person that created it, Teejee. And then by chance I happened to notice the new addition of ZenLake OS on Distrowatch this week. Upon reading about it, I noticed that that distro's homepage is hosted on teejeetech.com. Anyways, a shoutout to TeeJee, whoever you are.
Top
pietinger
Administrator
Administrator
Posts: 6848
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

Re: Best method to transfer to new laptop

  • Quote

Post by pietinger » Tue May 12, 2026 11:17 am

rab0171610 wrote: Tue May 12, 2026 3:33 am [...] I personally use Timeshift. [...] It is really just a frontend for rsync, which the command used under the hood.
[...] Timeshift has a graphical interface [...]
Luckybackup was something similar and also used rsync; I used it as my backup program until it was discontinued. Since then, I've been using rsync directly. What framework does the Timeshift graphical interface use? (QT, GTK)
https://wiki.gentoo.org/wiki/User:Pietinger --> New at Gentoo
Top
rab0171610
l33t
l33t
Posts: 761
Joined: Sat Dec 24, 2022 1:41 am

Re: Best method to transfer to new laptop

  • Quote

Post by rab0171610 » Tue May 12, 2026 5:21 pm

pietinger wrote: Tue May 12, 2026 11:17 am Luckybackup was something similar and also used rsync; I used it as my backup program until it was discontinued. Since then, I've been using rsync directly. What framework does the Timeshift graphical interface use? (QT, GTK)
It uses gtk The command for the graphical interface is timeshift-gtk. However, it has a command line interface that works wonderfully and has simple syntax. The gui is nice but is not really necessary, which makes it easy to operate outside of the desktop environment. By default it uses cron but I have systemd timers instead. I use it with ext4. What I like about it is that the backups are in dated directories on, in my case, a separate drive. I usually keep ten and can just manually restore or inspect individual files from it if necessary, rather than doing a complete restore. This gives me freedom to experiment or test software or updates and I can easily roll back. This is probably similar to btrfs except that I can actually browse through the back up files. I can also compare with diff to see what has changed in an updated file since 3 days ago. I have also installed another distro over my Gentoo on the rare occasion I wanted to see what it was like on real hardware. I then booted a live media, deleted everything on the partitions using a simple "rm"(to avoid issues), and did a restore and had my Gentoo back the way it was on the last backup. I just like the convenience of knowing I have duplicate copies of my Gentoo drive for the last ten days or so. It provides a peace of mind.
Also, it is great for doing a restore on a newly partitioned disk. As I said before, I can chroot in to modify the newly copied but pre-existing Gentoo to work with the different hardware on the new machine and rebuild what is necessary.
The ebuild in in GURU. I posted about this previously, and grknight helped me with the solution. . . I disabled the x11-libs/xapp
dependency in my own ebuild (it should only be useful in Cinnamon, Mate or a Linux Mint installation):

Code: Select all

src_configure() {
        local emesonargs=(
        -Dxapp=false
)
Also, to note, Timeshift does not backup home directories by default but can be set to do so. Directories can be explicitly included or excluded. Configuration options (done through the gui) is stored in simple .json files and can edited manually.
Top
pietinger
Administrator
Administrator
Posts: 6848
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

Re: Best method to transfer to new laptop

  • Quote

Post by pietinger » Tue May 12, 2026 8:35 pm

rab0171610,

thank you very much for your detailed answer! :D ... Maybe someone reads this and think it would be nice to have it in our repo (our guru) ...
https://wiki.gentoo.org/wiki/User:Pietinger --> New at Gentoo
Top
rab0171610
l33t
l33t
Posts: 761
Joined: Sat Dec 24, 2022 1:41 am

Re: Best method to transfer to new laptop

  • Quote

Post by rab0171610 » Wed May 13, 2026 4:31 am

You are most welcome. I forgot to mention that it also supports btrfs snapshots. According to the Arch wiki,
Configuring btrfs snapshots - Timeshift requires a flat Btrfs layout with subvolumes for / and optionally /home being named as /@ and /@home."
That wiki page provides extensive information for anyone that is curious and wanting to know more:
https://wiki.archlinux.org/title/Timeshift
Top
figueroa
Advocate
Advocate
User avatar
Posts: 3061
Joined: Sun Aug 14, 2005 8:15 pm
Location: Edge of marsh USA
Contact:
Contact figueroa
Website

Re: Best method to transfer to new laptop

  • Quote

Post by figueroa » Wed May 13, 2026 5:33 pm

Timeshift is available in the guru repository:

Code: Select all

$ eix /timeshift
* app-backup/timeshift [1]
     Available versions:  ~23.07.1 ~25.12.4
     Homepage:            https://github.com/linuxmint/timeshift
     Description:         A system restore utility for Linux

* app-backup/timeshift-autosnap [1]
     Available versions:  ~0.9-r1
     Homepage:            https://gitlab.com/gobonja/timeshift-autosnap
     Description:         Automatically creates a timeshift-snapshot when executed

[1] "guru" /var/db/repos/guru
The backups, which are not compressed, take a lot of space. I use a variety of homegrown scripts that use tar to output zstd compressed tar archives which can then be restored in whole or in-part locally or to other computers. My scripts and others similar can be found here by searching for stage4.
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi -wayland
Top
rab0171610
l33t
l33t
Posts: 761
Joined: Sat Dec 24, 2022 1:41 am

Re: Best method to transfer to new laptop

  • Quote

Post by rab0171610 » Wed May 13, 2026 10:03 pm

figueroa wrote: Wed May 13, 2026 5:33 pm The backups, which are not compressed, take a lot of space. I use a variety of homegrown scripts that use tar to output zstd compressed tar archives which can then be restored in whole or in-part locally or to other computers. My scripts and others similar can be found here by searching for stage4.
That is true. The number of backups you are able to keep is limited to the space you have. Each of my Gentoo laptops has a 1TB NVME drive dedicated to Timeshift backups. So for me, it is not really an issue. For many people, 1 complete relatively recent copy of their root partition minus temp files and populated directories like /sys and /dev is enough to be able to roll back in case of disaster or drive failure. Or in some cases restore a single configuration file. As timeshift saves only the root partition and not the home directories by default, many people easily have room somewhere to save up to 5 rotating uncompressed root partition backups for the average binary distro. My current Gentoo root partition is 58GB and my Debian root partition is 11GB. Obviously, with source distros like Gentoo, there is additional overhead in the build environment. Investing in additional storage media was an investment but for me it is worth it for the peace of mind.
Compressing and archiving the uncompressed backups is definitely a good option for those that need to do so. The compressed backup can always be uncompressed before a restore operation, which is something that under ideal circumstances should rarely need to be done.
Top
b11n
Guru
Guru
User avatar
Posts: 345
Joined: Wed Mar 26, 2003 8:15 am
Location: New Zealand

Re: Best method to transfer to new laptop

  • Quote

Post by b11n » Wed May 13, 2026 11:35 pm

so many reasons not to use `dd`. A few that don't seem to have been covered:
• dd won't notice filesystem corruption on the source volume, so neither will you. The copy will complete successfully, you'll hit it later, and not know what to suspect. There's never a good time to find out about FS corruption, but the best time is now, not later. If you're going to read every file anyway, you may as well validate the tree while you're at it.
• dd is so low level it preserves even fragmentation. Why would you want that.
• dd really only make sense on identically sized partitions. Yeah, some FS's will let you grow it after, but why bother?
• not trivially resumable if you have to interrupt the process
• fat-fingering the destination partition will be consequential, and it seems to happen to people often enough. Making the same mistake with mounted FS's will probably just result in a directory or ten that can be easily deleted, and at least mk*fs will squeak if the destination appears to already contain a filesystem, or is mounted. dd will just bulldoze it.
• (Gentoo specific) no option for screeds of busy terminal output during the operation like in the movies
Do you want your possessions identified? [ynq]
Top
Zucca
Administrator
Administrator
User avatar
Posts: 4825
Joined: Thu Jun 14, 2007 10:31 pm
Location: Rasi, Finland
Contact:
Contact Zucca
Website

Re: Best method to transfer to new laptop

  • Quote

Post by Zucca » Thu May 14, 2026 7:20 am

My method has quite often been
  • edit /etc/portage/make.conf, set -march=x86-64 in *FLAGS
  • emerge -e @world
  • move the hard drive to a new computer
  • Boot new computer, and adjust /etc/portage/make.conf
... This of course, if you plan to keep the hard drive.

I've also done The cheat method mentioned by Neddy. It let's you perform new partition scheme easily.

Sometimes I just start a new Gentoo install on the new computer, and after first boot I run rsync to transfer files I need from the old computer.

I'm also going to switch my laptop soon, so I'll need to perform similar task too. In my case I need to switch from arm64 to amd64.
If you're in similar situation, ie. switching to a completely different CPU architecture, the first method I mentioned won't work. In fact It only works with amd64 -> amd64 transfers.
..: Zucca :..

Code: Select all

0100100100100000011000010110110100100000
0100111001100001010011100010000100100000
0100100100100000011000010110110100100000
0110000100100000011011010110000101101110
00100001
Top
Post Reply

15 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Authors
Gentoo is a trademark of the Gentoo Foundation, Inc. and of Förderverein Gentoo e.V.
The contents of this document, unless otherwise expressly stated, are licensed under the CC-BY-SA-4.0 license.
The Gentoo Name and Logo Usage Guidelines apply.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy