MOROS: Obscure Rust Operating System

MOROS is a toy operating system written in Rust for the x86 architecture.

This project started from the seventh post of the second edition of Writing an OS in Rust by Philipp Oppermann and by reading the OSDev wiki along with many open source kernels.




Install tools:

$ curl -sSf | sh
$ rustup install nightly
$ rustup default nightly
$ rustup component add rust-src
$ rustup component add llvm-tools-preview
$ cargo install cargo-xbuild bootimage


Build image to disk.img:

$ make image output=vga keyboard=qwerty

Run on QEMU:

$ make qemu output=vga

Run on a native x86 computer by copying the bootloader and kernel to a hard drive or USB stick (but there is currently no USB driver so the filesystem will not be available):

$ sudo dd if=target/x86_64-moros/release/bootimage-moros.bin of=/dev/sdx && sync

In both cases, MOROS will open a console in diskless mode after boot if no filesystem is detected. The following command will setup the filesystem on the first hard drive of the first ATA bus, allowing you to exit the diskless mode and log in as a normal user:

> install

Be careful not to overwrite the hard drive of your OS when using dd inside your OS, and install or disk format inside MOROS.


MOROS is released under MIT.