Skip to content

Filesystem Creation

Charles Ambrye edited this page Feb 11, 2022 · 4 revisions

Filesystem Creation

RedPandaOS uses a raw disk image for booting in qemu. The raw disk image consists of an MBR with a single FAT32 partition.

The first portion is the MBR, which stores the first stage Bootloader as well as partition information. There is a single FAT32 partition, listed in the MBR partition table. The FAT32 partition then contains the second stage Bootloader in the FAT reserved sectors.

The FAT32 file system includes a boot/kernel.bin file, which is what stores the main code for the 32 bit kernel. Typically there will also be a boot/symbols.bin file, which is generated at runtime by the RedPandaOS project.

Finally, any additional files or directories added to the project/disk directory will be added to the FAT32 file system. This can include /etc, /home and other files. See the function ExploreDirectory in FAT32Writer.cs for more information on how these additional files and directories are added.

The resulting file is a bootable raw disk image for qemu, which can be booted using the format=raw option in qemu.

Clone this wiki locally