Method for partitioning Kylin V10 hard disk and installing display card through PXE network

Before installing the operating system through the PXE network, the KSCFG file is automatically selected for hard disk partitioning according to the nature of the computer, and the graphics card is automatically installed through the RC.LOCAL file, which solves the problem of long manual operation time and prone to errors in the existing technology, and realizes the automation of hard disk partitioning and graphics card installation, improving installation efficiency and accuracy.

CN119576351AActive Publication Date: 2025-03-07NR ELECTRIC CO LTD +1

Patent Information

Application Number
CN202411534845.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-03-07
Estimated Expiration
2044-10-31

AI Technical Summary

Technical Problem

After the installation of the operating system, the prior art requires manual modification of the KSCFG file and executing commands to partition the hard disk and install the graphics card, which leads to a long time and prone to errors, especially in the environment where power monitoring is installed in complex environments.

Method used

Through the PXE network, KSCFG files are automatically selected according to the nature and category of the computer, automatic partitioning of the hard disk is realized, and automatic installation of the graphics card is realized by modifying the operating system's login configuration file and self-executing the RC.LOCAL file.

Benefits of technology

It realizes automation of hard disk partitioning and graphics card installation, reduces manual intervention time, improves installation efficiency and accuracy, and is suitable for complex power monitoring installation environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119576351A_ABST
    Figure CN119576351A_ABST
Patent Text Reader

Abstract

The invention discloses a method and system for partitioning a Kylin V10 hard disk and installing a graphics card through a PXE network. The method comprises the steps that the computer hard disk capacity is obtained; calculating the capacity of each partition according to different computer properties and databases needing to be installed; carrying out automatic partitioning; a KSCFG file is changed, and a system starting file is replaced; replacing and starting the login configuration file and executing the command to realize root command line login; carrying out PXE installation; the RC.LOCAL self-execution SH file is utilized to automatically install the independent graphics card, the login configuration file is replaced and started, a command is executed, and emms password login is achieved. According to the method, the hard disk can be partitioned and the display card can be automatically installed according to the property of the computer, manual modification is not needed, the operation time is saved, the method can better adapt to the PCS9000 computer and other electric power monitoring system computers with many semaphores, the problems caused by the pause time of manual installation are reduced, the installation accuracy is improved, and the installation efficiency is improved. And the method is suitable for the assembly line of the PXE automatic computer installation workshop.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of power monitoring installation, and more specifically, relates to a method and system for partitioning a Kylin V10 hard disk and installing a graphics card through a PXE network. Background Art

[0002] PXE-Kylin V10 network installation automation system uses WIN10-64 bit + VMWARE virtual machine-CENTOS7 system as the installation server, which can install Kylin V10 on multiple computers at the same time. In the installation server, you need to partition the hard disk and then install the graphics driver.

[0003] The PCS9000 computer for power dispatching and monitoring is different from the PCS9700 computer for power substation monitoring. The PCS9700 substation monitoring signal volume is not large, so when partitioning the hard disk, only a folder needs to be created on the root directory, and no special hard disk partition is required when installing the operating system. However, due to the large number of signals, the PCS9000 computer for dispatching requires special hard disk partitioning (mainly time series server partition and historical database partition) when installing the operating system. For different projects, the computer configuration is different, which results in the need to manually modify the KSCFG file in advance or modify it manually during the installation process, and the automatic hard disk partition operation cannot be performed. The current routine operation for installing a graphics card is to install the operating system first, and then manually enter the terminal command to install the independent graphics card driver.

[0004] Existing installation technologies are:

[0005] The patent with announcement number CN117806665A discloses a method, device, equipment and medium for accelerating the installation of a graphics card driver in a WINDOWS operating system, which relates to the field of computer technology, including: obtaining a system driver warehouse driver package directory with the same directory structure as the graphics card driver installation package resource directory, and creating a first resource file in the system driver warehouse driver package directory; creating a second resource file in the system directory based on the corresponding relationship information list obtained by parsing the INF file; using file filtering technology to redirect access to the first resource file and access to the second resource file to files in the graphics card driver installation package resource directory; calling a callback function when creating a new process, if the new process is determined to be a graphics card driver installation process, using thread injection technology to allow the graphics card driver installation process to load a target DLL file; executing a hook target key function, the target key function removes the first attribute and adds the second attribute.

[0006] The patent with publication number CN107193595A discloses a method for installing the NVIDIA graphics driver in the LINUX operating system, which detects whether the nouveau driver in the current system is in operation, and the current system is a system above redhat 6; when the nouveau driver is in operation, the nouveau driver is turned off; the NVIDIA restricted driver in the blacklist is deleted; the installation instruction is executed, and the pre-downloaded NVIDIA graphics driver file is run to complete the installation of the NVIDIA graphics driver. This application successfully installs the NVIDIA graphics driver in a system above redhat 6 by turning off the nouveau driver that causes the NVIDIA graphics driver to fail to install, and deleting the NVIDIA restricted driver in the blacklist.

[0007] However, the above methods all require entering the operating system after installing the operating system, manually modifying the KSCFG file for partitioning, and manually using init 3 to enter the root command line state to execute the graphics card installation command. This takes a long time to use and requires manual intervention, which may cause errors, especially in special environments with complex power monitoring installations. Summary of the invention

[0008] In order to solve the deficiencies in the prior art, the present invention provides a method for partitioning the Kylin V10 hard disk and installing a graphics card through a PXE network. No manual operation is required. Automatic partitioning of computer installation is achieved by selecting the corresponding KSCFG file according to the nature of the computer application, and automatic installation of the graphics card is achieved by modifying the login configuration file of the operating system and the self-executing RC.LOCAL file.

[0009] The first aspect of the present invention proposes a method for partitioning a Kylin V10 hard disk and installing a graphics card on a PXE network. When installing the graphics card, the hardware disk must be partitioned according to the nature and category of the computer. The computer category includes a client computer, a timing server computer, a historical server computer with a disk array, a historical timing server computer with a disk array, a historical server computer without a disk array, and a historical timing server computer without a disk array; the method comprises the steps of:

[0010] Step 1, use LINUX command to obtain the hard disk name and hard disk capacity of the power monitoring system computer;

[0011] Step 2, determine whether the computer is a historical server, if so, determine that a historical database partition needs to be established, and calculate the database partition capacity according to the type of computer database of the power monitoring system where the graphics card is to be installed, otherwise, no database partition needs to be established;

[0012] Use LINUX commands to obtain the computer memory capacity of the power monitoring system and calculate the SWAP partition capacity;

[0013] Calculate the capacity of / boot / efi partition, biosboot partition, / boot partition, timing partition, history partition, root directory / partition according to the computer's boot mode, whether the hard disk is larger than 2T, and whether the computer is a timing or history server;

[0014] Step 3: Perform actual automatic partitioning operations based on the calculated capacity of each partition;

[0015] Step 4: Replace the Kylin V10 operating system boot file by modifying the KSCFG file to eliminate the manual license registration pause during the PXE installation process;

[0016] Step 5: Replace the Kylin V10 operating system startup login configuration file for the first time to implement password-free login for the root user; execute the systemctl command to implement command line login for the root user;

[0017] Step 6: Perform PXE installation. After the system configuration and optimization are completed, use the LINUX command to restart.

[0018] Step 7, use the RC.LOCAL self-executable SH file to automatically install the NVIDIA discrete graphics card;

[0019] Step 8: Replace the Kylin V10 operating system startup login configuration file for the second time, modify it to the file before replacement in step 4, and execute the systemctl command to implement the graphical login of the ems user with a password, and restart using the LINUX command.

[0020] Preferably, in step 1, the process of obtaining the hard disk capacity is: using the LINUX command to obtain the hard disk capacity text descriptor, judging whether there is a "T" or a "G" in the text descriptor and removing the letters in the text descriptor to obtain a number, if there is a "T", the hard disk capacity is the number multiplied by the square of 1024, and if there is a "G", the hard disk capacity is the number multiplied by 1024.

[0021] Preferably, in step 2, the database partition capacity value is calculated according to the type of database: if the database is an NRSQL database, the database partition is / nrsqldata, and / nrsqldata is the folder directory name of the NRSQL database; if the database is a DAMO database, the database partition ratio / dbdata: / dbbak: / dbarch is 16:3:1, and / dbdata: / dbbak: / dbarch are all folder directory names of the DAMO database; if the database is a Jincang database, the database partition ratio is

[0022] / dbdata: / dbbackup is 2:1, where / dbdata: / dbbackup is the folder directory name of the Jincang database.

[0023] Preferably, the specific capacity and division of the historical database partition are as follows: the database partition / nrsqldata capacity of the NRSQL database is at least 1T, and when partitioning, it is determined whether there is a disk array. If so, it is partitioned from the disk array, otherwise it is partitioned from the computer itself;

[0024] DAMO database, determine whether there is a disk array. If so, the database partition calculation formula is:

[0025]

[0026] Among them, C dbdata , C dbbak , C dbarch , C cpzl They are the capacity of database partitions / dbdata, / dbbak, / dbarch, and disk arrays;

[0027] If there is no disk array, the database partition calculation formula is:

[0028]

[0029] Among them, C jsjyp is the total capacity of the computer's hard disk, C reg is the minimum capacity required for other partitions to be allocated, including / boot / efi partition, biosboot partition, / boot partition, timing partition, root directory / partition capacity, C reg Set to at least 1600G;

[0030] Jincang historical database, determine whether there is a disk array. If so, the database partition calculation formula is:

[0031]

[0032] Among them C cpzl , C dbdata , C dabackup They are disk array hard disk capacity and Jincang database partition.

[0033] The capacity of / dbdata and / dbbackup;

[0034] If there is no disk array, the calculation formula for the Jincang historical database partition is:

[0035]

[0036] Among them, C jsjyp is the total capacity of the computer's hard disk, C reg The minimum capacity required for other partitions that need to be allocated, including / boot / efi partition, biosboot partition, / boot partition, timing partition, root directory / partition capacity), C reg Set it to at least 1600G.

[0037] Preferably, in step 2, the calculation of the SWAP partition capacity is specifically as follows: if the memory is less than 64G, SWAP is set to twice the memory capacity; if the memory is greater than or equal to 64G, it is set to the memory capacity; if the memory is greater than or equal to 128G, 128G is taken.

[0038] Preferably, in step 2, the other partitions include a / boot / efi partition, a biosboot partition, a / boot partition, a timing partition, a history partition, and a root directory / partition;

[0039] The computer's startup method, whether the hard disk is larger than 2T, and whether the computer is a timing or historical server are obtained through the KSCFG file.

[0040] Preferably, in step 2, the calculation of the capacity of other partitions is specifically as follows:

[0041] Add a / boot partition with a capacity of 2G; determine the computer boot mode. If the computer is UEFI booted, add a / boot / efi partition with a capacity of 2G. If it is LEGACY booted, determine whether the hard disk capacity is greater than 2T. If so, add a biosboot partition with a capacity of 2G. Otherwise, do not add a biosboot partition.

[0042] Determine whether the computer is a time series or history server. If it is a time series server, add a time series partition / users / ems / rtdata with a capacity of 500G. If the actual measurement point has specific requirements, set it to the required capacity. If it is a history server, determine the database again. If it is an NRSQL database, add a history partition / nrsqldata with a capacity of 500G. If it is a Jincang database, add a history partition

[0043] / home / kingbase, with a capacity of 500G; if it is a DAMO database, add a historical partition / home / dmdba with a capacity of 500G; if it is a time series + historical server, then the corresponding partitions added to the historical server and the time series server are added; the remaining space is the root directory / partition, and the root directory / partition capacity is determined. If it is less than 500G, an error is reported and return to step 1 to repartition.

[0044] Preferably, in step 3, the actual automatic partitioning operation includes:

[0045] All partition capacities are pre-calculated using LINUX commands. Use LINUX commands to modify the KSCFG file. First, clear all partitions. Then create partitions of corresponding capacity based on the required partitions and calculated partition capacities. Finally, use mfx.ext4 to format the hard disk partitions.

[0046] Preferably, in step 4, the modification of the KSCFG file specifically includes: modifying the original firstboot--enable in the KSCFG file to firstboot--disabled, and adding eula--agreed.

[0047] Preferably, in step 5, the first replacement of the Kylin V10 operating system startup login configuration file is specifically to modify the disabled guest mode in the conf class configuration file to the root user mode, and define the command executed when starting the service in the service class configuration file as root.

[0048] Preferably, in step 7, first use the RC.LOCAL self-executable sh file to uninstall the third-party graphics card driver nouveau. After the uninstallation is completed, it will automatically restart. Then use the RC.LOCAL self-executable sh file of the Kylin V10 operating system to install the NVIDIA driver. After the installation is complete, modify the sh file name so that the file will not continue to be executed.

[0049] The second aspect of the present invention proposes a system for partitioning a Kylin V10 hard disk and installing a graphics card using a PXE network of the method described in the first aspect of the present invention, including: a computer property acquisition module, a partition capacity calculation module, a partition module, a registration license pause elimination module, a login configuration file modification module, and an automatic installation module; specifically:

[0050] Computer property acquisition module: obtain the hard disk capacity and memory capacity through LINUX commands, and select the KSCFG file according to the computer's startup mode, whether the hard disk is larger than 2T, and whether the computer is a timing or history server;

[0051] Partition capacity calculation module: calculates the capacity of SWAP partition, historical database partition, / boot / efi partition, biosboot partition, / boot partition, timing partition, root directory / partition according to hard disk capacity, memory capacity and other computer properties;

[0052] Partition module: KSCFG file uses LINUX commands to clear all partitions, then create partitions of corresponding capacity according to the required partitions and calculated partition capacity, and format the hard disk partitions;

[0053] Registration license pause elimination module: modify KSCFG file and replace Kylin V10 operating system startup file;

[0054] Login profile modification module: replace the Kylin V10 operating system startup login profile and execute the systemctl command to implement password-free login for the root user or password-required graphical login for the ems user;

[0055] Automatic installation module: Use the RC.LOCAL self-executable SH file to automatically install the NVIDIA discrete graphics card.

[0056] The beneficial effect of the present invention is that, compared with the prior art, different KSCFG files are configured by computer application properties, and the capacity of each partition is automatically calculated in the early stage of the installation process, which not only considers the hard disk size and memory size, but also considers different databases, different startup modes and special partitions required by history and timing servers, so as to better adapt to power dispatching monitoring PCS9000 computers and other power monitoring system computers with a large number of signals; by calculating the partition value in advance in KSCFG, writing the partition operation, and realizing automatic partitioning, no manual modification is required, saving operation time, and better adapting to power dispatching monitoring PCS9000 computers and other power monitoring system computers with a large number of signals when installing the operating system, reducing the problems and defects caused by the manual partition pause time. The manual registration license pause during the PXE installation process is eliminated by modifying the KSCFG file; and the root user command line password-free login is realized by replacing the Kirin V10 operating system startup login configuration file and executing the command; the self-executable file RC.LOCAL is used to install the independent graphics card NVIDIA, and automatic installation is realized without human intervention, which improves the installation efficiency and installation accuracy. It is more suitable for the PXE automated computer installation workshop assembly line. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 Automatic hard disk partitioning and automatic graphics card installation flow chart for PXE network;

[0058] Figure 2 This is a schematic diagram of the independent graphics card driver after installing the independent graphics card.

[0059] Figure 3 Diagram for modifying KSCFG file to implement Kylin installation skipping license permission pause.

[0060] Figure 4 Diagram for disabling guest mode and changing to root user mode;

[0061] Figure 5Execute the systemctl command to log in to the command line as the root user. DETAILED DESCRIPTION

[0062] In order to make the purpose, technical scheme and advantages of the present invention clearer, the technical scheme of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. The embodiments described in this application are only embodiments of a part of the present invention, rather than all embodiments. Based on the spirit of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work belong to the protection scope of the present invention.

[0063] like Figure 1 As shown, embodiment 1 of the present invention provides a method for partitioning a Kylin V10 hard disk and installing a graphics card through a PXE network. Before installation, the PXE installation server is powered on, the VMWARE virtual machine is opened, and the virtual machine automatically detects whether the client computer is connected. The PXE installation server and the Kylin V10 computer loading vehicle to be installed are connected together through a switch and Ethernet network wiring. The Kylin V10 computer to be installed is powered on, enters the PXE BOOT network boot state, enters the PXE installation interface, and performs installation operations; when installing the graphics card, the hardware disk must be partitioned according to the nature and category of the computer, and the computer category includes a client computer, a timing server computer, a historical server computer with a disk array, a historical timing server computer with a disk array, a historical server computer without a disk array, and a historical timing server computer without a disk array; the steps are included:

[0064] Step 1: Use LINUX commands to obtain the hard disk name and hard disk capacity of the power monitoring system computer.

[0065] Preferably, in step 1, the process of obtaining the hard disk capacity is: using the LINUX command to obtain the hard disk capacity text descriptor, judging whether there is a "T" or a "G" in the text descriptor and removing the letters in the text descriptor to obtain a number, if there is a "T", the hard disk capacity is the number multiplied by the square of 1024, and if there is a "G", the hard disk capacity is the number multiplied by 1024.

[0066] Step 2, determine whether the computer is a historical server, if so, determine that a historical database partition needs to be established, and calculate the database partition capacity according to the type of computer database of the power monitoring system where the graphics card is to be installed, otherwise, no database partition needs to be established;

[0067] Use LINUX commands to obtain the computer memory capacity of the power monitoring system and calculate the SWAP partition capacity;

[0068] Calculate the capacity of / boot / efi partition, biosboot partition, / boot partition, timing partition, history partition, root directory / partition based on the computer's boot mode, whether the hard disk is larger than 2T, and whether the computer is a timing or history server.

[0069] Preferably, in step 2, the database partition capacity value is calculated according to the type of database: if the database is an NRSQL database, the database partition is / nrsqldata, and / nrsqldata is the folder directory name of the NRSQL database; if the database is a DAMO database, the database partition ratio / dbdata: / dbbak: / dbarch is 16:3:1, and / dbdata: / dbbak: / dbarch are all folder directory names of the DAMO database; if the database is a Jincang database, the database partition ratio is

[0070] / dbdata: / dbbackup is 2:1, where / dbdata: / dbbackup is the folder directory name of the Jincang database.

[0071] Preferably, the specific capacity and division of the historical database partition are as follows: the database partition / nrsqldata capacity of the NRSQL database is at least 1T, and when partitioning, it is determined whether there is a disk array. If so, it is partitioned from the disk array, otherwise it is partitioned from the computer itself;

[0072] DAMO database, determine whether there is a disk array. If so, the database partition calculation formula is:

[0073]

[0074] Among them, C dbdata , C dbbak , C dbarch , C cpzl They are the capacity of database partitions / dbdata, / dbbak, / dbarch, and disk arrays;

[0075] If there is no disk array, the database partition calculation formula is:

[0076]

[0077] Among them, C jsjyp is the total capacity of the computer's hard disk, C reg is the minimum capacity required for other partitions to be allocated, including / boot / efi partition, biosboot partition, / boot partition, timing partition, root directory / partition capacity, C reg Set to at least 1600G;

[0078] Jincang historical database, determine whether there is a disk array. If so, the database partition calculation formula is:

[0079]

[0080] Among them C cpzl , C dbdata , C dabackup They are disk array hard disk capacity and Jincang database partition.

[0081] The capacity of / dbdata and / dbbackup;

[0082] If there is no disk array, the calculation formula for the Jincang historical database partition is:

[0083]

[0084] Among them, C jsjyp is the total capacity of the computer's hard disk, C reg The minimum capacity required for other partitions that need to be allocated, including / boot / efi partition, biosboot partition, / boot partition, timing partition, root directory / partition capacity), C reg Set it to at least 1600G.

[0085] Preferably, in step 2, the calculation of the SWAP partition capacity is specifically as follows: if the memory is less than 64G, SWAP is set to twice the memory capacity; if the memory is greater than or equal to 64G, it is set to the memory capacity; if the memory is greater than or equal to 128G, 128G is taken.

[0086] Preferably, in step 2, the other partitions include a / boot / efi partition, a biosboot partition, a / boot partition, a timing partition, a history partition, and a root directory / partition;

[0087] The computer's startup method, whether the hard disk is larger than 2T, and whether the computer is a timing or historical server are obtained through the KSCFG file.

[0088] Preferably, in step 2, the calculation of the capacity of other partitions is specifically as follows:

[0089] Add a / boot partition with a capacity of 2G; determine the computer boot mode. If the computer is UEFI booted, add a / boot / efi partition with a capacity of 2G. If it is LEGACY booted, determine whether the hard disk capacity is greater than 2T. If so, add a biosboot partition with a capacity of 2G. Otherwise, do not add a biosboot partition.

[0090] Determine whether the computer is a time series or history server. If it is a time series server, add a time series partition / users / ems / rtdata with a capacity of 500G. If the actual measurement point has specific requirements, set it to the required capacity. If it is a history server, determine the database again. If it is an NRSQL database, add a history partition / nrsqldata with a capacity of 500G. If it is a Jincang database, add a history partition

[0091] / home / kingbase, with a capacity of 500G; if it is a DAMO database, add a historical partition / home / dmdba with a capacity of 500G; if it is a time series + historical server, then the corresponding partitions added to the historical server and the time series server are added; the remaining space is the root directory / partition, and the root directory / partition capacity is determined. If it is less than 500G, an error is reported and return to step 1 to repartition.

[0092] Specifically, after the installation of this embodiment is completed, the automatic partition list of the computer hard disk of the Jincang historical time series database without a disk array is shown in Table 1.

[0093] Table 1 Automatic partitioning of the computer hard disk of the Jincang historical time series database without a disk array after the installation of this embodiment is completed

[0094] name size / 500G biosboot 2G / home / kingbase 500G / boot 2G / dbbackup 350G / dbdata 700G / users / ems / rtdata 500G / boot / efi 2G

[0095] Step 3: Perform actual automatic partitioning operations based on the calculated capacity of each partition.

[0096] Preferably, in step 3, the actual automatic partitioning operation includes:

[0097] All partition capacities are pre-calculated using LINUX commands. Use LINUX commands to modify the KSCFG file. First, clear all partitions. Then create partitions of corresponding capacity based on the required partitions and calculated partition capacities. Finally, use mfx.ext4 to format the hard disk partitions.

[0098] Step 4: Replace the Kylin V10 operating system startup file by modifying the KSCFG file to eliminate the manual license registration pause during the PXE installation process.

[0099] Preferably, if Figure 3 As shown, in step 4, the modification of the KSCFG file is specifically: changing the original firstboot--enable in the KSCFG file to firstboot--disabled, and adding eula--agreed.

[0100] Step 5: Replace the Kylin V10 operating system startup login configuration file for the first time to enable root user to log in without a password; Figure 5 As shown in the figure, execute the systemctl command to log in as the root user.

[0101] Preferably, in step 5, Figure 4 As shown, the first replacement of the Kylin V10 operating system startup login configuration file specifically changes the disabled guest mode in the conf class configuration file to the root user mode, and defines the command executed when starting the service in the service class configuration file as root.

[0102] Step 6: Perform PXE installation. After the system configuration and optimization are completed, use the LINUX command to restart.

[0103] Step 7, use the RC.LOCAL self-executable SH file to automatically install the NVIDIA discrete graphics card;

[0104] Preferably, if Figure 2 As shown, in step 7, first use the RC.LOCAL self-executable sh file to uninstall the third-party graphics driver nouveau. After the uninstallation is complete, it will automatically restart. Then use the RC.LOCAL self-executable sh file of the Kylin V10 operating system to install the NVIDIA driver. After the installation is complete, modify the sh file name so that the file will not continue to be executed.

[0105] Step 8: Replace the Kylin V10 operating system startup login configuration file for the second time, modify it to the file before replacement in step 4, and execute the systemctl command to implement the graphical login of the ems user with a password, and restart using the LINUX command.

[0106] After testing, this embodiment has found that the automatic partitioning process saves 15 minutes compared to manual partitioning, and the automatic graphics card installation process saves 6 minutes compared to manual installation, a total of 21 minutes. The installation accuracy rate reaches 100%, reducing human intervention and no manual pause operation in the middle, which is more suitable for PXE automated computer installation workshop assembly line.

[0107] Embodiment 2 of the present invention proposes a system for partitioning a Kylin V10 hard disk and installing a graphics card using a PXE network of the method described in Embodiment 1 of the present invention, including: a computer property acquisition module, a partition capacity calculation module, a partition module, a registration license pause elimination module, a login configuration file modification module, and an automatic installation module; specifically:

[0108] Computer property acquisition module: obtain the hard disk capacity and memory capacity through LINUX commands, and select the KSCFG file according to the computer's startup mode, whether the hard disk is larger than 2T, and whether the computer is a timing or history server;

[0109] Partition capacity calculation module: calculates the capacity of SWAP partition, historical database partition, / boot / efi partition, biosboot partition, / boot partition, timing partition, root directory / partition according to hard disk capacity, memory capacity and other computer properties;

[0110] Partition module: KSCFG file uses LINUX commands to clear all partitions, then create partitions of corresponding capacity according to the required partitions and calculated partition capacity, and format the hard disk partitions;

[0111] Registration license pause elimination module: modify KSCFG file and replace Kylin V10 operating system startup file;

[0112] Login profile modification module: replace the Kylin V10 operating system startup login profile and execute the systemctl command to implement password-free login for the root user or password-required graphical login for the ems user;

[0113] Automatic installation module: Use the RC.LOCAL self-executable SH file to automatically install the NVIDIA discrete graphics card.

[0114] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.

[0115] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.

[0116] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0117] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0118] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A method for partitioning the Kylin V10 hard disk and installing a graphics card through a PXE network. When installing the graphics card, the hardware disk must be partitioned according to the nature and category of the computer. The computer categories include client computers, timing server computers, historical server computers with disk arrays, historical timing server computers with disk arrays, historical server computers without disk arrays, and historical timing server computers without disk arrays; characterized in that: Includes steps: Step 1, use LINUX command to obtain the hard disk name and hard disk capacity of the power monitoring system computer; Step 2, determine whether the computer is a historical server, if so, determine that a historical database partition needs to be established, and calculate the database partition capacity according to the type of computer database of the power monitoring system where the graphics card is to be installed, otherwise, no database partition needs to be established; Use LINUX commands to obtain the computer memory capacity of the power monitoring system and calculate the SWAP partition capacity; Calculate the capacity of / boot / efi partition, biosboot partition, / boot partition, timing partition, history partition, root directory / partition according to the computer's boot mode, whether the hard disk is larger than 2T, and whether the computer is a timing or history server; Step 3: Perform actual automatic partitioning operations based on the calculated capacity of each partition; Step 4: Replace the Kylin V10 operating system boot file by modifying the KSCFG file to eliminate the manual license registration pause during the PXE installation process; Step 5: Replace the Kylin V10 operating system startup login configuration file for the first time to implement password-free login for the root user; execute the systemctl command to implement command line login for the root user; Step 6: Perform PXE installation. After the system configuration and optimization are completed, use the LINUX command to restart. Step 7, use the RC.LOCAL self-executable SH file to automatically install the NVIDIA discrete graphics card; Step 8: Replace the Kylin V10 operating system startup login configuration file for the second time, modify it to the file before replacement in step 4, and execute the systemctl command to implement the graphical login of the ems user with a password, and restart using the LINUX command.

2. The method for partitioning the Kylin V10 hard disk and installing a graphics card using a PXE network as claimed in claim 1, characterized in that: In step 1, the process of obtaining the hard disk capacity is: use the LINUX command to obtain the hard disk capacity text descriptor, determine whether there is a "T" or a "G" in the text descriptor and remove the letters in the text descriptor to obtain a number. If there is a "T", the hard disk capacity is the number multiplied by 1024 squared, and if there is a "G", the hard disk capacity is the number multiplied by 1024.

3. The method for partitioning the Kylin V10 hard disk and installing a graphics card using a PXE network as described in claim 1-2, characterized in that: In step 2, the database partition capacity value is calculated according to the type of database: if the database is an NRSQL database, the database partition is / nrsqldata, and / nrsqldata is the folder directory name of the NRSQL database; if the database is a DAMO database, the database partition ratio / dbdata: / dbbak: / dbarch is 16:3:1, and / dbdata: / dbbak: / dbarch are all folder directory names of the DAMO database; if the database is a Jincang database, the database partition ratio / dbdata: / dbbackup is 2:1, and / dbdata: / dbbackup are the folder directory names of the Jincang database.

4. The method for partitioning the Kylin V10 hard disk and installing a graphics card using a PXE network as described in claims 1-3, characterized in that: The specific capacity and division of the historical database partition are as follows: the database partition / nrsqldata of the NRSQL database has a capacity of at least 1T. When partitioning, it is determined whether there is a disk array. If so, it is partitioned from the disk array, otherwise it is partitioned from the computer itself; DAMO database, determine whether there is a disk array. If so, the database partition calculation formula is: Among them, C dbdata , C dbbak , C dbarch , C cpzl They are the capacity of database partitions / dbdata, / dbbak, / dbarch, and disk arrays; If there is no disk array, the database partition calculation formula is: Among them, C jsjyp is the total capacity of the computer's hard disk, C reg is the minimum capacity required for other partitions to be allocated, including / boot / efi partition, biosboot partition, / boot partition, timing partition, root directory / partition capacity, C reg Set to at least 1600G; Jincang historical database, determine whether there is a disk array. If so, the database partition calculation formula is: Among them C cpzl , C dbdata , C dabackup They are the capacity of the disk array hard disk, and the capacity of the Jincang database partitions / dbdata and / dbbackup. If there is no disk array, the calculation formula for the Jincang historical database partition is: Among them, C jsjyp is the total capacity of the computer's hard disk, C reg The minimum capacity required for other partitions that need to be allocated, including / boot / efi partition, biosboot partition, / boot partition, timing partition, root directory / partition capacity), C reg Set it to at least 1600G.

5. The method for partitioning the Kylin V10 hard disk and installing a graphics card using a PXE network as described in claims 1-4, characterized in that: In step 2, the calculation of the SWAP partition capacity is specifically as follows: if the memory is less than 64G, SWAP is set to twice the memory capacity; if the memory is greater than or equal to 64G, it is set to the memory capacity; if the memory is greater than or equal to 128G, 128G is taken.

6. The method for partitioning the Kylin V10 hard disk and installing a graphics card using a PXE network as described in claims 1-5, characterized in that: In step 2, the other partitions include / boot / efi partition, biosboot partition, / boot partition, timing partition, history partition, root directory / partition; The computer's startup method, whether the hard disk is larger than 2T, and whether the computer is a timing or historical server are obtained through the KSCFG file.

7. The method for partitioning the Kylin V10 hard disk and installing a graphics card using a PXE network as described in claims 1-6, characterized in that: In step 2, the capacity of other partitions is calculated as follows: Add a / boot partition with a capacity of 2G; determine the computer boot mode. If the computer is UEFI booted, add a / boot / efi partition with a capacity of 2G. If it is LEGACY booted, determine whether the hard disk capacity is greater than 2T. If so, add a biosboot partition with a capacity of 2G. Otherwise, do not add a biosboot partition. Determine whether the computer is a time series or history server. If it is a time series server, add a time series partition / users / ems / rtdata with a capacity of 500G. If the actual measurement point has specific requirements, set it to the required capacity. If it is a history server, judge the database again. If it is an NRSQL database, add a history partition / nrsqldata with a capacity of 500G. If it is a Kingbase database, add a history partition / home / kingbase with a capacity of 500G. If it is a DAMO database, add a history partition / home / dmdba with a capacity of 500G. If it is a time series + history server, add the corresponding partitions for the history server and the time series server. Finally, the remaining space is the root directory / partition. Determine the root directory / partition capacity. If it is less than 500G, report an error and return to step 1 to repartition.

8. The method for partitioning the Kylin V10 hard disk and installing a graphics card using a PXE network as described in claims 1-7, characterized in that: In step 3, the actual automatic partitioning operation includes: All partition capacities are pre-calculated using LINUX commands. Use LINUX commands to modify the KSCFG file. First, clear all partitions. Then create partitions of corresponding capacity based on the required partitions and calculated partition capacities. Finally, use mfx.ext4 to format the hard disk partitions.

9. The method for partitioning the Kylin V10 hard disk and installing a graphics card using a PXE network as described in claims 1-8, characterized in that: In step 4, the modification of the KSCFG file specifically includes: modifying the original firstboot--enable in the KSCFG file to firstboot--disabled, and adding eula--agreed.

10. The method for partitioning the Kylin V10 hard disk and installing a graphics card using a PXE network as described in claims 1-9, characterized in that: In step 5, the first replacement of the Kylin V10 operating system startup login configuration file specifically modifies the disabled guest mode in the conf class configuration file to the root user mode, and defines the command executed when starting the service in the service class configuration file as root.

11. The method for partitioning the Kylin V10 hard disk and installing a graphics card using a PXE network as described in claims 1-10, characterized in that: In step 7, first use the RC.LOCAL self-executable sh file to uninstall the third-party graphics driver nouveau. After the uninstallation is complete, it will automatically restart. Then use the RC.LOCAL self-executable sh file of the Kylin V10 operating system to install the NVIDIA driver. After the installation is complete, modify the sh file name so that the file will not continue to be executed.

12. A system for partitioning a Kylin V10 hard disk and installing a graphics card using a PXE network according to any one of claims 1 to 11, comprising: Computer property acquisition module, partition capacity calculation module, partition module, registration license pause elimination module, login configuration file modification module, automatic installation module; characterized by: Computer property acquisition module: obtain the hard disk capacity and memory capacity through LINUX commands, and select the KSCFG file according to the computer's startup mode, whether the hard disk is larger than 2T, and whether the computer is a timing or history server; Partition capacity calculation module: calculates the capacity of SWAP partition, historical database partition, / boot / efi partition, biosboot partition, / boot partition, timing partition, root directory / partition according to hard disk capacity, memory capacity and other computer properties; Partition module: KSCFG file uses LINUX commands to clear all partitions, then create partitions of corresponding capacity according to the required partitions and calculated partition capacities, and format the hard disk partitions; Registration license pause elimination module: modify KSCFG file and replace Kylin V10 operating system startup file; Login profile modification module: replace the Kylin V10 operating system startup login profile and execute the systemctl command to implement password-free login for the root user or password-required graphical login for the ems user; Automatic installation module: Use the RC.LOCAL self-executable SH file to automatically install the NVIDIA discrete graphics card.

Citation Information

Patent Citations

  • NVIDIA display card driver installation method and apparatus

    CN107193595A

  • Method, device and equipment for accelerating installation of video card driver and medium

    CN117806665A

  • P2V (physical to virtual) transferring and configuration method based on OEM (original equipment manufacturer) operating system

    CN104503823A

  • Configuration method of PXE server under Kylin V4 operating system

    CN110399144A

  • Method and device for installing linux operating system

    CN113821220A

Cited By

  • Hard disk partitioning method, device and equipment and computer readable storage medium

    CN120610665A