1

I want to setup a Linux environment, but I want the system to be bootable in two or more computer systems with different sets of hardware.

  • Can Linux provide that level of hardware abstraction given that computers are based on the same architecture (x86 64-bit) ?

I suspect that if I have one compatible kernel for each machine, it could boot successfully.

  • Does the Debian OS architecture support that feature? How can I do it?
  • Depends on the differences beween the hardware: BIOS or UEFI would be the biggest hurdle, but graphics and networking may also prove stumbling blocks... – jasonwryan Feb 17 '16 at 15:57
  • I'd imagine compiling-in or compiling modules-for both sets of hardware. Assuming you're moving the hard drive back and forth? – Jeff Schaller Feb 17 '16 at 15:58
  • So long as you keep the configuration to a minimum and rely on the kernel to load the right firmware, use UUID for drives, it should work. Sequentially numbered devices can make problems (eth0 vs eth1 e.g.) but overall this works. Maybe consider using a dedicated live distro with persistence support. – kba Feb 17 '16 at 16:39
  • The drivers are in the kernel so as long as you are using linux compatible hardware. Best example is the "live CD" , more often used on a flash drive these days. One iso / kernel boots on multiple machines. – Panther Feb 17 '16 at 16:59
  • @JeffSchaller Yes that is my use case. How do I compile the kernel for the second computer? – Mini Fridge Feb 17 '16 at 17:11
0

The short answer is yes.

As long as the processor architecture is the same (x86_32, x86_64, etc.), an installation will for the most part run anywhere. There are only three difficulties in practice:

  • You need to have the right drivers available at boot time. The best way to ensure this is to stick with your distribution's kernel: if you compile your own, the risk is pretty high that you'll accidentally miss a driver.
  • The bootloader needs to work. On PC hardware that's generally not an issue. Just use Grub and make sure that the configuration doesn't hardcode device names.
  • Proprietary video drivers are unfriendly and tend to install some files that make it impossible not to use them. Last I looked, this was the case for both ATI and NVidia proprietary drivers. Free drivers are fine. So stick to the free video drivers, and don't use fancy 3D effects which the free drivers don't support.

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.