1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 19:17:44 +00:00

Kernel: Introduce a new partitioning subsystem

The partitioning code was very outdated, and required a full refactor.
The new subsystem removes duplicated code and uses more AK containers.

The most important change is that all implementations of the
PartitionTable class conform to one interface, which made it possible
to remove unnecessary code in the EBRPartitionTable class.

Finding partitions is now done in the StorageManagement singleton,
instead of doing so in init.cpp.

Also, now we don't try to find partitions on demand - the kernel will
try to detect if a StorageDevice is partitioned, and if so, will check
what is the partition table, which could be MBR, GUID or EBR.
Then, it will create DiskPartitionMetadata object for each partition
that is available in the partition table. This object will be used
by the partition enumeration code to create a DiskPartition with the
correct minor number.
This commit is contained in:
Liav A 2020-12-26 16:53:30 +02:00 committed by Andreas Kling
parent bc18712adf
commit 72b1998f0d
20 changed files with 639 additions and 561 deletions

View file

@ -2,21 +2,21 @@ timeout=1
menuentry 'SerenityOS (normal)' {
root=hd0,5
multiboot /boot/Kernel root=/dev/hda5
multiboot /boot/Kernel root=/dev/hda4
}
menuentry 'SerenityOS (text mode)' {
root=hd0,5
multiboot /boot/Kernel boot_mode=text root=/dev/hda5
multiboot /boot/Kernel boot_mode=text root=/dev/hda4
}
menuentry 'SerenityOS (No ACPI)' {
root=hd0,5
multiboot /boot/Kernel root=/dev/hda5 acpi=off
multiboot /boot/Kernel root=/dev/hda4 acpi=off
}
menuentry 'SerenityOS (with serial debug)' {
root=hd0,5
multiboot /boot/Kernel serial_debug root=/dev/hda5
multiboot /boot/Kernel serial_debug root=/dev/hda4
}