What does an operating system look like without a shell

historyoperating systemsshell

A shell like the bash or command.com (up to Windows ME) or CMD.EXE (in later versions) provides an interface that (among other things) accepts commands from the user. What does an operating system look like before a shell is run? How were systems used before the first shell was developed (e.g. UNIX in the early 1970s)? If a computer cannot even accept commands (there is no command line), how can a user interact with it? What is this most basic interface? Can I run this interface in a terminal emulator or is there no way going behind a shell?

Best Answer

What does an operating system look like before a shell is run?

Depends on the OS and how you configure it. Linux can be configured to write boot text to a console device, whether a text mode console, framebuffer console or a serial port. It can also be configured to be perfectly silent. Some OS's/systems may write diagnostic information to a non-volatile memory that can be accessed by putting the system in developer, debug, or diagnostic mode. Many operating systems support outputting boot and diagnostic information to some form of UART, which may somehow be available on the unit even if hidden from the user (google "Add serial port to DD-WRT" for examples of where manufacturers hide serial ports and how you can get to them).

An OS doesn't have to have an external display at all - it's just another device to the OS.

How were systems used before the first shell was developed (e.g. UNIX in the early 1970s)?

Essentially (and leaving out a lot but this should get you the idea) - You loaded your program, either by flipping switches on a panel or using a paper-tape reader (these devices would write to memory directly without CPU intervention) and then start the CPU with another switch. The CPU would run this program, generate its output, and stop. This is batch processing as opposed to interactive processing. If you wanted to run a different program you had to do this over.

If a computer cannot even accept commands (there is no command line), how can a user interact with it?

I am no expert in this area but old, old computers like the Altair, IMSAI, and PDP-8 and such had front panel switches that directly controlled the CPU and could directly read and write memory without CPU intervention.

What is this most basic interface?

I believe most if not all modern CPUs have a "JTAG port" which allows the same type of direct operations. Keep in mind that for a long time most computers have been expected to have ROM or firmware that takes control of the system when it is turned on before it hands it off to an OS. Here, pre-boot utilities can exist, or a minimal mechanism for loading such utilities exists. Some bootloaders such as U-Boot can be accessed via the serial port. Bootloaders don't run "behind" the OS, they load the OS, hand control to it, and then they are no longer running.

Can I run this interface in a terminal emulator or is there no way going behind a shell?

No, you need a JTAG interface. That's diving into the realm of electronics and I admit I don't know very much about it, except that my GuruPlug comes with one and I can directly program the flash chip on the GuruPlug's board with it - meaning if something kills the bootloader on the GuruPlug, I have a "CPU independent" way of flashing it back.

Related Question