A method for partitioning a Kylin V10 hard drive and installing a graphics card using a PXE network.
By using the PXE network automation method, selecting the KSCFG file and modifying the login configuration file according to the computer's nature, the hard drive of the power monitoring system computer is automatically partitioned and the graphics card is automatically installed. This solves the problems of long time and errors caused by manual operation in the existing technology, and improves the installation efficiency and accuracy.
Patent Information
- Application Number
- CN202411534845.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2044-10-31
AI Technical Summary
Existing technologies require manual modification of the KSCFG file during the installation of power monitoring systems, especially for the hard disk partitioning and graphics card installation of the PCS9000 power dispatch monitoring computer. This results in lengthy operation times, a high risk of errors, and an inability to achieve automation.
Using the PXE network, the KSCFG file is selected based on the computer's characteristics, the partition size is automatically calculated, and the graphics card is automatically installed by modifying the operating system's login configuration file and the self-executing RC.LOCAL file. This process includes obtaining the computer's characteristics, calculating the partition size, performing partition operations, modifying the login configuration file, and automatically installing the graphics card.
It has achieved automated hard disk partitioning and graphics card installation for power monitoring system computers, reducing operation time, improving installation efficiency and accuracy, and adapting to environments with high signal volume, such as the PCS9000 power dispatch and monitoring computer.
Smart Images

Figure CN119576351B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of power monitoring installation technology, and more specifically, relates to a method and system for partitioning a Kylin V10 hard drive and installing a graphics card using a PXE network. Background Technology
[0002] The PXE-Kylin V10 network installation automation system uses a 64-bit Windows 10 system with a VMware virtual machine running CentOS 7 as the installation server, allowing simultaneous installation of Kylin V10 on multiple computers. On the installation server, the hard drive needs to be partitioned and then the graphics card driver needs to be installed.
[0003] The PCS9000 computer for power dispatch monitoring differs from the PCS9700 computer for power substation monitoring. The PCS9700 substation monitoring signal volume is relatively small, so hard drive partitioning only requires creating folders in the root directory; no special hard drive partitioning is needed when installing the operating system. However, the dispatch PCS9000 computer, due to its large signal volume, requires special hard drive partitioning (mainly for the time-series server and historical database). Different projects have different computer configurations, necessitating manual modification of the KSCFG file before installation or manual modification during the installation process, making automated hard drive partitioning impossible. The current standard procedure for installing a graphics card is to first install the operating system, and then manually install the dedicated graphics card driver by entering commands in the terminal.
[0004] Existing installation technologies include:
[0005] Patent CN117806665A discloses a method, apparatus, device, and medium for accelerating graphics card driver installation in the Windows operating system, relating to the field of computer technology. The method includes: obtaining a system driver repository directory with the same directory structure as the graphics card driver installation package resource directory; creating a first resource file in the system driver repository directory; creating a second resource file in the system directory based on a list of corresponding information obtained from parsing an INF file; redirecting access to the first resource file and access to the second resource file to files in the graphics card driver installation package resource directory using file filtering technology; calling a callback function when a new process is created; if the new process is determined to be a graphics card driver installation process, using thread injection technology to make the graphics card driver installation process load the target DLL file; executing a hooked target key function, where the target key function removes a first attribute and adds a second attribute.
[0006] Patent CN107193595A discloses a method for installing NVIDIA graphics card drivers on a Linux operating system. The method involves detecting whether the nouveau driver is running on the current system (e.g., Red Hat 6 or later). If the nouveau driver is running, it is disabled. Restricted NVIDIA drivers from the blacklist are deleted. The installation command is then executed, running the pre-downloaded NVIDIA graphics card driver file to complete the installation. This application enables successful installation of NVIDIA graphics card drivers on Red Hat 6 and later systems by disabling the nouveau driver (which prevents installation) and deleting restricted NVIDIA drivers from the blacklist.
[0007] However, all of the above methods require entering the operating system after installation, 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 process is time-consuming and requires manual intervention, which may lead to errors, especially in complex environments such as power monitoring installations. Summary of the Invention
[0008] To address the shortcomings of existing technologies, this invention provides a method for partitioning a Kylin V10 hard drive and installing a graphics card via a PXE network. This method eliminates the need for manual operation, automatically partitioning the computer by selecting the appropriate KSCFG file based on the computer's application nature, and automatically installing the graphics card by modifying the operating system's login configuration file and the self-executing RC.LOCAL file.
[0009] The first aspect of this invention proposes a method for partitioning a Kylin V10 hard drive and installing a graphics card on a PXE network. During graphics card installation, hardware partitioning is performed first based on the nature and type of the computer. The computer types include client computers, time-series server computers, historical server computers with disk arrays, historical time-series server computers with disk arrays, historical server computers without disk arrays, and historical time-series server computers without disk arrays. The method includes the following steps:
[0010] Step 1: Use LINUX commands to obtain the hard drive name and capacity of the power monitoring system computer;
[0011] Step 2: Determine if the computer is a historical server. If so, determine if a historical database partition needs to be created. Calculate the database partition capacity based on the type of database of the power monitoring system computer where the graphics card is to be installed. Otherwise, no database partition needs to be created.
[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 the / boot / efi partition, biosboot partition, / boot partition, sequential partition, historical partition, and root directory partition based on the computer's boot method, whether the hard drive is larger than 2TB, and whether the computer is a timing or historical server.
[0014] Step 3: Perform the actual automatic partitioning operation 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 that occurs during the PXE installation process.
[0016] Step 5: First, replace the Kylin V10 operating system boot login configuration file to enable passwordless login for the root user; execute the systemctl command to enable command-line login for the root user;
[0017] Step 6: Perform PXE installation. After system configuration and optimization are complete, restart using LINUX commands.
[0018] Step 7: Use the RC.LOCAL self-executing 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 the replacement in Step 4, and execute the systemctl command to enable EMS users to log in graphically with a password. Then, restart using LINUX commands.
[0020] Preferably, in step 1, the process of obtaining the hard disk capacity is as follows: use LINUX commands to obtain the hard disk capacity text descriptor, determine whether the text descriptor contains "T" or "G" and remove the letters in the text descriptor to obtain a number. If there is "T", the hard disk capacity is the square of the number multiplied by 1024; if there is "G", the hard disk capacity is the square of the number multiplied by 1024.
[0021] Preferably, in step 2, calculating the database partition ratio based on the database type specifically involves the following: if the database is an NRSQL database, the database partition is / nrsqldata, where / nrsqldata is the folder directory name of the NRSQL database; if the database is a DM database, the database partition ratio / dbdata: / dbbak: / dbarch is 16:3:1, where / dbdata: / dbbak: / dbarch are both folder directory names of the DM database; if the database is a Kingbase database, the database partition ratio is...
[0022] The ratio of / dbdata: / dbbackup is 2:1, where / dbdata: / dbbackup is the folder directory name of the Kingbase database.
[0023] Preferably, the specific capacity and division of the historical database partition are as follows: the capacity of the database partition / nrsqldata of the NRSQL database is at least 1T. When partitioning, it is determined whether a disk array exists. If it exists, the partition is divided from the disk array; otherwise, it is divided from the computer itself.
[0024] For DM databases, determine if a disk array exists. If it does, the database partition calculation formula is as follows:
[0025]
[0026] Among them, C dbdata C dbbak C dbarch C cpzl These represent the capacities of the database partitions / dbdata, / dbbak, / dbarch, and the disk array, respectively.
[0027] If a disk array does not exist, the database partition calculation formula is:
[0028]
[0029] Among them, C jsjyp It is the total capacity of the computer's hard drive, C. reg The minimum capacity required for other partitions that need to be allocated, including the / boot / efi partition, biosboot partition, / boot partition, timing partition, and root directory / partition capacity, C reg Set to at least 1600G;
[0030] Kingbase historical database: Determine if a disk array exists. If it does, the database partition calculation formula is:
[0031]
[0032] Where C cpzl C dbdata C dabackup These are the disk array hard drive capacity and the Kingbase database partition.
[0033] The capacity of / dbdata and / dbbackup;
[0034] If a disk array does not exist, the formula for calculating the partitions of Kingbase's historical database is as follows:
[0035]
[0036] Among them, C jsjyp It is the total capacity of the computer's hard drive, C. reg The minimum capacity required for other partitions that need to be allocated, including / boot / efi partition, biosboot partition, / boot partition, timing partition, and root directory / partition capacity), C reg Set to at least 1600G.
[0037] Preferably, in step 2, the calculation of the SWAP partition capacity is as follows: if the memory is less than 64G, the 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, it is set to 128G.
[0038] Preferably, in step 2, the other partitions include the / boot / efi partition, the biosboot partition, the / boot partition, the timing partition, the history partition, and the root directory / partition;
[0039] The computer's boot method, whether the hard drive is larger than 2TB, and whether the computer is a time-series or historical server are obtained through the KSCFG file.
[0040] Preferably, in step 2, calculating the capacity of other partitions specifically involves:
[0041] Add a / boot partition with a capacity of 2GB; determine the computer's boot mode. If the computer boots using UEFI, add a / boot / efi partition with a capacity of 2GB. If it boots using LEGACY, then determine if the hard drive capacity is greater than 2TB. If it is, add a biosboot partition with a capacity of 2GB; otherwise, do not add a biosboot partition.
[0042] Determine if the computer is a time-series or historical server. If it's a time-series server, add a time-series partition / users / ems / rtdata with a capacity of 500GB. If the actual measurement points have specific requirements, set the capacity to the required size. If it's a historical server, further determine the database. If it's an NRSQL database, add a historical partition / nrsqldata with a capacity of 500GB; if it's a Kingbase database, add a historical partition.
[0043] The partition is set to / home / kingbase with a capacity of 500G. If it is a DM database, add a historical partition / home / dmdba with a capacity of 500G. If it is a time series + historical server, add the corresponding partitions for the historical server and the time series server. The remaining space is the root directory / partition. Check the capacity of the root directory / partition. If it is less than 500G, report an error and return to step 1 to repartition.
[0044] Preferably, in step 3, the actual automatic partitioning operation includes:
[0045] All partition sizes are pre-calculated using Linux commands. The KSCFG file is modified using Linux commands to first clear all partitions, then create partitions of the required size based on the calculated partition sizes, and finally format the hard drive partitions using mfx.ext4.
[0046] Preferably, in step 4, the modification of the KSCFG file specifically involves changing 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 specifically involves modifying the disabled guest mode in the conf class configuration file to root user mode, and defining the command executed when starting the service in the service class configuration file as root.
[0048] Preferably, in step 7, the third-party graphics card driver nouveau is first uninstalled using the RC.LOCAL self-executing sh file. After uninstallation, the system will automatically restart. Then, the NVIDIA driver is installed using the RC.LOCAL self-executing sh file of the Kylin V10 operating system. After installation, the sh file name is modified so that the file will not be executed.
[0049] The second aspect of this invention provides a system for partitioning a Kylin V10 hard drive and installing a graphics card using a PXE network based on the method described in the first aspect of this invention, comprising: a computer property acquisition module, a partition capacity calculation module, a partitioning module, a registration license pause elimination module, a login configuration file modification module, and an automatic installation module; specifically:
[0050] Computer property acquisition module: Obtains hard disk capacity and memory capacity through LINUX commands, and selects KSCFG files based on the computer's boot mode, whether the hard disk is larger than 2TB, and whether the computer is a time-series or historical server;
[0051] Partition capacity calculation module: Calculates the capacity of SWAP partition, historical database partition, / boot / efi partition, biosboot partition, / boot partition, timing partition, and root directory / partition based on hard disk capacity, memory capacity, and other computer characteristics;
[0052] Partitioning module: The KSCFG file uses Linux commands to clear all partitions, then creates partitions of the required size based on the calculated partition capacity, and formats the hard drive partitions;
[0053] Registration license pause elimination module: Modify the KSCFG file and replace the Kylin V10 operating system boot file;
[0054] Login configuration file modification module: Replaces the startup login configuration file of the Kylin V10 operating system and executes the systemctl command to enable passwordless login for the root user or password-required graphical login for the EMS user;
[0055] Automatic installation module: Uses the RC.LOCAL self-executing SH file to automatically install NVIDIA discrete graphics cards.
[0056] The beneficial effects of this invention are as follows: Compared with existing technologies, by configuring different KSCFG files according to the nature of computer applications, the capacity of each partition is automatically calculated in the early stage of the installation process. This considers not only hard drive and memory sizes, but also the special partitioning required by different databases, different boot methods, and historical and time-series servers, making it better suited for power monitoring system computers with high signal volume, such as the PCS9000 power dispatch monitoring computer. By pre-calculating partition values and writing partition operations in the KSCFG, automatic partitioning is achieved without manual modification, saving operation time. This also better adapts to power monitoring system computers with high signal volume, such as the PCS9000 power dispatch monitoring computer, reducing problems and defects caused by manual partitioning pauses. Modifying the KSCFG file eliminates the pauses that occur during manual license registration during PXE installation; replacing the Kylin V10 operating system boot login configuration file and executing commands enables passwordless command-line login for the root user; using the self-executable file RC.LOCAL to install the dedicated NVIDIA graphics card achieves automatic installation without human intervention, improving installation efficiency and accuracy. It is more suitable for automated PXE computer installation production lines. Attached Figure Description
[0057] Figure 1 Flowchart for automatic hard disk partitioning and automatic graphics card installation for PXE networks;
[0058] Figure 2 This is a diagram showing the driver for a dedicated graphics card after installation.
[0059] Figure 3 This diagram illustrates how modifying the KSCFG file allows the Kylin installation to skip the license and pause.
[0060] Figure 4 A diagram illustrating how to disable guest mode and switch to root user mode;
[0061] Figure 5A diagram illustrating how to log in as the root user via command line using the systemctl command. Detailed Implementation
[0062] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of this invention. The embodiments described in this application are merely some embodiments of this invention, and not all embodiments. Based on the spirit of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of this invention.
[0063] like Figure 1 As shown, Embodiment 1 of the present invention provides a method for partitioning the hard drive and installing the graphics card on a Kylin V10 computer using a PXE network. Before installation, the PXE installation server is powered on and the VMware virtual machine is opened. The virtual machine automatically detects whether the client computer is connecting. The PXE installation server and the Kylin V10 computer to be installed are connected together through a switch and Ethernet network cabling. The Kylin V10 computer to be installed is powered on and enters the PXE BOOT network boot state, enters the PXE installation interface, and performs the installation operation. When installing the graphics card, hardware partitioning must be performed first according to the nature and category of the computer. The computer categories include client computers, time-series server computers, historical server computers with disk arrays, historical time-series server computers with disk arrays, historical server computers without disk arrays, and historical time-series server computers without disk arrays. The steps include:
[0064] Step 1: Use LINUX commands to obtain the hard drive name and capacity of the power monitoring system computer.
[0065] Preferably, in step 1, the process of obtaining the hard disk capacity is as follows: use LINUX commands to obtain the hard disk capacity text descriptor, determine whether the text descriptor contains "T" or "G" and remove the letters in the text descriptor to obtain a number. If there is "T", the hard disk capacity is the square of the number multiplied by 1024; if there is "G", the hard disk capacity is the square of the number multiplied by 1024.
[0066] Step 2: Determine if the computer is a historical server. If so, determine if a historical database partition needs to be created. Calculate the database partition capacity based on the type of database of the power monitoring system computer where the graphics card is to be installed. Otherwise, no database partition needs to be created.
[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 the / boot / efi partition, BIOSboot partition, / boot partition, time-series partition, historical partition, and root directory partition based on the computer's boot method, whether the hard drive is larger than 2TB, and whether the computer is a time-series or historical server.
[0069] Preferably, in step 2, calculating the database partition ratio based on the database type specifically involves the following: if the database is an NRSQL database, the database partition is / nrsqldata, where / nrsqldata is the folder directory name of the NRSQL database; if the database is a DM database, the database partition ratio / dbdata: / dbbak: / dbarch is 16:3:1, where / dbdata: / dbbak: / dbarch are both folder directory names of the DM database; if the database is a Kingbase database, the database partition ratio is...
[0070] The ratio of / dbdata: / dbbackup is 2:1, where / dbdata: / dbbackup is the folder directory name of the Kingbase database.
[0071] Preferably, the specific capacity and division of the historical database partition are as follows: the capacity of the database partition / nrsqldata of the NRSQL database is at least 1T. When partitioning, it is determined whether a disk array exists. If it exists, the partition is divided from the disk array; otherwise, it is divided from the computer itself.
[0072] For DM databases, determine if a disk array exists. If it does, the database partition calculation formula is as follows:
[0073]
[0074] Among them, C dbdata C dbbak C dbarch C cpzl These represent the capacities of the database partitions / dbdata, / dbbak, / dbarch, and the disk array, respectively.
[0075] If a disk array does not exist, the database partition calculation formula is:
[0076]
[0077] Among them, C jsjyp It is the total capacity of the computer's hard drive, C. reg The minimum capacity required for other partitions that need to be allocated, including the / boot / efi partition, biosboot partition, / boot partition, timing partition, and root directory / partition capacity, C reg Set to at least 1600G;
[0078] Kingbase historical database: Determine if a disk array exists. If it does, the database partition calculation formula is:
[0079]
[0080] Where C cpzl C dbdata C dabackup These are the disk array hard drive capacity and the Kingbase database partition.
[0081] The capacity of / dbdata and / dbbackup;
[0082] If a disk array does not exist, the formula for calculating the partitions of Kingbase's historical database is as follows:
[0083]
[0084] Among them, C jsjyp It is the total capacity of the computer's hard drive, C. reg The minimum capacity required for other partitions that need to be allocated, including / boot / efi partition, biosboot partition, / boot partition, timing partition, and root directory / partition capacity), C reg Set to at least 1600G.
[0085] Preferably, in step 2, the calculation of the SWAP partition capacity is as follows: if the memory is less than 64G, the 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, it is set to 128G.
[0086] Preferably, in step 2, the other partitions include the / boot / efi partition, the biosboot partition, the / boot partition, the timing partition, the history partition, and the root directory / partition;
[0087] The computer's boot method, whether the hard drive is larger than 2TB, and whether the computer is a time-series or historical server are obtained through the KSCFG file.
[0088] Preferably, in step 2, calculating the capacity of other partitions specifically involves:
[0089] Add a / boot partition with a capacity of 2GB; determine the computer's boot mode. If the computer boots using UEFI, add a / boot / efi partition with a capacity of 2GB. If it boots using LEGACY, then determine if the hard drive capacity is greater than 2TB. If it is, add a biosboot partition with a capacity of 2GB; otherwise, do not add a biosboot partition.
[0090] Determine if the computer is a time-series or historical server. If it's a time-series server, add a time-series partition / users / ems / rtdata with a capacity of 500GB. If the actual measurement points have specific requirements, set the capacity to the required size. If it's a historical server, further determine the database. If it's an NRSQL database, add a historical partition / nrsqldata with a capacity of 500GB; if it's a Kingbase database, add a historical partition.
[0091] The partition is set to / home / kingbase with a capacity of 500G. If it is a DM database, add a historical partition / home / dmdba with a capacity of 500G. If it is a time series + historical server, add the corresponding partitions for the historical server and the time series server. The remaining space is the root directory / partition. Check the capacity of the root directory / partition. If it is less than 500G, report an error and return to step 1 to repartition.
[0092] Specifically, the list of automatically partitioned hard drives of the Kingbase historical time-series database computer after installation without a disk array in this embodiment is shown in Table 1.
[0093] Table 1 shows the automatic hard drive partitioning of the Kingbase historical time-series database under a diskless RAID system after installation in this embodiment.
[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 the actual automatic partitioning operation based on the calculated capacity of each partition.
[0096] Preferably, in step 3, the actual automatic partitioning operation includes:
[0097] All partition sizes are pre-calculated using Linux commands. The KSCFG file is modified using Linux commands to first clear all partitions, then create partitions of the required size based on the calculated partition sizes, and finally format the hard drive partitions using mfx.ext4.
[0098] Step 4: Replace the Kylin V10 operating system boot file by modifying the KSCFG file to eliminate the manual license registration pause that occurs during PXE installation.
[0099] Preferably, such as Figure 3 As shown, in step 4, the specific modification to the KSCFG file is as follows: change the original firstboot--enable in the KSCFG file to firstboot--disabled, and add eula--agreed.
[0100] Step 5: First, replace the Kylin V10 operating system boot login configuration file to enable passwordless login for the root user; for example... Figure 5 As shown, executing the systemctl command enables root user command-line login.
[0101] Preferably, in step 5, such as Figure 4 As shown, the first replacement of the Kylin V10 operating system startup login configuration file specifically involves changing the disabled guest mode in the conf class configuration file to root user mode, and defining the command executed when starting the service in the service class configuration file as root.
[0102] Step 6: Perform PXE installation. After system configuration and optimization are complete, restart using LINUX commands.
[0103] Step 7: Use the RC.LOCAL self-executing SH file to automatically install the NVIDIA discrete graphics card;
[0104] Preferably, such as Figure 2 As shown, in step 7, the third-party graphics card driver nouveau is first uninstalled using the RC.LOCAL self-executing sh file. After uninstallation, the system will automatically restart. Then, the NVIDIA driver is installed using the RC.LOCAL self-executing sh file of the Kylin V10 operating system. After installation, the sh file name is modified so that the file will not 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 the replacement in Step 4, and execute the systemctl command to enable EMS users to log in graphically with a password. Then, restart using LINUX commands.
[0106] This embodiment has been tested and found that the automatic partitioning process reduces the time by 15 minutes compared to manual partitioning, and the automatic graphics card installation process reduces the time by 6 minutes compared to manual installation, for a total reduction of 21 minutes. The installation accuracy rate reaches 100%, reducing human intervention and eliminating manual interruptions. It is more suitable for PXE automated computer installation workshop production lines.
[0107] Embodiment 2 of the present invention proposes a system for partitioning a Kylin V10 hard drive and installing a graphics card using a PXE network based on the method described in Embodiment 1 of the present invention, comprising: a computer property acquisition module, a partition capacity calculation module, a partitioning module, a registration license pause elimination module, a login configuration file modification module, and an automatic installation module; specifically:
[0108] Computer property acquisition module: Obtains hard disk capacity and memory capacity through LINUX commands, and selects KSCFG files based on the computer's boot mode, whether the hard disk is larger than 2TB, and whether the computer is a time-series or historical server;
[0109] Partition capacity calculation module: Calculates the capacity of SWAP partition, historical database partition, / boot / efi partition, biosboot partition, / boot partition, timing partition, and root directory / partition based on hard disk capacity, memory capacity, and other computer characteristics;
[0110] Partitioning module: The KSCFG file uses Linux commands to clear all partitions, then creates partitions of the required size based on the calculated partition capacity, and formats the hard drive partitions;
[0111] Registration license pause elimination module: Modify the KSCFG file and replace the Kylin V10 operating system boot file;
[0112] Login configuration file modification module: Replaces the startup login configuration file of the Kylin V10 operating system and executes the systemctl command to enable passwordless login for the root user or password-required graphical login for the EMS user;
[0113] Automatic installation module: Uses the RC.LOCAL self-executing SH file to automatically install NVIDIA discrete graphics cards.
[0114] This disclosure can be a system, method, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of this disclosure.
[0115] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0116] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0117] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status 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 the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving 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., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.
[0118] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the claims of the present invention.
Claims
1. A method for partitioning a Kylin V10 hard drive and installing a graphics card in a PXE network, wherein during graphics card installation, hardware partitioning is performed first according to the nature and category of the computer, wherein the computer category includes client computers, time-series server computers, historical server computers with disk arrays, historical time-series server computers with disk arrays, historical server computers without disk arrays, and historical time-series server computers without disk arrays; characterized in that, Including the following steps: Step 1: Use LINUX commands to obtain the hard drive name and capacity of the power monitoring system computer; Step 2: Determine if the computer is a historical server. If so, determine if a historical database partition needs to be created. Calculate the database partition capacity based on the type of database of the power monitoring system computer where the graphics card is to be installed. Otherwise, no database partition needs to be created. Use Linux commands to obtain the computer memory capacity of the power monitoring system and calculate the SWAP partition capacity. Calculate the capacity of the / boot / efi partition, biosboot partition, / boot partition, sequential partition, historical partition, and root directory partition based on the computer's boot method, whether the hard drive is larger than 2TB, and whether the computer is a timing or historical server. Step 3: Perform the actual automatic partitioning operation 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 that occurs during the PXE installation process. Step 5: First, replace the Kylin V10 operating system boot login configuration file to enable passwordless login for the root user; execute the systemctl command to enable command-line login for the root user; Step 6: Perform PXE installation. After system configuration and optimization are complete, restart using LINUX commands. Step 7: Use the RC.LOCAL self-executing 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 the replacement in Step 4, and execute the systemctl command to enable EMS users to log in graphically with a password. Then, restart using LINUX commands.
2. The method for partitioning a Kylin V10 hard drive and installing a graphics card using a PXE network as described in claim 1, characterized in that: In step 1, the process of obtaining the hard disk capacity is as follows: use LINUX commands to obtain the hard disk capacity text descriptor, determine whether the text descriptor contains "T" or "G" and remove the letters in the text descriptor to obtain the number. If there is "T", the hard disk capacity is the square of the number multiplied by 1024. If there is "G", the hard disk capacity is the square of the number multiplied by 1024.
3. The method for partitioning a Kylin V10 hard drive and installing a graphics card using a PXE network as described in claim 2, characterized in that: In step 2, the database partition ratio is calculated based on the database type. Specifically: if the database is an NRSQL database, the database partition is / nrsqldata, where / nrsqldata is the folder directory name of the NRSQL database; if the database is a DM database, the database partition ratio / dbdata: / dbbak: / dbarch is 16:3:1, where / dbdata: / dbbak: / dbarch are both folder directory names of the DM database; if the database is a Kingbase database, the database partition ratio is / dbdata: / dbbackup is 2:1, where / dbdata: / dbbackup is the folder directory name of the Kingbase database.
4. The method for partitioning a Kylin V10 hard drive and installing a graphics card using a PXE network as described in claim 3, characterized in that: The specific capacity and partitioning 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 a disk array exists. If it exists, the partition is made from the disk array; otherwise, the partition is made from the computer itself. For DM databases, determine if a disk array exists. If it does, the database partition calculation formula is as follows: in, These represent the capacities of the database partitions / dbdata, / dbbak, / dbarch, and the disk array, respectively. If a disk array does not exist, the database partition calculation formula is: in, It is the total capacity of the computer's hard drive. This specifies the minimum required capacity for other partitions, including the / boot / efi partition, the biosboot partition, the / boot partition, the timing partition, and the root directory / partition. Set to at least 1600G; Kingbase historical database: Determine if a disk array exists. If it does, the database partition calculation formula is: in These are the disk array hard drive capacity, and the capacity of the Kingbase database partitions / dbdata and / dbbackup, respectively. If a disk array does not exist, the formula for calculating the partitions of Kingbase's historical database is as follows: in, It is the total capacity of the computer's hard drive. This specifies the minimum required capacity for other partitions, including / boot / efi, biosboot, / boot, timing partitions, and the root directory / partition. Set to at least 1600G.
5. The method for partitioning a Kylin V10 hard drive and installing a graphics card using a PXE network as described in claim 1, characterized in that: In step 2, the calculation of the SWAP partition capacity is as follows: if the memory is less than 64G, the 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, it is set to 128G.
6. The method for partitioning a Kylin V10 hard drive and installing a graphics card using a PXE network as described in claim 4, characterized in that: In step 2, the other partitions include the / boot / efi partition, the biosboot partition, the / boot partition, the timing partition, the history partition, and the root directory / partition; The computer's boot method, whether the hard drive is larger than 2TB, and whether the computer is a time-series or historical server are obtained through the KSCFG file.
7. The method for partitioning a Kylin V10 hard drive and installing a graphics card using a PXE network as described in claim 4, characterized in that: In step 2, the minimum required capacity for the other partitions is as follows: Add a / boot partition with a capacity of 2GB; determine the computer's boot mode. If the computer boots using UEFI, add a / boot / efi partition with a capacity of 2GB. If it boots using LEGACY, then determine if the hard drive capacity is greater than 2TB. If it is, add a biosboot partition with a capacity of 2GB; otherwise, do not add a biosboot partition. Determine if the computer is a time-series or historical server. If it's a time-series server, add a time-series partition / users / ems / rtdata with a capacity of 500GB. If it's a historical server, further determine the database type: if it's an NRSQL database, add a historical partition / nrsqldata with a capacity of 500GB; if it's a Kingbase database, add a historical partition / home / kingbase with a capacity of 500GB; if it's a DM database, add a historical partition / home / dmdba with a capacity of 500GB. If it's a time-series + historical server, add the corresponding partitions for both the historical and time-series servers. Finally, the remaining space is the root directory / partition. Check the root directory / partition's capacity; if it's less than 500GB, report an error and return to step 1 to repartition.
8. The method for partitioning a Kylin V10 hard drive and installing a graphics card using a PXE network as described in claim 1, characterized in that: In step 3, the actual automatic partitioning operation includes: All partition sizes are pre-calculated using Linux commands. The KSCFG file is modified using Linux commands to first clear all partitions, then create partitions of the required size based on the calculated partition sizes, and finally format the hard drive partitions using mfx.ext4.
9. The method for partitioning a Kylin V10 hard drive and installing a graphics card using a PXE network as described in claim 1, characterized in that: In step 4, the modification of the KSCFG file specifically involves changing the original firstboot--enable to firstboot--disabled in the KSCFG file, and adding eula--agreed.
10. The method for partitioning a Kylin V10 hard drive and installing a graphics card using a PXE network as described in claim 1, characterized in that: In step 5, the first replacement of the Kylin V10 operating system startup login configuration file specifically involves changing the disabled guest mode in the conf class configuration file to root user mode, and defining the command executed when starting the service in the service class configuration file as root.
11. The method for partitioning a Kylin V10 hard drive and installing a graphics card using a PXE network as described in claim 1, characterized in that: In step 7, first use the RC.LOCAL self-executing sh file to uninstall the third-party graphics card driver nouveau. After uninstallation, the system will automatically restart. Then, use the RC.LOCAL self-executing sh file of the Kylin V10 operating system to install the NVIDIA driver. After installation, change the name of the sh file so that it will not be executed again.
12. A system for partitioning a Kylin V10 hard drive and installing a graphics card using a PXE network according to any one of claims 1-11, comprising: The module includes a computer property acquisition module, a partition capacity calculation module, a partitioning module, a registration license pause elimination module, a login configuration file modification module, and an automatic installation module; its features are: Computer property acquisition module: Obtains hard disk capacity and memory capacity through LINUX commands, and selects KSCFG files based on the computer's boot mode, whether the hard disk is larger than 2TB, and whether the computer is a time-series or historical server; Partition capacity calculation module: Calculates the capacity of SWAP partition, historical database partition, / boot / efi partition, biosboot partition, / boot partition, timing partition, and root directory / partition based on hard disk capacity, memory capacity, and other computer characteristics; Partitioning module: The KSCFG file uses Linux commands to clear all partitions, then creates partitions of the required size based on the calculated partition capacity, and formats the hard drive partitions; Registration license pause elimination module: Modify the KSCFG file and replace the Kylin V10 operating system boot file; Login configuration file modification module: Replaces the startup login configuration file of the Kylin V10 operating system and executes the systemctl command to enable passwordless login for the root user or password-required graphical login for the EMS user; Automatic installation module: Uses the RC.LOCAL self-executing SH file to automatically install NVIDIA discrete graphics cards.
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
Method and device for installing linux operating system
CN113821220A
Installation of operating system
US20200272445A1