PXE-based, hard-disk-driver-adaptive linux operating system installation method and system

By enhancing the PXE protocol to transmit the hard drive rpm package and automatically detect the hard drive model in the Live memory system environment, the adaptive installation of the Linux operating system on different hard drives is realized, solving the problem of inflexible and time-consuming installation in the existing technology, and improving R&D and operation and maintenance efficiency.

WO2025124170A1PCT designated stage expired Publication Date: 2025-06-19CHINA TELECOM CLOUD TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/135729
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-14
Filing Date
2024-11-29
Publication Date
2025-06-19

AI Technical Summary

Technical Problem

The prior art is difficult to flexibly adapt to different types of hard drives when installing Linux operating systems, resulting in the need to recompile the kernel, inject the hard drive and reconstruct the ISO image file, which takes a long time and is not flexible enough.

Method used

By enhancing the PXE protocol, transmitting the software warehouse path of the hard disk drive rpm package, and automatically detecting the hard disk model in the Live memory system environment, downloading and installing the corresponding hard disk drive rpm package, realizing adaptive installation of the hard disk drive.

Benefits of technology

There is no need to recompile the kernel or reconstruct the ISO image file, it can automatically adapt to the installation of various types of hard disks, improve R&D and operation and maintenance efficiency, and solve the problems of inflexible technology and excessive cost consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024135729_19062025_PF_FP_ABST
    Figure CN2024135729_19062025_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides a PXE-based, hard-disk-driver-adaptive Linux operating system installation method and system. The method comprises: creating a software repository of hard disk driver rpm packages, and creating a mapping relationship file of hard disk information and the hard disk driver rpm packages; updating a PXE protocol, and transmitting a path of the repository of hard disk driver rpm packages on the PXE server; automatically detecting and acquiring a device type, a device ID, and an alias of a hard disk in a Live memory system environment; determining, whether a target hard disk is supported in the Live memory system environment; performing the configuration of the repository of hard disk driver rpm packages in the Live memory system environment; downloading the mapping relationship file of hard disk information and the hard disk driver rpm packages; matching and downloading the hard disk driver rpm package from the PXE server; installing the hard disk driver rpm package in the Live memory system environment and loading same; installing, by Linux operating system installation program in the Live memory system environment, an operating system software package according to a normal logic; and installing the hard disk driver rpm package and updating a kernel module configuration file on a hard disk file system.
Need to check novelty before this filing date? Find Prior Art

Description

Installation method and system of Linux operating system based on PXE adaptive hard disk drive

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on December 14, 2023, with application number 202311720325.2 and invention name “Installation method and system for Linux operating system based on PXE adaptive hard disk drive”, the entire contents of which are incorporated by reference into this application. Technical Field

[0003] This application relates to the field of Linux operating system distribution research and development, mainly targeting the installation of Linux operating systems on physical servers, especially the scenario of installation using PXE, and specifically to a method and system for installing Linux operating systems based on PXE adaptive hard disk drive. Background Art

[0004] In recent years, the development of the cloud computing industry has transformed how people access information and how businesses build information systems. Considered the third wave of IT, cloud computing is a service related to information technology, software, and the internet. The rapid growth of cloud computing requires strong infrastructure support, particularly the operating system that manages the server hardware and service capabilities of cloud computing resource pools. Currently, cloud computing operating systems are typically Linux operating systems such as Red Hat and CentOS.

[0005] Currently, Linux operating systems are generally installed in two ways: one is to download the Linux operating system ISO image file to a CD or USB drive and then insert it into a physical server for installation; the other is to import the Linux operating system ISO image file into a PXE server and then configure the corresponding environment for installation. In actual projects, cloud computing resource pools have a large number of servers of various models, and different servers may be equipped with different types of hard drives, such as RAID and NVME. However, a Linux operating system distribution may not support installation on all types of hard drives at the same time when it is released, because the ISO image file may lack the driver for a certain type of hard drive. Existing technical methods generally require R&D personnel to decompress the Linux operating system distribution ISO image file, recompile the kernel vmlinuz or inject hard drive drivers to recreate Initramfs, and then reconstruct and publish the ISO image file before the integrator can proceed with the installation. Therefore, existing technical methods suffer from problems such as the need to republish ISO image files, lack of flexibility, and long time consumption. Summary of the Invention

[0006] In view of this, the present application proposes a method and system for installing a Linux operating system based on a PXE adaptive hard disk drive, which can make full use of the existing Linux operating system PXE installation mechanism and enable the Linux operating system to automatically adapt to installation on various types of hard disks. When the Linux operating system does not support a certain hard disk drive, there is no need to recompile the kernel vmlinuz, inject the hard disk driver to recreate Initramfs, and there is no need to reconstruct the ISO image file, thereby improving R&D and operation and maintenance efficiency.

[0007] Based on the above objectives, in a first aspect, the present application provides a method for installing a Linux operating system based on a PXE adaptive hard disk drive, comprising the following steps:

[0008] Enhanced PXE protocol transmission of hard disk drive RPM package software repository path;

[0009] Create a hard drive rpm package repository in the first directory on the PXE server;

[0010] On the second day of recording on the PXE server, create the hard disk information and hard disk drive mapping relationship file of the driver RPM package;

[0011] Updated the PXE protocol to transmit the path of the hard drive RPM package repository on the PXE server and identify the hard drive model in the Live Memory system environment;

[0012] Determine whether the target hard disk is supported in the Live memory system environment;

[0013] If the target hard disk is not supported, download the hard disk drive mapping file from the first directory of the PXE server;

[0014] Perform yum configuration based on the PXE server IP and hard drive rpm package repository path;

[0015] Download and cache the hard drive rpm to the Live memory system cache;

[0016] Install the hard disk driver RPM package in the Live memory system environment and load the driver;

[0017] Install the operating system software package normally. If the target hard disk is supported, directly install the operating system software package normally.

[0018] Install the hard disk driver RPM package on the hard disk file system and update the kernel module configuration file.

[0019] As an optional solution of the present application, the hard disk driver RPM package is obtained from the hard disk hardware manufacturer, or a hard disk driver RPM package is made for a specific Linux operating system distribution.

[0020] As an optional solution of the present application, each line of data recorded in the hard disk driver mapping relationship file is used to indicate the RPM package name corresponding to the driver kernel module compiled on the hard disk for a specific Linux Kernel version.

[0021] As an optional solution of this application, the PXE protocol is used to transmit the PXE server-driven RPM package repository information. According to the RFC standard, Option 178, which has not yet been allocated and used in DHCP Options, is used as the carrier. Among them, the DHCP configuration file dhcpd.conf in the PXE server adds a server-driven RPM package repository information path configuration.

[0022] As an optional solution of the present application, when identifying the hard disk model in the Live memory system environment, the Live memory system environment automatically detects and obtains the device type, device ID and alias of the hard disk. When the Linux operating system selects the target hard disk during the installation process, it automatically detects the hard disk and obtains the device type, device ID and alias of the hard disk based on the / dev and / sys file systems.

[0023] As an optional solution of the present application, determining whether the target hard disk is supported in the Live memory system environment includes the following steps:

[0024] Based on the obtained target hard disk alias information, check whether the system has the target hard disk driver from the system files, usr, lib, modules, "kernel version" or module.alias;

[0025] If there is a driver for the target hard disk, call the lsmod command to confirm whether the hard disk driver has been loaded. If not, call insmod to load the hard disk driver and jump directly to the normal operating system software package installation. If there is no driver for the target hard disk, configure the hard disk driver rpm package repository.

[0026] As an optional solution of the present application, the hard disk drive RPM package warehouse is configured in the Live memory system environment, and the RPM package warehouse is configured according to the IP address of the PXE server and the path of the transmitted hard disk drive RPM package warehouse on the PXE server.

[0027] As an optional solution of the present application, the method for installing a Linux operating system based on a PXE adaptive hard disk drive further includes:

[0028] Download the mapping file between the hard disk information and the PXE server driver RPM package from the second directory on the PXE server;

[0029] Download the rpm package of the hard disk drive from the PXE server;

[0030] Install the hard disk driver rpm package and load it in the Live memory system environment;

[0031] The Linux operating system installation program in the Live Memory system environment installs the operating system software packages according to normal logic.

[0032] As an optional solution for this application, download the rpm package of the hard disk drive from the PXE server, including:

[0033] The hard disk driver RPM package name is matched based on the hard disk information and hard disk information driver RPM package mapping file obtained when configuring the hard disk driver RPM package repository in the Live memory system environment, as well as the obtained hard disk device type, device ID, and kernel version.

[0034] If the match is successful, the hard disk driver rpm package is downloaded and cached in the Live memory system environment. Otherwise, the installation fails.

[0035] As an optional solution for this application, install the hard disk driver RPM package in the Live memory system environment and load it, including:

[0036] Get the path of the hard disk drive RPM package in the cache of the Live memory system environment;

[0037] Use the system command rpm-ivh 'hard disk drive rpm package' to install the hard disk drive rpm package in the Live memory system environment;

[0038] Use the system command insmod to load the hard disk driver.

[0039] As an optional solution for this application, after directly installing the normal operating system software package, it also includes:

[0040] Determine whether the hard disk is supported;

[0041] If the hard disk is not supported, copy the hard disk driver rpm package from the Live memory system environment to the hard disk file system;

[0042] Switch to the hard disk file system;

[0043] Install the hard disk driver RPM package in the hard disk file system and update the kernel configuration file.

[0044] As an optional solution for this application, install the hard disk driver RPM package on the hard disk file system and update the kernel module configuration file, including:

[0045] Find the hard disk file system mount point / sysroot in the Live memory system environment;

[0046] Use the system command mkdir to create a temporary directory / sysroot / new_disk and copy the hard disk driver rpm package to this directory;

[0047] Use the system command chroot / sysroot / to switch from the Live memory system environment file system to the hard disk file system;

[0048] Use the system command rpm-ivh 'hard disk drive rpm package' to install the hard disk drive rpm package on the hard disk file system. The corresponding hard disk drive ko file will be installed in the correct directory of the hard disk file system.

[0049] Use the system command 'depmod -a' to update the kernel module configuration file content on the hard disk file system.

[0050] In a second aspect, the present application also provides a PXE-based adaptive hard disk drive Linux operating system installation system, including the following modules:

[0051] PXE protocol enhancement module: used to transmit the path to the RPM package repository on the hard drive. It uses Option 178, which is not yet allocated in DHCP Options, as the carrier according to the RFC standard.

[0052] Hard disk drive software warehouse creation module: creates a hard disk drive RPM package software warehouse in the first directory of the PXE server, which is used to store various types of hard disk drive RPM packages;

[0053] A module for creating a mapping relationship between hard disk information and driver: creates a file of hard disk information and driver RPM packages in the second directory of the PXE server. Each line of data indicates the RPM package name corresponding to the driver kernel module compiled on the hard disk for a specific Linux Kernel version.

[0054] PXE protocol path update module: updates the PXE protocol, transmits the path of the hard disk drive RPM package repository on the PXE server, and identifies the hard disk model in the Live Memory system environment;

[0055] Hard disk identification and support determination module: Automatically detects and obtains the device type, device ID, and alias of the target hard disk in the Live memory system environment, and determines whether the operating system can be installed on the target hard disk based on the obtained hard disk information;

[0056] Unsupported target hard disk processing module: If the target hard disk is not supported, download the hard disk drive mapping relationship file from the first directory of the PXE server;

[0057] PXE server configuration module: performs yum configuration based on the IP address of the PXE server and the rpm package repository path of the hard disk drive;

[0058] Hard disk driver download and cache module: downloads and caches the hard disk driver RPM to the Live memory system cache for subsequent installation operations;

[0059] Hard disk driver installation and loading module: Install the hard disk driver RPM package and load the driver in the Live memory system environment;

[0060] Normal operating system software package installation module: After the hard disk driver is installed, the normal operating system software package is installed;

[0061] Supports direct module installation on the target hard disk: If the target hard disk is supported, directly install the normal operating system software package.

[0062] In another aspect of the present application, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, any one of the above-mentioned methods for installing a Linux operating system based on a PXE adaptive hard disk drive according to the present application is executed.

[0063] In another aspect of the present application, a computer-readable storage medium is provided, which stores computer program instructions. When the computer program instructions are executed, any of the above-mentioned methods for installing a Linux operating system based on a PXE adaptive hard disk drive according to the present application is implemented.

[0064] Compared with the prior art, the present invention proposes a method and system for installing a Linux operating system based on a PXE adaptive hard disk drive, which has the following beneficial effects:

[0065] 1. Automatically detect and determine whether the operating system installed on the target device is supported during installation;

[0066] 2. Enhance the PXE protocol to enable it to transmit information such as the hard drive RPM package repository path;

[0067] 3. The live memory system environment and the hard disk file system are linked in two stages for hard disk driver installation, solving the problems of the hard disk driver being unable to install the operating system when the ISO image file is missing and the difficulty of accessing the hard disk normally after the operating system is installed.

[0068] To sum up, the installation method of the Linux operating system based on PXE adaptive hard disk drive of the present application can enable the Linux operating system to automatically adapt to the installation on various types of hard disks. When the Linux operating system does not support a certain hard disk drive, there is no need to recompile the kernel vmlinuz, no need to inject the hard disk driver to remake Initramfs, and no need to reconstruct the ISO image file, thus avoiding problems such as technical inflexibility and excessive cost.

[0069] These and other aspects of the present application will be more clearly understood in the following description of the embodiments. It should be understood that the above general description and the following detailed description are merely exemplary and explanatory and cannot limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other embodiments can be obtained based on these drawings without paying any creative work.

[0071] In the figure:

[0072] FIG1 is a flow chart of a method for installing a Linux operating system based on a PXE adaptive hard disk drive according to an embodiment of the present application;

[0073] FIG2 is a flow chart of identifying and downloading RPM packages in a method for installing a Linux operating system based on a PXE adaptive hard disk drive according to an embodiment of the present application;

[0074] FIG3 is a flow chart of installing a hard disk drive RPM package in a Live memory system environment in a method for installing a Linux operating system based on a PXE adaptive hard disk drive according to an embodiment of the present application.

[0075] FIG4 is a schematic diagram of adding a DHCP configuration item in the installation method of the Linux operating system based on the PXE adaptive hard disk drive according to an embodiment of the present application. DETAILED DESCRIPTION

[0076] Below, the present application is further described in conjunction with the accompanying drawings and specific implementation methods. It should be noted that, under the premise of no conflict, the various embodiments or technical features described below can be arbitrarily combined to form new embodiments.

[0077] To make the purpose, technical solutions and advantages of this application more clearly understood, the following is a further detailed description of the embodiments of this application in conjunction with specific embodiments and with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0078] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0079] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, combined, or partially merged, so the actual execution order may vary depending on the actual situation.

[0080] The following describes some embodiments of the present application in detail with reference to the accompanying drawings. In the absence of conflict, the following embodiments and features therein may be combined with each other.

[0081] The purpose of this application is to provide a method and system for installing a Linux operating system based on a PXE-adaptive hard drive driver. This method can fully utilize the existing Linux operating system PXE installation mechanism and enable the Linux operating system to automatically adapt to installation on various types of hard drives. In the case where the Linux operating system does not support a certain hard drive driver, there is no need to recompile the kernel vmlinuz, inject the hard drive driver to recreate Initramfs, and even reconstruct the ISO image file, thereby improving R&D and operation and maintenance efficiency.

[0082] To achieve the above object, the present invention provides a method for installing a Linux operating system based on a PXE adaptive hard disk drive, comprising the following steps:

[0083] Step 1: Create a hard drive rpm package repository

[0084] Obtain the hard disk drive RPM package from the hard disk hardware manufacturer, or create your own hard disk drive RPM package for a specific Linux operating system distribution. Create a software repository for various types of hard disk drive RPM packages in the first directory on the PXE server.

[0085] Step 2: Create a mapping file between the hard disk information and its driver rpm package

[0086] Create a mapping file between hard drive information and its driver RPM package in the second directory on the PXE server. This directory should be accessible to the PXE server process. Each line of data in the mapping file indicates the RPM package name corresponding to the driver kernel module compiled for a specific Linux kernel version on a specific hard drive.

[0087] Step 3: Update the PXE protocol to transfer the hard drive RPM package repository path on the PXE server

[0088] To transmit the PXE server driver RPM package repository information during the PXE protocol, the unused DHCP Option 178 is used as the carrier according to the RFC standard. Furthermore, the DHCP configuration file dhcpd.conf on the PXE server needs to add a path to the server driver RPM package repository, as shown in Figure 4.

[0089] Step 4: Automatically detect and obtain the hard disk device type, device ID, and alias in the Live memory system environment

[0090] When the Linux operating system selects the target hard disk during installation, it automatically detects the hard disk based on the / dev and / sys file systems to obtain the hard disk's device type, device ID, and alias.

[0091] Step 5: Determine whether the target hard disk is supported in the Live memory system environment

[0092] 1) Based on the target hard disk alias information obtained in step 4, check whether the system has the target hard disk driver from the system file / usr / lib / modules / 'kernel version' / module.alias.

[0093] 2) If there is a driver for the target hard disk, call the lsmod command to confirm whether the hard disk driver has been loaded. If not loaded, call insmod to load the hard disk driver and jump to step 10. If there is no driver for the target hard disk, jump to step 6.

[0094] Step 6: Configure the hard drive rpm package repository in the Live memory system environment

[0095] Configure the RPM package repository based on the IP address of the PXE server and the path of the hard disk drive RPM package repository on the PXE server transferred in step 3.

[0096] Step 7: Download the mapping file between the hard disk information and its driver rpm package

[0097] Download the mapping file between the hard disk information and its driver RPM package from the second directory on the PXE server.

[0098] Step 8: Download the RPM package for the hard drive from the PXE server

[0099] Based on the mapping file between the hard drive information and its driver RPM package obtained in step 6, as well as the hard drive's device type, device ID, and kernel version obtained in step 4, the hard drive driver RPM package name is matched. If a match is successful, the hard drive driver RPM package is downloaded and cached in the Live Memory system environment. Otherwise, the installation fails.

[0100] Step 9: Install the hard disk drive rpm package and load it in the Live memory system environment

[0101] 1) Get the path of the hard disk drive RPM package in the cache of the Live memory system environment;

[0102] 2) Use the system command rpm-ivh 'hard disk driver rpm package' to install the hard disk driver rpm package in the Live memory system environment;

[0103] 3) Use the system command insmod to load the hard disk driver.

[0104] Step 10: In the Live Memory System environment, the Linux OS installer installs the OS software package according to normal logic.

[0105] Step 11: Install the hard disk driver rpm package on the hard disk file system and update the kernel module configuration file

[0106] 1) Find the hard disk file system mount point / sysroot in the Live memory system environment;

[0107] 2) Use the system command mkdir to create a new temporary directory / sysroot / new_disk and copy the hard disk driver RPM package to this directory;

[0108] 3) Use the system command chroot / sysroot / to switch from the Live memory system environment file system to the hard disk file system;

[0109] 4) Use the system command rpm-ivh 'hard disk driver rpm package' to install the hard disk driver rpm package on the hard disk file system. The corresponding hard disk driver ko file will be installed to the correct directory of the hard disk file system;

[0110] 5) Use the system command 'depmod -a' to update the kernel module configuration file content on the hard disk file system.

[0111] The embodiments of the present application provide a method for installing a Linux operating system based on a PXE adaptive hard disk drive. During the installation, the method automatically detects and determines whether the operating system installation on the target device is supported, enhances the PXE protocol so that it has the ability to transmit information such as the hard disk drive RPM package repository path, and implements a two-stage linkage hard disk drive installation using the Live memory system environment and the hard disk file system. This solves the problems of the hard disk drive being unable to install the operating system when the ISO image file is missing and the difficulty of normally accessing the hard disk after the operating system installation is completed.

[0112] The present application discloses a method for installing a Linux operating system based on a PXE adaptive hard disk drive, which enables the Linux operating system to automatically adapt to installation on various types of hard disks. When the Linux operating system does not support a certain hard disk drive, there is no need to recompile the kernel vmlinuz, inject the hard disk drive to recreate Initramfs, or reconstruct the ISO image file, thereby avoiding problems such as technical inflexibility and excessive cost.

[0113] In order to make people in this technical field better understand the technical solution of this application, the technical solution of this application is further described below in conjunction with the drawings and specific embodiments. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments.

[0114] In this embodiment, the Linux operating system ISO image file installed on the cloud computing resource pool server is ctyunos-2.0.1-220311-x86_64-dvd, the Linux kernel version is 4.19.90, the PXE server uses cobbler, and the hard disk controller is a RAID controller.

[0115] The present embodiment provides a method for installing a Linux operating system based on a PXE adaptive hard disk drive, and the installation includes the following steps:

[0116] Step 1: Obtain the hard disk driver RPM package from the hard disk hardware manufacturer, or create a hard disk driver RPM package for a specific Linux operating system distribution. Create a second directory disk_repo in the / var / www / cobbler / directory on the PXE server and use createrepo to create a software repository in this directory.

[0117] Step 2: Create the first directory mapping_dir in the / var / www / cobbler / directory on the PXE server, and create a file disk_rpm_mapping in this directory that maps the hardware information to the name of the driver RPM package. The file content is as follows:

[0118] Step 3: Modify the / etc / dhcpd.conf configuration file and add the driver-repo: / var / www / cobbler / driver-repo / x86_64 / configuration item. The PXE server stores the driver-repo in DHCP Options 178 in the DHCP Offer message it sends to the PXE client. The PXE client passes this information to the PXE server when booting the Live Memory system environment.

[0119] Step 4: Automatically detect and obtain the hard disk's device type, device ID, and alias in the installation environment;

[0120] According to the hard disk device type 00009005 and device ID 0000028 detected by the kernel, the corresponding modalias file is found in the system file directory / sys / devices, and the alias-pci:v00009005d0000028sv*sd*sc* of the target hard disk is obtained from the file.

[0121] Step 5: Determine whether the target hard disk is supported in the Live memory system environment;

[0122] According to the hard disk device alias in the system file / usr / lib / modules / 4.19.

[0123] Check if there is a corresponding hard drive ko file in 90-2102.2.0.0062 / modules.alias. In this case, since there is no ko file corresponding to RAID, skip to step 6 directly;

[0124] Step 6: Driver-repo obtained from the above steps: / var / www / cobbler / driver-repo / x86_64 /

[0125] And the IP address of the PXE server next-server, create the RPM package repository configuration file disk-driver.repo in the / etc / yum.repos.d / directory. The specific steps are as follows:

[0126] 1. Set baseurl in the disk-driver.repo configuration file to http: / / next-server / var / www / cobbler / driver-repo / x86_64

[0127] 2. Set enabled=1 in the disk-driver.repo configuration file to enable the use of the warehouse software repository;

[0128] 3. Use the system command yum makecache to download the metadata information of the hard disk drive RPM package warehouse from the PXE server to complete the RPM package software warehouse configuration.

[0129] Step 7: Use the wget command to download the disk_rpm_mapping file, which maps the hard disk information to its driver RPM package, from the second directory mapping_dir on the PXE server.

[0130] Step 8: Based on the hard disk device type and device ID obtained in Step 4, determine the RPM package name for the corresponding hard disk drive in the mapping file disk_rpm_mapping: kmod-megaraid_sa-3.2-x86_64.rpm. Use the system command yumdownloader kmod-megaraid_sas to download the hard disk drive RPM package and cache it in the Live memory system environment.

[0131] Step 9: In the Live memory system environment, use the system command "rpm-ivh kmod-megaraid_sa-3.2-x86_64.rpm" to install the hard disk driver RPM package, and use the system command insmod megaraid_sas.ko to load the memory environment;

[0132] Step 10: In the Live Memory System environment, the Linux OS installer installs the OS software package according to normal logic.

[0133] Step 11: Install the hard disk driver RPM package on the hard disk file system and update the kernel module configuration file. The specific steps are as follows:

[0134] 1. Find the mount point of the hard disk device file / dev / sda as / sysroot;

[0135] 2. Create a new directory / sysroot / new_disk and use the command cp kmod-megaraid_sa-3.2-x86_64.rpm / sysroot / new_disk to copy the driver to the hard disk file;

[0136] 3. Use the system command "chroot / sysroot" to switch from the Live memory system environment file system to the hard disk file system;

[0137] 4. Use the system command "rpm-ivhkmod-megaraid_sa-3.2-x86_64.rpm" to install the hard disk driver RPM package into the hard disk file system;

[0138] 5. Use the system command depmod -a to update the kernel module related configuration files on the hard disk file system.

[0139] It should be noted that the above figures are merely illustrative of the processes included in the methods according to exemplary embodiments of the present application and are not intended to be limiting. It is readily understood that the processes illustrated in the above figures do not indicate or limit the temporal order of these processes. Furthermore, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.

[0140] It should be understood that, although the above is described in a certain order, these steps are not necessarily performed in sequence according to the above order. Unless there is clear explanation in this article, the execution of these steps does not have strict order restriction, and these steps can be performed in other orders. Moreover, a part of the steps of the present embodiment may include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be performed in turn or alternately with at least a portion of the steps or stages in other steps or other steps.

[0141] A second aspect of the embodiments of the present application further provides a Linux operating system installation system based on a PXE adaptive hard disk drive, comprising the following modules:

[0142] PXE protocol enhancement module: used to transmit the hard disk drive RPM package software repository path, using the unallocated Option 178 in DHCP Options as the carrier according to the RFC standard.

[0143] Hard disk drive software warehouse creation module: creates a hard disk drive RPM package software warehouse in the first directory of the PXE server for storing various types of hard disk drive RPM packages.

[0144] Hard disk information and driver mapping relationship creation module: creates a hard disk driver mapping relationship file of hard disk information and driver RPM package in the second directory of the PXE server, in which each line of data indicates the RPM package name corresponding to the driver kernel module compiled on the hard disk for a specific Linux Kernel version.

[0145] PXE protocol path update module: updates the PXE protocol, transmits the path of the hard disk drive RPM package repository on the PXE server, and identifies the hard disk model in the Live Memory system environment.

[0146] Hard disk identification and support determination module: Automatically detects and obtains the device type, device ID, and alias of the target hard disk in the Live memory system environment, and determines whether the operating system can be installed on the target hard disk based on the obtained hard disk information.

[0147] Unsupported target hard disk processing module: If the target hard disk is not supported, download the hard disk drive mapping relationship file from the first directory of the PXE server.

[0148] PXE server configuration module: Perform yum configuration based on the IP address of the PXE server and the rpm package repository path of the hard disk drive.

[0149] Hard disk driver download and cache module: downloads and caches the hard disk driver RPM to the Live memory system cache for subsequent installation operations.

[0150] Hard disk driver installation and loading module: Install the hard disk driver RPM package and load the driver in the Live memory system environment.

[0151] Normal operating system software package installation module: After the hard disk driver installation is completed, the normal operating system software package is installed.

[0152] Supports direct module installation on the target hard disk: If the target hard disk is supported, directly install the normal operating system software package.

[0153] In this embodiment, the hard disk drive rpm package acquisition module: the hard disk drive rpm package can be obtained from the hard disk hardware manufacturer, or a hard disk drive rpm package can be self-made for a specific Linux operating system distribution.

[0154] Hard disk drive mapping relationship file module: In the hard disk drive mapping relationship file, each line of data is used to indicate the RPM package name corresponding to the driver kernel module compiled for the hard disk on a specific Linux Kernel version.

[0155] The PXE protocol transmission module is used to transmit the PXE server driver RPM package repository information. According to RFC standards, it uses Option 178, which is not yet assigned in DHCP Options, as the carrier. The DHCP configuration file dhcpd.conf on the PXE server adds a configuration item for the server driver RPM package repository path.

[0156] Target hard disk identification module: When identifying the hard disk model in the Live memory system environment, it automatically detects and obtains the hard disk's device type, device ID, and alias. When the Linux operating system selects the target hard disk during installation, it automatically detects the hard disk and obtains the hard disk's device type, device ID, and alias based on the / dev and / sys file systems.

[0157] In this embodiment, the target hard disk support determination module determines whether the target hard disk is supported in the Live memory system environment, including:

[0158] Based on the obtained target hard disk alias information, check whether the system has the target hard disk driver from the system files, usr, lib, modules, "kernel version" or module.alias;

[0159] If there is a driver for the target hard disk, call the lsmod command to confirm whether the hard disk driver has been loaded. If not, call insmod to load the hard disk driver and jump directly to the normal operating system software package installation;

[0160] If there is no target hard disk driver, configure the hard disk driver rpm package repository.

[0161] In this embodiment, the hard disk drive RPM package warehouse configuration module performs hard disk drive RPM package warehouse configuration in the Live memory system environment, and performs RPM package warehouse configuration according to the IP address of the PXE server and the path of the transmitted hard disk drive RPM package warehouse on the PXE server.

[0162] In this embodiment, the hard disk information downloading and matching module includes the following steps:

[0163] Download the mapping file between the hard disk information and the PXE server driver RPM package from the second directory of the PXE server;

[0164] The hard disk drive RPM package is downloaded from the PXE server. The hard disk drive RPM package name is matched based on the hard disk information and hard disk information driver RPM package mapping relationship file obtained when configuring the hard disk drive RPM package repository in the Live memory system environment, as well as the obtained hard disk device type, device ID, and kernel version.

[0165] If the match is successful, the hard disk driver rpm package is downloaded and cached in the Live memory system environment. Otherwise, the installation fails.

[0166] In this embodiment, the hard disk driver installation and loading module: **Installs and loads the hard disk driver rpm package in the Live memory system environment, including:

[0167] Get the path of the hard disk drive RPM package in the cache of the Live memory system environment;

[0168] Use the system command rpm-ivh 'hard disk drive rpm package' to install the hard disk drive rpm package in the Live memory system environment;

[0169] Use the system command insmod to load the hard disk driver.

[0170] In this embodiment, the normal operating system software package installation module: **The Linux operating system installation program in the Live memory system environment installs the operating system software package according to normal logic.

[0171] In this embodiment, the hard disk driver module is installed on the hard disk file system: **Install the hard disk driver rpm package on the hard disk file system and update the kernel module configuration file, including:

[0172] Find the hard disk file system mount point / sysroot in the Live memory system environment;

[0173] Use the system command mkdir to create a temporary directory / sysroot / new_disk and copy the hard disk driver RPM package to this directory;

[0174] Use the system command chroot / sysroot / to switch from the Live memory system environment file system to the hard disk file system;

[0175] Use the system command rpm-ivh 'hard disk drive rpm package' to install the hard disk drive rpm package on the hard disk file system. The corresponding hard disk drive ko file will be installed in the correct directory of the hard disk file system.

[0176] Use the system command 'depmod -a' to update the kernel module configuration file content on the hard disk file system.

[0177] According to a third aspect of the embodiments of the present application, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, a method of any one of the above embodiments is implemented.

[0178] The computer device includes a processor and a memory, and may also include an input device and an output device. The processor, memory, input device, and output device may be connected via a bus or other means. The input device may receive input digital or character information and generate signal input related to the migration of the PXE-adaptive hard drive-based Linux operating system installation. The output device may include a display device such as a display screen.

[0179] The memory, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as the program instructions / modules corresponding to the installation method of the Linux operating system based on the PXE adaptive hard disk drive in the embodiment of the present application. The memory may include a program storage area and a data storage area, wherein the program storage area can store operating devices and applications required for at least one function; the data storage area can store data created by the use of the installation method of the Linux operating system based on the PXE adaptive hard disk drive, etc. In addition, the memory may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory may optionally include a memory remotely located relative to the processor, and these remote memories may be connected to the local module via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0180] In some embodiments, the processor may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor is generally used to control the overall operation of the computer device. In this embodiment, the processor is used to run the program code stored in the memory or process data. The processors of the multiple computer devices of the computer device of this embodiment execute various functional applications and data processing of the server by running the non-volatile software programs, instructions and modules stored in the memory, that is, implementing the steps of the installation method of the Linux operating system based on the PXE adaptive hard disk drive of the above method embodiment.

[0181] It should be understood that, to the extent that there is no conflict between them, all the embodiments, features, and advantages described above for the installation method of the Linux operating system based on the PXE adaptive hard disk drive according to the present application are also applicable to the installation and storage medium of the Linux operating system based on the PXE adaptive hard disk drive according to the present application.

[0182] Those skilled in the art will also appreciate that the various exemplary logic blocks, modules, circuits and algorithmic steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software or a combination thereof. In order to clearly illustrate this interchangeability of hardware and software, a general description has been given of the functions of various schematic components, blocks, modules, circuits and steps. Whether this function is implemented as software or hardware depends on specific applications and the design constraints imposed on whole devices. Those skilled in the art can implement the function in a variety of ways for every specific application, but this implementation decision should not be interpreted as causing a departure from the disclosed scope of the present application's embodiments.

[0183] Finally, it should be noted that the computer-readable storage medium (e.g., memory) herein may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. By way of example and not limitation, non-volatile memory may include a read-only memory (ROM), a programmable ROM (PROM), an electrically programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), or a flash memory. Volatile memory may include a random access memory (RAM), which may act as an external cache memory. By way of example and not limitation, RAM may be obtained in a variety of forms, such as synchronous RAM (DRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct Rambus RAM (DRRAM). The storage devices of the disclosed aspects are intended to include, but are not limited to, these and other suitable types of memory.

[0184] The various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure herein may be implemented or executed using a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components. A general-purpose processor may be a microprocessor, but alternatively, the processor may be any conventional processor, controller, microcontroller, or state machine. The processor may also be implemented as a combination of computing devices, for example, a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP, and / or any other such configuration.

[0185] The above are exemplary embodiments disclosed in the present application, but it should be noted that various changes and modifications may be made without departing from the scope of the present application as defined in the claims. The functions, steps and / or actions of the method claims according to the disclosed embodiments described herein do not need to be performed in any particular order. In addition, although the elements disclosed in the embodiments of the present application may be described or required in individual form, they may also be understood as multiple unless expressly limited to the singular.

[0186] It should be understood that, as used herein, the singular form "a" or "an" is intended to include the plural form, unless the context clearly supports an exception. It should also be understood that, as used herein, "and / or" refers to any and all possible combinations of one or more of the items listed in association. The serial numbers of the embodiments disclosed in the above-mentioned embodiments of the present application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0187] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the disclosure of the embodiments of the present application (including the claims) is limited to these examples; based on the ideas of the embodiments of the present application, the technical features of the above embodiments or different embodiments can also be combined, and there are many other variations of different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the embodiments of the present application.

Claims

1. A method for installing a Linux operating system based on a PXE adaptive hard disk drive, characterized in that: The following steps are involved: Enhanced PXE protocol transmission of hard disk drive rpm package software repository path; Create a hard drive rpm package repository in the first directory on the PXE server; On the second day of recording on the PXE server, create the hard disk information and hard disk drive mapping relationship file of the driver rpm package; Update the PXE protocol to transfer the path of the hard disk drive rpm package repository on the PXE server and identify the hard disk model in the Live Memory system environment; Determine whether the target hard disk is supported in the Live memory system environment; If the target hard disk is not supported, download the hard disk drive mapping relationship file from the first directory of the PXE server; Perform yum configuration based on the PXE server IP and hard disk drive rpm package repository path; Download and cache hard drive rpm to Live memory system cache; Install the hard disk driver rpm package in the Live memory system environment and load the driver; Normal operating system software package installation; if the target hard disk is supported, directly perform normal operating system software package installation; Install the hard disk driver rpm package on the hard disk file system and update the kernel module configuration file.

2. The method for installing a Linux operating system based on a PXE adaptive hard disk drive according to claim 1, characterized in that: The hard disk drive rpm package is obtained from the hard disk hardware manufacturer, or a hard disk drive rpm package is made for a specific Linux operating system distribution.

3. The method for installing a Linux operating system based on a PXE adaptive hard disk drive according to claim 2, characterized in that: Each line of data recorded in the hard disk drive mapping relationship file is used to indicate the rpm package name corresponding to the driver kernel module compiled on the hard disk for a specific Linux Kernel version.

4. The method for installing a Linux operating system based on a PXE adaptive hard disk drive according to claim 3, characterized in that: The PXE protocol is used to transmit the PXE server driver rpm package repository information. According to the RFC standard, Option 178 in DHCP Options, which has not yet been allocated for use, is used as the carrier. The DHCP configuration file dhcpd.conf in the PXE server adds a server driver rpm package repository information path configuration.

5. The method for installing a Linux operating system based on a PXE adaptive hard disk drive according to claim 4, characterized in that: When identifying the hard disk model in the Live memory system environment, the Live memory system environment automatically detects and obtains the hard disk's device type, device ID, and alias. When the Linux operating system selects the target hard disk during the installation process, it automatically detects the hard disk based on the / dev and / sys file systems to obtain the hard disk's device type, device ID, and alias.

6. The method for installing a Linux operating system based on a PXE adaptive hard disk drive according to claim 1, characterized in that: Determining whether the target hard disk is supported in the Live memory system environment includes the following steps: According to the obtained target hard disk alias information, check whether the system has the target hard disk driver from the system files, usr, lib, modules, "kernel version" or module.alias; If there is a driver for the target hard disk, call the lsmod command to confirm whether the hard disk driver has been loaded. If not, call insmod to load the hard disk driver and jump directly to the normal operating system software package installation; if there is no driver for the target hard disk, configure the hard disk driver rpm package warehouse.

7. The method for installing a Linux operating system based on a PXE adaptive hard disk drive according to claim 6, characterized in that: In the Live memory system environment, configure the hard disk drive rpm package repository according to the IP address of the PXE server and the path of the hard disk drive rpm package repository on the PXE server.

8. The method for installing a Linux operating system based on a PXE adaptive hard disk drive according to claim 7, characterized in that: The method for installing the Linux operating system based on the PXE adaptive hard disk drive also includes: Download the mapping relationship file between the hard disk information and the PXE server driver rpm package from the second directory on the PXE server; Download the rpm package of the hard disk drive from the PXE server; Install the hard disk drive rpm package in the Live memory system environment and load it; The Linux operating system installation program in the Live Memory System environment installs the operating system packages according to normal logic.

9. The method for installing a Linux operating system based on a PXE adaptive hard disk drive according to claim 8, characterized in that: Download the rpm package of the hard disk drive from the PXE server, including: The hard disk drive rpm package name is matched according to the hard disk information and hard disk information driver rpm package mapping relationship file obtained when configuring the hard disk drive rpm package repository in the Live memory system environment, as well as the obtained hard disk device type, device ID, and kernel version; If the match is successful, the hard disk driver rpm package is downloaded and cached in the Live memory system environment, otherwise the installation fails.

10. A PXE-based adaptive hard disk drive Linux operating system installation system, characterized in that: The installation system based on the PXE adaptive hard disk drive Linux operating system is used to execute the installation method based on the PXE adaptive hard disk drive Linux operating system according to any one of claims 1 to 9, and the system includes the following modules: PXE protocol enhancement module: used to transmit the path of the hard disk drive rpm package software warehouse, using Option 178 in DHCP Options that has not been allocated as a carrier according to the RFC standard; Hard disk drive software warehouse creation module: creates a hard disk drive rpm package software warehouse in the first directory of the PXE server, which is used to store various types of hard disk drive rpm packages; A module for creating a hard disk information and driver mapping relationship: creates a hard disk driver mapping relationship file of hard disk information and driver rpm package in the second directory of the PXE server, wherein each line of data indicates the rpm package name corresponding to the driver kernel module compiled on the hard disk for a specific Linux Kernel version; PXE protocol path update module: updates the PXE protocol, transmits the path of the hard disk drive rpm package software repository on the PXE server, and identifies the hard disk model in the Live memory system environment; Hard disk identification and support determination module: automatically detects and obtains the device type, device ID and alias of the target hard disk in the Live memory system environment, and determines whether the operating system can be installed on the target hard disk based on the obtained hard disk information; Unsupported target hard disk processing module: If the target hard disk is not supported, download the hard disk drive mapping relationship file from the first directory of the PXE server; PXE server configuration module: Perform yum configuration based on the IP address of the PXE server and the hard disk drive rpm package repository path; Hard disk driver download and cache module: download and cache hard disk driver rpm to Live memory system cache for subsequent installation operations; Hard disk driver installation and loading module: install the hard disk driver rpm package and load the driver in the Live memory system environment; Normal operating system software package installation module: after the hard disk drive is installed, the normal operating system software package is installed; Supports direct installation of modules on the target hard disk: If the target hard disk is supported, directly install the normal operating system software package.

Citation Information

Patent Citations

  • Old utilization method and device, computer equipment and storage medium

    CN116301942A

  • Method and system for installing Linux operating system based on PXE self-adaptive hard disk drive

    CN117850815A

  • Method for automatic deploying operate system

    CN1916846A

  • Systems and methods for automatic provisioning of storage and operating system installation

    US20090013168A1