What could possibly prevent me from detaching my current hard disk from the laptop and buy a new laptop, install the disk and resume from where I left? In other words, what prevents my current Debian 9 installation from being counted as portable?

  • If Grub entries are using solid references (UUID is the correct solution instead of /dev/sdaX or (hd0,1))
  • If the new laptop's CPU architecture supports my installation (x64 in this case)

The new laptop should boot up (and is booting in my case).

Drivers might be missing in the worst case, but my intention is creating a script called switch-to-new-hardware.sh which will install:

  • Graphics card driver (if it can, if needed)
  • NIC (eth, wifi) card driver(s) (if needed)
  • Sound card driver
  • ...

What should be taken into account while switching to new hardware?

  • You need to know upstream kernel actually ships with almost every driver you need and udev will create a beautiful /dev for you without your concern. Sep 1, 2018 at 8:31
  • 2
    I came across this question as it's now being used as a dupe target. Having read both the questions and answers, I disagree that the question should have been closed as primarily opinion-based. I can see that there is the possibility of answers making generalisations based on the anecdotal experiences of individual users. However, only one of the three current answers does this . The other two answers provide useful specific, information and are not almost entirely based on opinions. The question itself is asking about a valid use case that will be helpful to other users. Sep 19, 2019 at 11:48

2 Answers 2


Lots of tiny details, if your grub works fine (which is easy to solve but has a huge direct can't boot impact).

If you use default settings for boot processes, then usually you're fine, since udev will load proper drivers for all kinds of devices, except for those super uncommon ones(not having a kernel driver installed on the disk).

Xorg need some sort of user mode DDX drivers provided by xf86-video-xxx, which is not installed for new graphic card.

The real hard to solve problem is configurations for upper layer applications, like you has a script with hard coded device names. Camera apps use hard coded camera device name. Network service use hard coded device names which doesn't exist any more or you no longer use wireless network anymore etc. Your IP changed, so some internet services may refuse to accept your cookies and require you to re-login.

Anyway, I think if you use default distro settings and successfully boot on your new computer, and Xorg works fine, you can shot not working anymore problems one by one, don't need to solve them until you find them.

PC is made of so many different parts mamufactured by so many companies, there's no neat solution to write a script to switch to new PC. You need to use portable configuration as possible to make your OS portable. That's how PC OS is designed.

  • If my applications don't written in such a portable way, yes, they might be broken on new hardware. I'll take those into account.
    – ceremcem
    Sep 1, 2018 at 17:32

Beside what you have already mentioned, one which comes to mind is: an "initramfs" generated specific to your old laptop which does not contain all necessary stuff to boot any other system that might prevent you to just attach your disk to a new system.

But it's a rare case and if you have installed Debian using default options your "initramfs" is generic and contains all necessary elements.

or a customized Kernel for specific hardware which lacks drivers and modules to properly run all possible hardware.

  • +1 for mentioning potential optimized kernel issue, but there is either won't happen such a case or will be kept a generic kernel for such situations.
    – ceremcem
    Sep 1, 2018 at 17:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.