I don't own a 286 nor do I intend to run Linux on one. However since the 286 has protected mode, why is it frequently stated that Linux requires a 386 CPU or higher?

From http://tuxmobil.org/286_mobile.html it seems that the ELKS version of Linux can run on a 286, is this correct? What (if any) modifications have been made to allow the kernel to run on the 286 CPU?

Now obviously I understand that a kernel compiled for a 386 cannot execute on a 286 CPU, which is 16-bit. So my question is, why cannot the standard Linux kernel be compiled for a 286, and then executed on a 286? Does Linux require hardware VM86 support?

Minix ran on 8086 (8 bit, 128KiB RAM IIRC). Microsoft's Xenix did run on 80286. Some demented soul tried to shoehorn Linux into 8086 too (with some success). But no, the "full Linux experience" won't be possible on such a limited machine.
–
vonbrandJan 15 '13 at 14:42

You can shoehorn Linux to run on very limited devices. But this is not going to be very useful as an e.g. desktop machine. Unless you state your goals it's hard to tell if 'Linux on 286' is viable for you.
–
9000Oct 28 '14 at 13:42

As the original implementation of the 32-bit extension of the 8086
architecture, the 80386 instruction set, programming model, and binary
encodings are still the common denominator for all 32-bit x86
processors, this is termed x86, IA-32, or i386-architecture, depending
on context.

The 386 represents an expanded instruction set from the 286, so who know how hard the port would be. Evidently enough that almost no one has bothered to try it...I guess you can ask the ELKS people about that.

Linux was originally written on a 386 in 1991. By then 286's were already old, and the main kernel tree never had any backported code to support 286.
–
Cisco88Jan 14 '13 at 14:04

That may be, but the question was still why is this the case? Not why the decision was made to drop support for 286/386 (which is obvious) but what are the technical reasons that supporting such an old processor cannot easily be done. I.e. why does the kernel REQUIRE a 32-bit CPU? Why cannot the kernel be compiled for a 286?
–
ioctlvoidJan 14 '13 at 14:09

Didn't the kernel also have the arithmetic co-processor as it's requirements?
–
Bonsi ScottJan 14 '13 at 15:52

No, the kernel supports math emulation, at least it did that before. Hence you could even run the Linux kernel on a CPU with a broken FPU. However, the 286 still supported a math co-processor, the 80287.
–
ioctlvoidJan 24 '13 at 16:30

In an edited out part of my answer I did indicate that emulation is implemented in the Linux kernel. It was even used to port Linux to S/390 (a.k.a IBM Mainframe) as it did not have a floating point unit at the time it was ported.
–
David KohenJun 26 '14 at 16:35

Linux x86 cannot be easily back-ported to the 80286 because it is a 16-bit processor and Linux x86 requires a 32-bit processor.

More specifically, the registers on the 286 were still only 16-bits wide. None of the EX registers were available. Also, memory segments and offsets were still only 16-bits long. Programs still had to deal with near/far code and data.

This means that Linux/286 would need a radically different kernel and user API than Linux/386. Every assembly source file and many C source files would need to be rewritten. It would be like the difference between programming for Win16 versus Win32.

In short, you can't just tell GCC to compile for a different CPU. Every bit of code would need to be rewritten for a 16-bit environment.

From what I've read the canonical way to get Linux to run on the 80286 would be to run it inside a virtual machine. This is what Fabrice Bellard did here. You'd have to implement the virtual machine yourself, or port one.