Multi-partition multi-system guiding method based on UEFI BIOS specification

By constructing a multi-system boot sequence during the operating system installation and UEFI BIOS stages, the problem of UEFI BIOS's inability to effectively manage multiple ESP partitions is solved, enabling flexible multi-partition multi-system booting and remote management, and improving system maintenance efficiency.

CN119292679AActive Publication Date: 2025-01-10BEIJING INST OF COMP TECH & APPL
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411386292.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-01-10
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 constructs the multi-system boot order through device scanning in the DXE phase and command query in the BDS phase, and provides in-band and out-of-band user interfaces and remote modification functions.

Benefits of technology

It enables fast and flexible multi-partition and multi-system booting, supports various storage media, provides a convenient user interface and remote management, reduces hardware dependence, and improves system maintenance efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119292679A_ABST
    Figure CN119292679A_ABST
Patent Text Reader

Abstract

The invention relates to a multi-partition multi-system guiding method based on UEFI BIOS specifications, and belongs to the technical field of computers. According to the method, system identification is carried out by taking a partition as a unit, different system startup files are matched, different operating systems are distinguished in a disk + partition mode, and each startup item is added into a BIOS (Basic Input / Output System) startup sequence. Meanwhile, the BIOS starting sequence is modified in an in-band mode and an out-band mode, and multiple systems are guided to be started. The BIOS rollback function can be rapidly achieved, a flexible user interface is provided, and the method has the advantages of being easy to expand, independent of a hardware platform, low in coupling degree and high in modularization degree.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of computer technology, and in particular relates to a multi-partition multi-system booting method based on UEFI BIOS specification. Background Art

[0002] The BIOS workflow developed based on the UEFI specification is usually divided into six stages: SEC, PEI, DXE, BDS, TSL, RT, and AL. In the early stages of SEC, PEI, and DXE, BIOS mainly implements the initialization of the motherboard hardware, PCIE device scanning resource allocation, and support for device protocols and drivers such as SATA and USB. Usually, BIOS will traverse all storage media in the entire machine in the BDS (Boot Device Selection) stage, classify them according to the storage protocol type, and sort them according to the boot sequence priority strategy. After determining the first boot item, access the hard disk partition table in the form of sectors to obtain the efi boot file (Grub) under the EFI partition. Boot the specified operating system by reading and analyzing the Grub file.

[0003] Conventional UEFI BIOS can only find one ESP (boot partition) and boot the Grub file in it. When there are multiple operating systems matching multiple ESPs in the system disk, it cannot be booted normally.

[0004] Grub is a multi-boot manager. When there are multiple different operating systems in the system disk, users can boot different operating systems by modifying Grub. However, the modification operation of Grub is limited by the operating system and cannot meet the function of modifying the boot order remotely or out-of-band.

[0005] In addition, if different operating systems are booted by modifying the Grub content, the user needs to manually modify the Grub configuration file when installing multiple operating systems to add boot information for all systems, which lacks convenience. Summary of the invention

[0006] 1. Technical issues to be resolved

[0007] The technical problem to be solved by the present invention is how to provide a multi-partition multi-system booting method based on the UEFI BIOS specification to solve the problem that the conventional UEFI BIOS lacks convenience.

[0008] (II) Technical solution

[0009] In order to solve the above technical problems, the present invention proposes a multi-partition multi-system booting method based on UEFI BIOS specification, which includes an operating system installation stage and a UEFI BIOS stage;

[0010] Operating system installation phase:

[0011] During multi-system installation, multiple operating systems can be installed in different partitions, and each system retains its own ESP partition;

[0012] UEFI BIOS stage:

[0013] S201, BIOS searches for all PCIE devices on the motherboard in the DXE phase, allocates resources as needed, and loads drivers; BIOS classifies storage devices according to storage protocol types; and sorts them according to the boot order priority strategy;

[0014] S202, after confirming the storage device of the first boot item, access all partitions on the device in the form of sectors, search for the ESP partition, and mark the ESP partition in the search order, which is passed as a part of the parameters of the boot sequence in step S204 and step S205;

[0015] S203, constructing a boot path for each boot partition;

[0016] S204, in the BDS stage, the BIOS sends an oemipmi command to the management chip BMC to query the multi-system startup sequence of the current network end; if the multi-system startup sequence of the network end is obtained in step S204, then the multi-system startup sequence option value in FrontPage is modified according to the sequence obtained in step S204; if no result is obtained in step S204, S205 is directly executed;

[0017] S205, in the BDS stage, the BIOS obtains the variable value in FrontPage, and reads the multi-system startup sequence option value in the configuration interface; and sets the multi-system startup sequence option value in FrontPage according to the order read in step S205;

[0018] S206. According to the boot sequence set in step S204 and step S205, the Grub file in the designated ESP partition is booted.

[0019] (III) Beneficial effects

[0020] The present invention proposes a multi-partition multi-system booting method based on UEFI BIOS specification, and the present invention has the following beneficial effects:

[0021] The BIOS rollback function can be quickly implemented. When the main system encounters a problem, it can provide a faster way to enter the maintenance system and restore the main system, saving software development costs.

[0022] Provides a flexible user interface, supports in-band and out-of-band booting of multiple partitions and multiple systems. Users can select and operate the function entry of booting multiple systems in the BIOS graphical configuration interface; they can also remotely modify or select the boot startup of the multi-system mode through the BMC.

[0023] It is easily expandable and can be applied to various storage media such as nvme, SATA, USB, etc. It supports applications in complex scenarios such as single disk and multiple systems or multiple disks and multiple systems.

[0024] It is independent of the hardware platform, has low coupling and high modularity; it can be quickly ported to other projects. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 is a flow chart of the method of the present invention;

[0026] Figure 2 This is a schematic diagram of the Protocol and Handle of the hard disk and file system;

[0027] Figure 3 Schematic diagram of the structure information built for the path. DETAILED DESCRIPTION

[0028] In order to make the purpose, content and advantages of the present invention more clear, the specific implementation methods of the present invention are further described in detail below in conjunction with the drawings and examples.

[0029] The present invention is applied to computer hardware devices that comply with the UEFI BIOS boot process, and there are two or more operating systems in the boot hard disk. A BIOS technology that supports multi-partition multi-system booting is implemented using the UEFI boot process. The present invention performs system identification in units of partitions, matches different system boot files, distinguishes different operating systems in a disk+partition manner, and adds each boot item to the BIOS boot sequence. At the same time, the present invention supports both in-band and out-of-band methods to modify the BIOS boot sequence, and guides multi-system booting.

[0030] Based on the above analysis, in order to realize the booting of multiple operating systems and to modify the boot order of multiple systems in local and remote ways, the present invention makes an ESP (boot partition) in the BDS boot part and the operating system installation part of the UEFI BIOS.

[0031] The specific steps are as follows:

[0032] 1. Operating system installation phase

[0033] During the multi-system installation process, multiple operating systems are supported to be installed in different partitions, and each system retains its own ESP partition. This installation mode is suitable for the installation mode of domestic operating systems such as Kylin, Tongxin, and CentOS.

[0034] UEFI BIOS stage

[0035] S201, BIOS searches for all PCIE devices on the motherboard in the DXE phase, allocates resources as needed, and loads drivers. BIOS classifies storage devices according to storage protocol type and sorts them according to the boot order priority strategy.

[0036] Among them, in step S201, controllers such as SATA and NVME and the storage devices mounted thereunder are all correctly identified.

[0037] S202, after confirming the storage device of the first boot item, access all partitions on the device in the form of sectors, search for the ESP partition, and mark the ESP partition in the search order, which is passed as a part of the parameters of the boot sequence in step S204 and step S205.

[0038] S203: Construct a boot path for each boot partition.

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

[0040] S205, in the BDS stage, the BIOS obtains the variable value in FrontPage, reads the multi-system startup sequence option value in the configuration interface, and sets the multi-system startup sequence option value in FrontPage according to the order read in step S205.

[0041] S206. According to the boot sequence set in step S204 and step S205, the Grub file in the designated ESP partition is booted.

[0042] The design features of the present invention are:

[0043] 1. First of all, it depends on the non-ESP (boot partition) filtering strategy.

[0044] In the present invention, in S202, the strategy traverses all partitions in the same storage medium, and quickly filters the partitions with non-ESP attributes according to the partition type unique identifier; it can also filter the hard disk devices and removable devices with single partitions according to the acquired BlkIo attributes. BIOS collects all ESP partition information to prepare for functions such as system boot and user configuration interface. Figure 2What is shown are the protocols and handles of the hard disk and file system used in the implementation of the present invention. The present invention implements the multi-partition system boot function through the interactive calling of these protocols and handles according to the protocols and handles of the hard disk and file system used.

[0045] like Figure 2 As shown, the driver modules corresponding to the partition IO 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, the Protocol of the file system corresponding to the driver module PartitionDxe is BlockIoProtocol and DevicePathProtocol, and the Handle used by the partition IO 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. 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, the present invention is also characterized by reconstructing the device path. Traditional UEFI BIOS does not support device paths other than the default boot manager. In the present invention, in S202, 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 constructed according to the UEFI specification. The BIOS locates the boot manager or the boot configuration file by accessing the boot path and boots the operating system.

[0048] Figure 3 What is shown in FIG. 1 is the structural information of the path constructed when the present invention is implemented.

[0049] 3. The present invention provides a flexible user interface and supports booting multiple partitions and multiple systems in both in-band and out-of-band modes. Users can operate the multi-system function items in the BIOS graphical configuration interface; they can also select multi-system mode booting through the BMC.

[0050] 4. In addition, the present invention is easily scalable and can be applied to various storage media such as nvme, SATA, USB, etc., and supports applications in complex scenarios such as single disk and multiple systems or multiple disks and multiple systems.

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

[0052] 1. The BIOS rollback function can be quickly implemented. When the main system encounters a problem, it can provide a faster way to enter the maintenance system and restore the main system, saving software development costs.

[0053] 2. Provides a flexible user interface, supports in-band and out-of-band booting of multiple partitions and multiple systems. Users can select and operate the function entry of booting multiple systems in the BIOS graphical configuration interface; they can also remotely modify or select the boot startup of the multi-system mode through the BMC.

[0054] 3. It is easily expandable and can be applied to various storage media such as nvme, SATA, USB, etc. It supports applications in complex scenarios such as single disk and multiple systems or multiple disks and multiple systems.

[0055] 4. It is independent of the hardware platform, has low coupling and high modularity; it can be quickly ported to other projects.

[0056] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A multi-partition multi-system boot method based on UEFI BIOS specification, characterized in that: The method includes an operating system installation stage and a UEFI BIOS stage; Operating system installation phase: During multi-system installation, multiple operating systems can be installed in different partitions, and each system retains its own ESP partition; UEFI BIOS stage: S201, BIOS searches for all PCIE devices on the motherboard in the DXE phase, allocates resources as needed, and loads drivers; BIOS classifies storage devices according to storage protocol types; and sorts them according to the boot order priority strategy; S202, after confirming the storage device of the first boot item, access all partitions on the device in the form of sectors, search for the ESP partition, and mark the ESP partition in the search order, which is passed as a part of the parameters of the boot sequence in step S204 and step S205; S203, constructing a boot path for each boot partition; S204, in the BDS stage, the BIOS sends an oemipmi command to the management chip BMC to query the multi-system startup sequence of the current network end; if the multi-system startup sequence of the network end is obtained in step S204, then the multi-system startup sequence option value in FrontPage is modified according to the sequence obtained in step S204; if no result is obtained in step S204, S205 is directly executed; S205, in the BDS stage, the BIOS obtains the variable value in FrontPage, and reads the multi-system startup sequence option value in the configuration interface; and sets the multi-system startup sequence option value in FrontPage according to the order read in step S205; S206. According to the boot sequence set in step S204 and step S205, the Grub file in the designated ESP partition is booted.

2. The multi-partition multi-system booting method based on UEFI BIOS specification as claimed in claim 1, characterized in that: The installation mode of this method during the operating system installation phase is applicable to Kylin, Tongxin, and CentOS operating systems.

3. The multi-partition multi-system booting method based on UEFI BIOS specification as claimed in claim 1, characterized in that: In step S201, the controller and the storage devices mounted thereunder are correctly identified.

4. The multi-partition multi-system booting method based on UEFI BIOS specification as claimed in claim 4, characterized in that: The controller includes: Sata, Nvme, USB.

5. The multi-partition multi-system booting method based on UEFI BIOS specification according to any one of claims 1 to 4, characterized in that: In 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 according to the partition type unique identifier; single-partition hard disk devices and removable devices are filtered according to the obtained BlkIo attributes, and the BIOS collects all ESP partition information to prepare for system booting and user configuration interface.

6. The multi-partition multi-system booting method based on UEFI BIOS specification as claimed in claim 5, characterized in that: The method realizes the multi-partition system boot function according to the adopted hard disk, the Protocol and the Handle of the file system through the interactive calling of these Protocol and Handle.

7. The multi-partition multi-system booting method based on UEFI BIOS specification as claimed in claim 6, characterized in that: The driver modules corresponding to the partition IO 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, the Protocol of the file system corresponding to the driver module PartitionDxe is BlockIoProtocol and DevicePathProtocol, and the Handle used by the partition IO driver is Partition Handle.

8. The multi-partition multi-system booting method based on UEFI BIOS specification as claimed 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. 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.

9. The multi-partition multi-system booting method based on UEFI BIOS specification as claimed in claim 5, characterized in that: In 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 constructed according to the UEFI specification. The BIOS locates the boot manager or the boot configuration file by accessing the boot path to boot the operating system.

10. The multi-partition multi-system booting method based on UEFI BIOS specification as claimed in claim 5, characterized in that: This method supports booting multiple partitions and multiple systems in both in-band and out-of-band modes. The user operates the multi-system function items in the BIOS graphical configuration interface or selects multi-system mode boot through the BMC.

Citation Information

Patent Citations

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

    CN108388452A

  • Method, system and medium for realizing virtual DOS under UEFI-BIOS architecture

    CN109062656A

  • Method and device for installing multiple operating systems

    CN118535172A

  • Systems and methods for handling firmware driver dependencies in host operating systems while applying updates from bootable image file

    US20200210203A1