You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MOROS is a hobby operating system written in Rust by Vincent Ollivier.
It targets computers with a x86-64 architecture and a BIOS, so mostly from 2005
to 2020, but it also runs well on most emulators (Bochs, QEMU, and VirtualBox).
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.
You will need git, gcc, make, curl, qemu-img,
and qemu-system-x86_64 on the host system.
Clone the repo:
$ git clone https://github.com/vinc/moros
$ cd moros
Install the required tools with make setup or the following commands:
$ curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none
$ rustup show
$ cargo install bootimage
Usage
Build the image to disk.img:
$ make image output=video keyboard=qwerty
Run MOROS in QEMU:
$ make qemu output=video nic=rtl8139
Run natively on a x86 computer by copying the bootloader and the kernel to a
hard drive or USB stick (but there is currently no USB driver so the filesystem
will not be available in that case):
MOROS will open a console in diskless mode after boot if no filesystem is
detected. The following command will setup the filesystem on a hard drive,
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 if you don't use an
emulator.