A multi-partition, multi-system boot method based on the UEFI BIOS specification

By managing multiple partitions during operating system installation and UEFI BIOS stages, the problem of UEFI BIOS being unable to boot multiple ESP partitions is solved, enabling flexible multi-system booting and remote modification, supporting multiple storage media, and improving the convenience and scalability of system maintenance.

CN119292679BActive Publication Date: 2025-10-31BEIJING INST OF COMP TECH & APPL
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411386292.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-10-31
Estimated Expiration
2044-09-30

AI Technical Summary

Technical Problem

Conventional UEFI BIOS cannot effectively manage multiple ESP partitions, resulting in the inability to boot multiple operating systems normally. Furthermore, Grub modification operations are limited, lacking convenience and flexibility.

Method used

During the operating system installation phase, it supports installing multiple operating systems on different partitions, with each system retaining its own ESP partition; during the UEFI BIOS phase, it identifies PCIe devices through the DXE phase, classifies storage devices through the DXE phase, queries and sets the boot order of multiple systems in the BDS phase, builds the boot path, and supports modifying the boot order in both in-band and out-of-band modes.

Benefits of technology

It enables rapid booting of multiple partitions and systems, provides a flexible user interface and remote modification capabilities, supports multiple storage media, reduces hardware dependence, and improves the convenience and scalability of system maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119292679B_ABST
    Figure CN119292679B_ABST
Patent Text Reader

Abstract

This invention relates to a multi-partition, multi-system boot method based on the UEFI BIOS specification, belonging to the field of computer technology. This invention identifies systems on a partition-by-partition basis, matches different system boot files, distinguishes different operating systems using a disk + partition approach, and adds each boot entry to the BIOS boot order. Furthermore, this invention supports both in-band and out-of-band modification of the BIOS boot order and boots multiple systems. This invention can quickly implement BIOS rollback functionality, provides a flexible user interface, is easily scalable, independent of hardware platform, has low coupling, and a high degree of modularity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer technology, specifically relating to a multi-partition, multi-system boot method based on the UEFI BIOS specification. Background Technology

[0002] The BIOS workflow based on the UEFI specification typically consists of six stages: SEC, PEI, DXE, BDS, TSL, RT, and AL. In the early stages of SEC, PEI, and DXE, the BIOS primarily initializes the motherboard hardware, scans and allocates resources for PCIe devices, and supports protocols and drivers for devices such as SATA and USB. During the BDS (Boot Device Selection) stage, the BIOS usually traverses all storage media in the system, classifying them according to storage protocol type and sorting them according to boot priority. After determining the first boot device, it accesses the hard drive partition table in sector form to obtain the EFI boot file (Grub) under the EFI partition. By reading and analyzing the Grub file, the specified operating system is booted.

[0003] A standard UEFI BIOS can only locate one ESP (Electronic Boot Partition) and boot from its Grub file. If multiple operating systems exist on the system disk that match multiple ESPs, booting will fail.

[0004] GRUB is a multi-boot manager that allows users to modify GRUB to boot different operating systems when multiple operating systems are present on the system disk. However, GRUB modification is limited by the operating system and cannot be performed remotely or out-of-band to change the boot order.

[0005] Furthermore, if different operating systems are booted by modifying Grub, users would need to manually modify the Grub configuration file to add boot information for all systems when installing multiple operating systems, which lacks convenience. Summary of the Invention

[0006] (a) Technical problems to be solved

[0007] The technical problem to be solved by this invention is how to provide a multi-partition, multi-system boot method based on the UEFI BIOS specification to solve the problem of lack of convenience in conventional UEFI BIOS.

[0008] (II) Technical Solution

[0009] To address the aforementioned technical problems, this invention proposes a multi-partition, multi-system boot method based on the UEFI BIOS specification, which includes an operating system installation phase and a UEFI BIOS phase.

[0010] Operating system installation phase:

[0011] During multi-system installation, it supports installing multiple operating systems on different partitions, with each system retaining its own ESP partition;

[0012] UEFI BIOS stage:

[0013] S201: During the DXE phase, the BIOS searches for all PCIe devices on the motherboard, allocates resources as needed, and loads drivers; the BIOS categorizes storage devices according to storage protocol type and sorts them according to the boot order priority strategy.

[0014] S202. After confirming the first boot item storage device, access all partitions on the device in the form of sectors, find the ESP partition, and mark the ESP partition according to the search order, which is passed as part of the boot order parameters in steps S204 and S205.

[0015] S203. Construct the boot path for each boot partition;

[0016] S204. In the BDS stage, the BIOS sends the oemipmi command to the management chip BMC to query the current multi-system boot order on the network. If the multi-system boot order on the network is obtained in step S204, the multi-system boot order option value in FrontPage is modified according to the order obtained in step S204. If no result is obtained in step S204, S205 is executed directly.

[0017] S205. During the BDS stage, the BIOS obtains the variable values ​​in the FrontPage and reads the multi-system boot order option values ​​in the configuration interface; sets the multi-system boot order option values ​​in the FrontPage according to the order read in step S205.

[0018] S206. Based on the boot order set in steps S204 and S205, boot the Grub file in the specified ESP partition.

[0019] (III) Beneficial Effects

[0020] This invention proposes a multi-partition, multi-system boot method based on the UEFI BIOS specification. This invention has the following beneficial effects:

[0021] It enables rapid BIOS rollback. When the main system encounters problems, it provides a faster way to access the maintenance system and restore the main system, saving on software development costs.

[0022] It provides a flexible user interface, supporting both in-band and out-of-band booting of multiple partitions and multiple systems. Users can select the function items for booting multiple systems in the BIOS graphical configuration interface; they can also remotely modify or select the boot mode for multiple systems via the BMC terminal.

[0023] It is highly expandable and can be applied to various storage media such as NVMe, SATA, and USB, supporting complex scenarios such as single-disk multi-system or multi-disk multi-system.

[0024] It is not dependent on a hardware platform, has low coupling, and is highly modular; it can be quickly ported to other projects. Attached Figure Description

[0025] Figure 1 This is a flowchart of the method of the present invention;

[0026] Figure 2 A diagram illustrating the protocols and handles for hard drives and file systems;

[0027] Figure 3 A schematic diagram of the structure information constructed for the path. Detailed Implementation

[0028] To make the objectives, contents, and advantages of the present invention clearer, the specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples.

[0029] This invention applies to computer hardware devices conforming to the UEFI BIOS boot process, where the boot hard drive contains two or more operating systems. It utilizes the UEFI boot process to implement a BIOS technology that supports multi-partition, multi-system booting. This invention identifies systems on a partition-by-partition basis, matches different system boot files, distinguishes different operating systems using a disk + partition approach, and adds each boot entry to the BIOS boot order. Furthermore, this invention supports both in-band and out-of-band modification of the BIOS boot order and enables the booting of multiple systems.

[0030] Based on the above analysis, in order to enable booting of multiple operating systems and to allow modification of the boot order of multiple systems through both local and remote methods, this invention incorporates ESP (boot partition) in the BDS boot section and operating system installation section of the UEFI BIOS.

[0031] The specific steps are as follows:

[0032] I. Operating System Installation Phase

[0033] During multi-system installation, multiple operating systems can be installed on different partitions, with each system retaining its own ESP partition. This installation mode is suitable for installing domestic operating systems such as Kylin, UnionTech, and CentOS.

[0034] II. UEFI BIOS Stage

[0035] S201: During the DXE phase, the BIOS locates all PCIe devices on the motherboard, allocates resources as needed, and loads drivers. The BIOS categorizes storage devices according to their storage protocol type and sorts them according to the boot priority strategy.

[0036] In step S201, the SATA, NVMe, and other controllers and the storage devices attached to them are correctly identified.

[0037] S202. After confirming the first boot device storage device, access all partitions on the device in the form of sectors, find the ESP partition, and label the ESP partition according to the search order, which is then passed as part of the boot order parameters in steps S204 and S205.

[0038] S203. Construct the boot path for each boot partition.

[0039] S204. In the BDS stage, the BIOS sends the oemipmi command to the management chip BMC to query the current multi-system boot order on the network. If the multi-system boot order on the network is obtained in step S204, the multi-system boot order option value in FrontPage is modified according to the order obtained in step S204; if no result is obtained in step S204, then S205 is executed directly.

[0040] S205. During the BDS stage, the BIOS retrieves the variable values ​​from the FrontPage and reads the multi-system boot order option values ​​from the configuration interface. The multi-system boot order option values ​​in the FrontPage are set according to the order read in step S205.

[0041] S206. Based on the boot order set in steps S204 and S205, boot the Grub file in the specified ESP partition.

[0042] The design features of this invention are as follows:

[0043] 1. Firstly, there is the non-ESP (boot partition) filtering strategy.

[0044] In step S202 of this invention, the strategy traverses all partitions within the same storage medium and quickly filters partitions with non-ESP attributes based on their unique partition type identifiers; it can also filter single-partition hard disk devices and removable devices based on the acquired BlkIo attributes. The BIOS collects all ESP partition information to prepare for system booting and user configuration interface functions. Figure 2This invention demonstrates the protocols and handles of the hard drive and file system used in its implementation. Based on these protocols and handles, the invention achieves multi-partition system boot functionality through the interactive calls of these protocols and handles.

[0045] like Figure 2 As shown, the driver modules corresponding to the partition I / O driver include: EnhancedFatDxe, DiskIoDxe, and PartitionDxe. The protocol of the file system corresponding to the driver module EnhancedFatDxe is SimpleFileSystemProtocol, the protocol of the file system corresponding to the driver module DiskIoDxe is DiskIoProtocol, and the protocols of the file system corresponding to the driver module PartitionDxe are BlockIoProtocol and DevicePathProtocol. The Handle used by the partition I / O driver is PartitionHandle.

[0046] The driver modules corresponding to the ATA device IO driver include DiskIoDxe and AtaBusDxe. The protocol of the file system corresponding to the driver module DiskIoDxe is DiskIoProtocol, and the protocol of the file system corresponding to the driver module AtaBusDxe is BlockIoProtocol, DiskInfoProtocol, and DevicePathProtocol. The handle used by the ATA device IO driver is SATAdevice Handle.

[0047] 2. Secondly, a key feature of this invention is the reconstruction of device paths. Traditional UEFI BIOS does not support device paths other than the default boot manager. In step S202 of this invention, the path identifier of the corresponding system is obtained according to different device types, the device path is obtained through the constructed Handle, and finally a complete boot path is assembled according to the UEFI specification. The BIOS accesses this boot path to locate the boot manager or boot configuration file and boot the operating system.

[0048] Figure 3 The diagram shows the structure information of the path construction during the implementation of this invention.

[0049] 3. This invention provides a flexible user interface, supporting both in-band and out-of-band booting of multiple partitions and multiple systems. Users can operate the multi-system function entries in the BIOS graphical configuration interface; or they can select the multi-system mode for booting through the BMC terminal.

[0050] 4. In addition, this invention is easily expandable and can be applied to various storage media such as NVMe, SATA, and USB, supporting applications in complex scenarios such as single disk with multiple systems or multiple disks with multiple systems.

[0051] The present invention has the following beneficial effects:

[0052] 1. Enables rapid BIOS rollback. When the main system encounters problems, it provides a faster way to access the maintenance system and restore the main system, saving software development costs.

[0053] 2. Provides a flexible user interface, supporting both in-band and out-of-band booting of multiple partitions and multiple systems. Users can select the function items for booting multiple systems in the BIOS graphical configuration interface; they can also remotely modify or select the boot mode for multiple systems through the BMC terminal.

[0054] 3. It has easy scalability and can be applied to various storage media such as NVMe, SATA, and USB, supporting complex scenarios such as single disk with multiple systems or multiple disks with multiple systems.

[0055] 4. It is not dependent on a hardware platform, has low coupling, and is highly modular; it can be quickly ported to other projects.

[0056] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A multi-partition, multi-system boot method based on the UEFI BIOS specification, characterized in that, This method includes the operating system installation phase and the UEFI BIOS phase; Operating system installation phase: During multi-system installation, it supports installing multiple operating systems on different partitions, with each system retaining its own ESP partition; UEFI BIOS stage: S201: During the DXE phase, the BIOS searches for all PCIe devices on the motherboard, allocates resources as needed, and loads drivers; the BIOS categorizes storage devices according to storage protocol type and sorts them according to the boot order priority strategy. S202. After confirming the first boot device storage device, access all partitions on the storage device in the form of sectors, find the ESP partition, and mark the ESP partition according to the search order, which is passed as part of the boot order parameters in steps S204 and S205. S203. Construct the boot path for each boot partition; S204. In the BDS stage, the BIOS sends the oemipmi command to the management chip BMC to query the current multi-system boot order on the network. If the multi-system boot order on the network is obtained in step S204, the multi-system boot order option value in FrontPage is modified according to the order obtained in step S204. If no result is obtained in step S204, S205 is executed directly. S205. During the BDS stage, the BIOS obtains the variable values ​​in the FrontPage and reads the multi-system boot order option values ​​in the configuration interface; sets the multi-system boot order option values ​​in the FrontPage according to the order read in step S205. S206. Based on the boot order set in steps S204 and S205, boot the Grub file in the specified ESP partition.

2. The multi-partition, multi-system boot method based on the UEFI BIOS specification as described in claim 1, characterized in that, This method, applicable to the installation mode during the operating system installation phase, is suitable for Kylin, UnionTech, and CentOS operating systems.

3. The multi-partition, multi-system boot method based on the UEFI BIOS specification as described in claim 1, characterized in that, In step S201, the controller and the storage device attached to it are correctly identified.

4. The multi-partition, multi-system boot method based on the UEFI BIOS specification as described in claim 1, characterized in that, The controller includes: SATA, NVMe, USB.

5. The multi-partition, multi-system boot method based on the UEFI BIOS specification as described in any one of claims 1-4, characterized in that, In step S202, a non-ESP filtering strategy is adopted. This strategy traverses all partitions in the same storage medium and quickly filters partitions with non-ESP attributes based on the unique identifier of the partition type. It filters hard disk devices and removable devices of a single partition based on the obtained BlkIo attribute. The BIOS collects all ESP partition information to prepare for system boot and user configuration interface.

6. The multi-partition, multi-system boot method based on the UEFI BIOS specification as described in claim 5, characterized in that, This method implements multi-partition system boot functionality by interacting with and calling the protocols and handles of the hard drive and file system used.

7. The multi-partition, multi-system boot method based on the UEFI BIOS specification as described in claim 6, characterized in that, The driver modules corresponding to the partition I / O driver include: EnhancedFatDxe, DiskIoDxe, and PartitionDxe. The protocol of the file system corresponding to the driver module EnhancedFatDxe is SimpleFileSystemProtocol, the protocol of the file system corresponding to the driver module DiskIoDxe is DiskIoProtocol, and the protocols of the file system corresponding to the driver module PartitionDxe are BlockIoProtocol and DevicePathProtocol. The partition I / O driver uses the Partition Handle.

8. The multi-partition, multi-system boot method based on the UEFI BIOS specification as described in claim 6, characterized in that, The driver modules corresponding to the ATA device IO driver include DiskIoDxe and AtaBusDxe. The protocol of the file system corresponding to the driver module DiskIoDxe is DiskIoProtocol, and the protocol of the file system corresponding to the driver module AtaBusDxe is BlockIoProtocol, DiskInfoProtocol, and DevicePathProtocol. The ATA device IO driver uses the SATA device Handle.

9. The multi-partition, multi-system boot method based on the UEFI BIOS specification as described in claim 5, characterized in that, In step S203, the path identifier of the corresponding system is obtained according to different device types, the device path is obtained through the constructed Handle, and finally a complete boot path is assembled according to the UEFI specification. The BIOS accesses the boot path to locate the boot manager or boot configuration file and boot the operating system.

10. The multi-partition, multi-system boot method based on the UEFI BIOS specification as described in claim 5, characterized in that, This method supports both in-band and out-of-band booting of multiple partitions and multiple systems. Users can operate the multi-system function entries in the BIOS graphical configuration interface or select the multi-system mode for booting through the BMC terminal.

Citation Information

Patent Citations

  • Method for locking BIOS (Basic Input / Output System) booting item

    CN108388452A

  • Method and device for installing multiple operating systems

    CN118535172A