A low level Operating System designed using Linux Kernel

Conqueror

A low level Operating System designed using Linux Kernel

To develop the basic low level operating system, we need following

  • Virtual Machine
  • Clean Debian OS
  • KDE Desktop Environment

You need to have basic knowledge on

  • Programming in C
  • x86_64 Assembly Programming
  • Linux Basic Commands

After getting all this, lets start building the Operating System using Kernel

[$Checking and Creating Hard drive Partitions:~#]

  • Open the Terminal
  • Type lsblk command
  • It will display sdb. Its actually a Hard Drive
  • Change the user to root by typing the command sudo su
  • Type cfdisk /dev/sdb
  • It will open Hard drive partition table
  • Click on [ New ] and hit enter
  • Hit Enter again so that it will allocate default size
  • Click on [ Primary ] and hit enter
  • Click on [ Bootable ] and hit enter
  • And then click on [ Write ] and type yes and hit enter
  • Finally, click on [ Quit ] to exit
  • Run lsblk command again, then we can see that new partition has been created
  • This is how we can create a new Bootable hard drive partition to test our OS

[$Getting Things Ready for Operating System:~#]

  • Type mkfs.ext4 /dev/sdb1
  • Go to the folder /mnt by typing cd /mnt
  • Create a New Folder by typing mkdir folder_name. That will be Name of your OS.
  • Mount Your Folder using mount /dev/sdb1 folder_name
  • Now, get into the OS by typing cd folder_name
  • Remove all the things inside the folder by typing rm -rvf *
  • Create following folders that will be used for OS Creation by typing the command given below
  • mkdir -p ./{etc,lib,lib64,boot,bin,sbin,var,dev,proc,sys,run,tmp,src}
  • After creating the folders, set mknod by typing following commands
  • mknod -m 600 ./dev/console c 5 1
    mknod -m 666 ./dev/null c 1 3
  • Go to boot folder by typing cd boot
  • Now, let's copy the Kernel File and Initial Ram Disk from /boot folder
  • cp /bootvmlinuz-4.19.0-10-amd64 .
    cp /boot/initrd.img-4.19.0-10.amd64
  • Now, let's install some dependences using following command
  • grub-install /dev/sdb --skip-fs-probe --boot-directory=/mnt/folder_name/boot
  • It will install grub folder. Now, let's start coding part

[$Starting Coding Part for Operating System:~#]

  • Make sure you are in grub directory created previously
  • Create a new file grub.cfg using any editor. My suggestion is to go with VI
  • The code is at [ grub.cfg ]. For Explanation, go to [ Documentation/grub/readme.md ]
  • After that, Go to src folder created in folder_name or simple type cd ../../src
  • Create folders [ lib ] and [ init ] using mkdir -p ./{lib,init}
  • Go to lib folder and create [ start.S ]
  • Get back to src folder and go to init folder and create [ init.c ]
Owner
mahendra gandham
A passionate individual who always thrive to work on end to end products which develop sustainable and scalable social and technical systems to create impact.
mahendra gandham
Similar Resources

A tiny operating system specialized for saving a kernel crash dump.

boot2dump A tiny operating system which takes a filename and memory buffer, saves it into the disk, and reboots the computer. It's initially designed

Jan 4, 2022

A simple kernel/"operating system"

A simple kernel/

tinykernel about a simple kernel/"operating system" I'm writing entirely in the GNU nano editor to help me learn more about operating systems, gnu, c,

Jan 18, 2022

The Little Kernel Embedded Operating System

The Little Kernel Embedded Operating System The LK kernel is an SMP-aware kernel designed for small systems ported to a variety of platforms and cpu a

Sep 20, 2022

[redacted]os - a hobbyist x86_64 operating system kernel.

[redacted]os NOTE: This kernel is still in early stages of development - check back after a few months to see a potentially usable OS. It lacks proper

Jun 7, 2022

A static C library to build applications for the Foenix retro computers, and, eventually, a single-tasking operating system and file browser that sits atop the Foenix MCP Kernel

@mainpage Foenix A2560 Foenix Retro OS: fr/OS A2560-FoenixRetroOS This project provides 2 things: A static C library/framework that anyone can use to

Jun 24, 2022

The alsa-lib is a library to interface with ALSA in the Linux kernel and virtual devices using a plugin system

alsa-lib only for termux android Advanced Linux Sound Architecture (ALSA) project The alsa-lib is a library to interface with ALSA in the Linux kernel

Aug 24, 2022

Operating system project - implementing scheduling algorithms and some system calls for XV6 OS

About XV6 xv6 is a modern reimplementation of Sixth Edition Unix in ANSI C for multiprocessor x86 and RISC-V systems.

Dec 22, 2022

Hobbyist Operating System targeting x86_64 systems. Includes userspace, Virtual File System, An InitFS (tarfs), Lua port, easy porting, a decent LibC and LibM, and a shell that supports: piping, file redirection, and more.

Hobbyist Operating System targeting x86_64 systems. Includes userspace, Virtual File System, An InitFS (tarfs), Lua port, easy porting, a decent LibC and LibM, and a shell that supports: piping, file redirection, and more.

SynnixOS Epic Hobby OS targeting x86_64 CPUs, it includes some hacked together functionality for most essential OSs although, with interactivity via Q

Oct 28, 2022
A water tank level sensor **Built With WisBlock** to detect overflow and low level conditions.
A water tank level sensor **Built With WisBlock** to detect overflow and low level conditions.

RAK12014 Laser TOF sensor coming soon WisBlock Watertank Level Sensor Watertank Overflow detection using the RAKwireless WisBlock modules. It implemen

Feb 3, 2022
KePOS is a 64-bit operating system. Design and implement your own operating system
KePOS is a 64-bit operating system. Design and implement your own operating system

KePOS is a 64-bit operating system. The purpose of this system is to combine the theoretical knowledge and practice of the operating system, and to deepen the understanding of the operating system.

Nov 9, 2022
A list of excellent resources for anyone to deepen their understanding with regards to Windows Kernel Exploitation and general low level security.

WinKernel-Resources A list of excellent resources for anyone trying to deepen their understanding with regards to Windows Kernel Exploitation and gene

Nov 12, 2022
Volatile ELF payloads generator with Metasploit integrations for testing GNU/Linux ecosystems against low-level threats
Volatile ELF payloads generator with Metasploit integrations for testing GNU/Linux ecosystems against low-level threats

Revenant Intro This tool combines SCC runtime, rofi, Msfvenom, Ngrok and a dynamic template processor, offering an easy to use interface for compiling

Aug 23, 2022
nn - a toy operating system, designed for fun

nn is a toy operating system, designed for fun (and from a position of general naïveté). i'm not sure how far it'll go, but one thing's for sure: it'll probably implement nearly nothing.

Jan 28, 2022
CC2500 Low-Cost Low-Power 2.4 GHz RF Transceiver driver for esp-idf
CC2500 Low-Cost Low-Power 2.4 GHz RF Transceiver driver for esp-idf

esp-idf-cc2500 CC2500 Low-Cost Low-Power 2.4 GHz RF Transceiver driver for esp-idf. I ported from this. 2.00mm pitch External Antena 1.27mm pitch PCB

May 29, 2022
S2-LP driver library, low-level and easy-to-port

S2-LP Library This library provides a simple way to use S2-LP transciever module. This library is WIP, but mostly done. https://www.st.com/en/wireless

Oct 10, 2022
Low level library to develop GBA games that can also be built for PC.

Universal GBA Library 1. Introduction This is a library for development of GBA games. It can be used to build actual GBA game ROMs, but it can also ta

Oct 28, 2022
Tiny - low-level library for minimizing the size of your types
Tiny - low-level library for minimizing the size of your types

foonathan/tiny Note: This project is currently WIP, no guarantees are made until an 0.1 release. This project is a C++11 library for putting every las

Oct 29, 2022