CN114661367A - Operating system installation method, device, equipment and medium in IPv6 environment - Google Patents

Operating system installation method, device, equipment and medium in IPv6 environment Download PDF

Info

Publication number
CN114661367A
CN114661367A CN202210445283.5A CN202210445283A CN114661367A CN 114661367 A CN114661367 A CN 114661367A CN 202210445283 A CN202210445283 A CN 202210445283A CN 114661367 A CN114661367 A CN 114661367A
Authority
CN
China
Prior art keywords
physical address
unique identifier
current
dhcp unique
network port
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210445283.5A
Other languages
Chinese (zh)
Other versions
CN114661367B (en
Inventor
孙秀强
公维锋
贡维
黄家明
李岩
宿培伟
陈衍东
姜明玉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202210445283.5A priority Critical patent/CN114661367B/en
Publication of CN114661367A publication Critical patent/CN114661367A/en
Application granted granted Critical
Publication of CN114661367B publication Critical patent/CN114661367B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4406Loading of operating system
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Small-Scale Networks (AREA)

Abstract

The application discloses an operating system installation method, device, equipment and medium in an IPv6 environment, which relate to the technical field of computers and comprise the following steps: acquiring a physical address for currently identifying the network port in the starting process of the basic input and output system, and updating the DHCP unique identifier stored in the nonvolatile random access memory by using the physical address to obtain the current DHCP unique identifier; judging whether a pre-starting execution environment is started, if so, judging whether a target physical address of a current starting network port is consistent with a current DHCP unique identifier; if not, acquiring the physical address of the next identification port, and updating the current DHCP unique identifier by using the physical address of the next identification port; and jumping to the step of judging whether the target physical address of the current starting network port is consistent with the current DHCP unique identifier or not until the operating system is installed in the pre-starting execution environment of the IPv6 after the target physical address of the current starting network port is consistent with the current DHCP unique identifier. And comparing the physical addresses of all the network ports with the physical address of the starting network port in sequence, and installing an operating system after the physical addresses are consistent.

Description

Operating system installation method, device, equipment and medium in IPv6 environment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a medium for installing an operating system in an IPv6 environment.
Background
Regardless of a data center or a server production workshop, a network Environment PXE (Preboot eXecution Environment) installation system is an essential important index, and regardless of a production server link or a data center operation and maintenance link, the PXE Environment is divided into two Protocol modes, namely, an IPv6(Internet Protocol Version 6, i.e., Internet Protocol Version 6) and an IPv4(Internet Protocol Version 4, i.e., Internet Protocol Version 4). The PXE environment of the IPv6 protocol needs to check and check whether the MAC (Media Access Control Address, namely Ethernet Address or physical Address) Address of the current starting network port is consistent with the DUID (DHCPv6 Unique Identifier, namely DHCP Unique Identifier; wherein DHCP is a dynamic host configuration protocol) of the IPv6, and if not, an operating system cannot be installed in the PXE environment of the IPv 6; the PXE network environment installation system of IPv4 does not need to care about this MAC address because the PXE environment of IPv4 does not have a function of comparing the DUID with the MAC address. Because the motherboard uses a specific network card during production and during production line production, such as a USB (Universal Serial Bus) network card, an ocp (open computer project) network card, and a pci (peripheral computer interconnect) network card, the network interface of each network card device includes a unique MAC address. After a BIOS (Basic Input Output System, i.e., a Basic Input Output System) is started for the first time, MAC addresses of other network cards, such as a USB network card, are stored in a Non-Volatile storage space (NVRAM) of the BIOS, the Non-Volatile storage space of the BIOS cannot be updated no matter what network card is changed later and the MAC addresses of the network cards are different, i.e., the BIOS latches the MAC address of the network card started for the first time, which causes that a data center of a client cannot use PXE of IPv6 to perform environment installation, and thus a server cannot be deployed in the data center. Currently, the method of manually clearing the nonvolatile storage space of the BIOS is mainly adopted, but this causes waste of human resources and manual or command clearing each time, which causes monetary loss.
In summary, how to install an operating system in an IPv6 environment while saving human resources is a problem to be solved.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a method, an apparatus, a device and a medium for installing an operating system in an IPv6 environment, which can install an operating system in an IPv6 environment while saving human resources. The specific scheme is as follows:
in a first aspect, the application discloses an operating system installation method in an IPv6 environment, including:
acquiring a physical address for currently identifying a network port in the starting process of a basic input and output system, and updating a DHCP unique identifier stored in a nonvolatile random access memory by using the physical address to obtain a current DHCP unique identifier;
judging whether a pre-starting execution environment is started, if so, comparing the target physical address of the current starting network port with the current DHCP unique identifier to obtain a comparison result;
if the comparison result is that the target physical address is inconsistent with the current DHCP unique identifier, acquiring a physical address of a next identification gateway, and updating the current DHCP unique identifier by using the physical address of the next identification gateway to obtain an updated current DHCP unique identifier;
and skipping to the target physical address of the current starting network port and the current DHCP unique identifier again to obtain a comparison result, until the comparison result is that the target physical address is consistent with the current DHCP unique identifier, so as to install an operating system in the pre-starting execution environment of IPv 6.
Optionally, the obtaining a physical address of a current identification socket during the starting process of the basic input output system includes:
and acquiring the physical address of the current identification internet access through the DHCPv6 protocol in the starting process of the basic input output system.
Optionally, after comparing the target physical address of the current startup portal with the current DHCP unique identifier to obtain a comparison result, the method further includes:
and if the comparison result shows that the target physical address is consistent with the current DHCP unique identifier, directly installing an operating system in the pre-boot execution environment of the IPv 6.
Optionally, after determining whether to enable the pre-boot execution environment, the method further includes:
if not, judging whether the current identified internet access is the last internet access or not;
if not, identifying the physical address of the last network port, and updating the current DHCP unique identifier by using the physical address of the last network port to obtain an updated current DHCP unique identifier;
and comparing the target physical address of the current starting network port with the current DHCP unique identifier to obtain a comparison result, and installing an operating system in the pre-starting execution environment of IPv6 after the comparison result shows that the target physical address is consistent with the current DHCP unique identifier.
Optionally, after the comparing result is that the target physical address is inconsistent with the current DHCP unique identifier, the method further includes:
and judging whether the current starting network port is the last network port or not, and if not, executing the step of acquiring the physical address of the next identification network port.
Optionally, after determining whether the current starting portal is the last portal, the method further includes:
if so, identifying the physical address of the last network port, and updating the current DHCP unique identifier by using the physical address of the last network port to obtain an updated current DHCP unique identifier;
and comparing the target physical address of the current starting network port with the current DHCP unique identifier to obtain a comparison result, and installing an operating system in the pre-starting execution environment of IPv6 after the comparison result shows that the target physical address is consistent with the current DHCP unique identifier.
In a second aspect, the present application discloses an operating system installation apparatus in an IPv6 environment, comprising:
the first updating module is used for acquiring a physical address for currently identifying the internet access in the starting process of the basic input and output system and updating the DHCP unique identifier stored in the nonvolatile random access memory by using the physical address to obtain the current DHCP unique identifier;
the first comparison module is used for judging whether a pre-starting execution environment is started or not, and if so, comparing the target physical address of the current starting internet access with the current DHCP unique identifier to obtain a comparison result;
a second updating module, configured to obtain a physical address of a next identified portal if the comparison result indicates that the target physical address is inconsistent with the current DHCP unique identifier, and update the current DHCP unique identifier by using the physical address of the next identified portal to obtain an updated current DHCP unique identifier;
and the second comparison module is used for skipping again to compare the target physical address of the current starting network port with the current DHCP unique identifier to obtain a comparison result until the comparison result shows that the target physical address is consistent with the current DHCP unique identifier, so that an operating system is installed in the pre-starting execution environment of IPv 6.
Optionally, the second updating module further includes:
and the judging unit is used for judging whether the current starting network port is the last network port or not, and if not, executing the step of acquiring the physical address of the next identification network port.
In a third aspect, the present application discloses an electronic device, comprising:
a memory for storing a computer program;
a processor for executing said computer program to implement the steps of the operating system installation method of the aforementioned disclosed IPv6 environment.
In a fourth aspect, the present application discloses a computer readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the steps of the operating system installation method of the aforementioned disclosed IPv6 environment.
Therefore, the physical address of the current identification network port is obtained in the starting process of the basic input and output system, and the DHCP unique identifier stored in the nonvolatile random access memory is updated by utilizing the physical address to obtain the current DHCP unique identifier; judging whether a pre-starting execution environment is started, if so, comparing the target physical address of the current starting network port with the current DHCP unique identifier to obtain a comparison result; if the comparison result is that the target physical address is inconsistent with the current DHCP unique identifier, acquiring a physical address of a next identification port, and updating the current DHCP unique identifier by using the physical address of the next identification port to obtain an updated current DHCP unique identifier; and skipping to the target physical address of the current starting network port and the current DHCP unique identifier again to obtain a comparison result, until the comparison result is that the target physical address is consistent with the current DHCP unique identifier, so as to install an operating system in the pre-starting execution environment of IPv 6. Therefore, in the starting process of the basic input and output system, the physical address of the current identification network port is obtained, the DHCP unique identifier stored in the nonvolatile random access memory is updated by using the physical address to obtain the current DHCP unique identifier, after the pre-starting execution environment is determined to be started, whether the physical address of the current starting network port is consistent with the current DHCP unique identifier is judged, and if so, an operating system is installed in the pre-starting execution environment of IPv 6; if the current DHCP unique identifier is not consistent with the target physical address, the physical address of the next identification network port is continuously acquired, the current DHCP unique identifier is updated by the address, whether the updated current DHCP unique identifier is consistent with the target physical address or not is judged, if the updated current DHCP unique identifier is not consistent with the target physical address, the physical address of the subsequent identification network port is continuously acquired until the current DHCP unique identifier is consistent with the target physical address, and therefore the operating system is successfully installed in the pre-starting execution environment of the IPv 6. Therefore, the current DHCP unique identifier stored in the nonvolatile random access memory is updated by sequentially acquiring the physical address for identifying the network port, and the updated current DHCP unique identifier is compared with the physical address for starting the network port at present, so that the problem that the storage space of the nonvolatile random access memory needs to be manually cleared at present is solved, and human resources are saved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flowchart of an operating system installation method of an IPv6 environment disclosed herein;
FIG. 2 is a flowchart of an operating system installation method for a specific IPv6 environment disclosed herein;
FIG. 3 is a flow chart illustrating an operating system installation process in a specific IPv6 environment disclosed herein;
FIG. 4 is a schematic structural diagram of an operating system installation apparatus in an IPv6 environment according to the present disclosure;
fig. 5 is a block diagram of an electronic device disclosed in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
After the BIOS is started for the first time, the MAC addresses of other network cards such as a USB network card can be stored in the nonvolatile storage space of the BIOS, the nonvolatile storage space of the BIOS cannot be updated no matter what network card is changed later and the MAC addresses of the network cards are different, namely the MAC address of the network card started for the first time is latched by the BIOS, and therefore a data center of a client cannot use the PXE of the IPv6 to carry out environment installation, and a server cannot be deployed in the data center. Currently, the method of manually clearing the nonvolatile storage space of the BIOS is mainly adopted, but this causes waste of human resources and manual or command clearing each time, which causes monetary loss. Therefore, the embodiment of the application discloses an operating system installation method, device, equipment and medium in an IPv6 environment, which can install an operating system in an IPv6 environment under the condition of saving human resources.
Referring to fig. 1, an embodiment of the present application discloses an operating system installation method in an IPv6 environment, where the method includes:
step S11: and acquiring a physical address for currently identifying the network port in the starting process of the basic input and output system, and updating the DHCP unique identifier stored in the nonvolatile random access memory by using the physical address to obtain the current DHCP unique identifier.
In this embodiment, in the process of starting the basic input/output system, a physical address (i.e., an MAC address) of a current identification port is obtained, and if the physical address of the current identification port is a physical address of a first identification port, the physical address is transferred to a DHCP unique identifier, and the DHCP unique identifier is stored in a nonvolatile random access memory; and if the current identification port is not the physical address of the first identification port, updating the DHCP unique identifier stored in the nonvolatile random access memory by using the physical address of the current identification port, namely clearing the original DHCP unique identifier to obtain the updated current DHCP unique identifier.
Step S12: and judging whether a pre-starting execution environment is started, if so, comparing the target physical address of the current starting network port with the current DHCP unique identifier to obtain a comparison result.
In this embodiment, it is determined whether a pre-boot execution environment is enabled, that is, whether PXE boot is executed, and if PXE boot is executed, a physical address of a currently-booted network port is compared with a current DHCP unique identifier in a boot process to obtain a comparison result.
It should be noted that, after determining whether to enable the pre-boot execution environment, the method further includes: if not, judging whether the current identified internet access is the last internet access or not; if not, identifying the physical address of the last network port, and updating the current DHCP unique identifier by using the physical address of the last network port to obtain an updated current DHCP unique identifier; and comparing the target physical address of the current starting network port with the current DHCP unique identifier to obtain a comparison result, and installing an operating system in the pre-starting execution environment of IPv6 after the comparison result shows that the target physical address is consistent with the current DHCP unique identifier. That is, if the PXE environment of the IPv6 does not execute PXE boot due to a network problem, identifying the physical address of the last gateway, and updating the current DHCP unique identifier by using the physical address of the last gateway, so as to compare the updated current DHCP unique identifier with the target physical address of the currently booted gateway, and after the comparison is successful, installing an operating system in the pre-boot execution environment of the IPv 6.
Step S13: and if the comparison result shows that the target physical address is inconsistent with the current DHCP unique identifier, acquiring a physical address of a next identification port, and updating the current DHCP unique identifier by using the physical address of the next identification port to obtain an updated current DHCP unique identifier.
In this embodiment, if the comparison result indicates that the target physical address is inconsistent with the current DHCP unique identifier, the physical address of the next identified portal is continuously obtained, and the current DHCP unique identifier is updated by using the physical address of the next identified portal to obtain the updated current DHCP unique identifier. It should be noted that, after the comparing the target physical address of the current startup portal with the current DHCP unique identifier to obtain the comparison result, the method further includes: and if the comparison result is that the target physical address is consistent with the current unique DHCP identifier, directly installing an operating system in the pre-boot execution environment of the IPv 6. It is understood that if the target physical address is consistent with the current DHCP unique identifier, a PXE boot installation operating system is executed, i.e., the operating system is installed in the pre-boot execution environment of IPv 6.
Step S14: and skipping to the target physical address of the current starting network port and the current DHCP unique identifier again to obtain a comparison result, until the comparison result is that the target physical address is consistent with the current DHCP unique identifier, so as to install an operating system in the pre-starting execution environment of IPv 6.
In this embodiment, the step of comparing the target physical address of the currently-started network port with the current DHCP unique identifier to obtain a comparison result is skipped, that is, after the current DHCP unique identifier is updated by using the physical address of the next-identification network port to obtain the updated current DHCP unique identifier, the target physical address of the currently-started network port is compared with the current DHCP unique identifier again, if the comparison result is that the target physical address is consistent with the current DHCP unique identifier, the operating system is installed in the pre-start execution environment of IPv6, if the target physical address is not consistent with the current DHCP unique identifier, the physical address of the next network port is continuously polled until the comparison result is that the target physical address is consistent with the current DHCP unique identifier, and the operating system is installed in the pre-start execution environment of IPv 6.
Further, it should be noted that, in this embodiment, the server is configured with only 1 OCP network card or PCI network card and a single network port, that is, the physical address of the network port is also the physical address of the network card, and if one network card is a plurality of network ports, different network ports of the same network card correspond to different physical addresses. Therefore, the MAC address of the acquired network card is updated to the DUID of the IPV6 during each starting and only the MAC address is kept valid for the second time, namely, after the network card is restarted, powered off, powered on or replaced by a PCI network card, the MAC address reserved in the DUID before is erased and the MAC address of the newly inserted network card is kept for the second time, so that the installation of the operating system in the PXE environment supporting the IPV6 is realized, and the consistency check of the DUID of the IPV6 and the MAC address of the starting network port can be met. In addition, the technical scheme of the application has high dynamic adaptability, meets the requirement of replacing a starting network port arbitrarily by people, supports the PXE starting requirement of the IPV6, is not influenced by the framework of the processor, can be applied to multi-framework server products such as ARM, X86 and Mips, and is beneficial to large-scale purchasing and deploying of the multi-network card server by Internet customers.
Therefore, the physical address of the current identification internet access is obtained in the starting process of the basic input and output system, and the DHCP unique identifier stored in the nonvolatile random access memory is updated by utilizing the physical address to obtain the current DHCP unique identifier; judging whether a pre-starting execution environment is started, if so, comparing the target physical address of the current starting network port with the current DHCP unique identifier to obtain a comparison result; if the comparison result is that the target physical address is inconsistent with the current DHCP unique identifier, acquiring a physical address of a next identification gateway, and updating the current DHCP unique identifier by using the physical address of the next identification gateway to obtain an updated current DHCP unique identifier; and skipping to the target physical address of the current starting network port and the current DHCP unique identifier again to obtain a comparison result, until the comparison result is that the target physical address is consistent with the current DHCP unique identifier, so as to install an operating system in the pre-starting execution environment of IPv 6. Therefore, in the starting process of the basic input and output system, the physical address of the current identification network port is obtained, the DHCP unique identifier stored in the nonvolatile random access memory is updated by using the physical address to obtain the current DHCP unique identifier, after the pre-starting execution environment is determined to be started, whether the physical address of the current starting network port is consistent with the current DHCP unique identifier is judged, and if so, an operating system is installed in the pre-starting execution environment of IPv 6; if the current DHCP unique identifier is inconsistent with the target physical address, the physical address of the next identification network port is continuously obtained, the current DHCP unique identifier is updated by the address, whether the updated current DHCP unique identifier is consistent with the target physical address or not is judged, if the updated current DHCP unique identifier is inconsistent with the target physical address, the physical address of the subsequent identification network port is continuously obtained until the current DHCP unique identifier is consistent with the target physical address, and the operating system is successfully installed in the pre-starting execution environment of the IPv 6. Therefore, the current DHCP unique identifier stored in the nonvolatile random access memory is updated by sequentially acquiring the physical address for identifying the network port, and the updated current DHCP unique identifier is compared with the physical address for starting the network port at present, so that the problem that the storage space of the nonvolatile random access memory needs to be manually cleared at present is solved, and human resources are saved.
Referring to fig. 2, the embodiment of the present application discloses a specific operating system installation method in an IPv6 environment, and the embodiment further describes and optimizes the technical solution with respect to the previous embodiment. The method specifically comprises the following steps:
step S21: and acquiring a physical address for currently identifying the gateway through a DHCPv6 protocol in the starting process of the basic input output system, and updating the DHCP unique identifier stored in the nonvolatile random access memory by using the physical address to obtain the current DHCP unique identifier.
In this embodiment, the physical address of the currently identified portal is obtained through a DHCPv6 Protocol (Dynamic Host Configuration Protocol for IPv6, i.e., Dynamic Host Configuration Protocol version six). DHCPv6 is a network Protocol used to configure an IP address, an IP prefix and/or other configurations required by an IPv6 Host operating on an IPv6 network.
Step S22: and judging whether a pre-starting execution environment is started, if so, comparing the target physical address of the current starting network port with the current DHCP unique identifier to obtain a comparison result.
Step S23: if the comparison result is that the target physical address is inconsistent with the current DHCP unique identifier, judging whether the current starting port is the last port, if not, acquiring the physical address of the next identification port, and updating the current DHCP unique identifier by using the physical address of the next identification port to obtain the updated current DHCP unique identifier.
In a specific embodiment, after the comparison result is that the target physical address is inconsistent with the current DHCP unique identifier, it is determined whether the current start port is the last port, and if the current start port is not the last port, the step of obtaining the physical address of the next identified port is performed.
In another specific embodiment, after the determining whether the current starting portal is the last portal, the method further includes: if so, identifying the physical address of the last network port, and updating the current DHCP unique identifier by using the physical address of the last network port to obtain an updated current DHCP unique identifier; and comparing the target physical address of the current starting network port with the current DHCP unique identifier to obtain a comparison result, and installing an operating system in the pre-starting execution environment of IPv6 after the comparison result shows that the target physical address is consistent with the current DHCP unique identifier. It can be understood that, if the currently-started network port is the last network port, the physical address of the last network port is directly identified, the physical address of the last network port is used for updating the current DHCP unique identifier, then the updated current DHCP unique identifier is compared with the target physical address of the currently-started network port, and when the target physical address is consistent with the current DHCP unique identifier, the operating system is installed in the pre-start execution environment of IPv 6.
Step S24: and skipping to the target physical address of the current starting network port and the current DHCP unique identifier again to obtain a comparison result, until the comparison result is that the target physical address is consistent with the current DHCP unique identifier, so as to install an operating system in the pre-starting execution environment of IPv 6.
For more specific processing procedures of the above steps S22 and S24, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not repeated here.
Therefore, in the embodiment of the present application, the physical address of the current identified port is obtained through the DHCPv6 protocol, and after the comparison result shows that the target physical address is inconsistent with the current DHCP unique identifier, it needs to be determined whether the current started port is the last port, if the current started port is not the last port, the step of obtaining the physical address of the next identified port is executed, and if the current started port is the last port, the physical address of the last port is directly identified, and the current DHCP unique identifier is updated by using the physical address of the last port, so as to obtain the updated current DHCP unique identifier. And comparing the target physical address of the current starting network port with the current DHCP unique identifier so as to install an operating system in the pre-starting execution environment of the IPv6 after the comparison is successful.
Referring to fig. 3, an embodiment of the present application discloses a specific operating system installation flow diagram in an IPv6 environment, including: after BIOS starts, the MAC address of the current identification gateway is obtained through DHCPv6, the DUID of IPv6 is updated and stored in NVRAM area, and whether PXE start is executed or not is judged. If the PXE starting is executed, whether a target physical address of a current starting network port is consistent with the DUID of the IPv6 or not is judged in the starting process, and if the comparison result is consistent, an operating system is installed in the PXE environment of the IPv 6; if the comparison result is not consistent, continuously updating the DUID of the IPv6 and storing the DUID in the NVRAM area for the next identification net port, and comparing again until the comparison result is consistent, installing an operating system in the PXE environment of the IPv6, and when the starting net port is the last net port at this time, directly identifying the address of the last net port and comparing. If the PXE boot is not performed, the physical address of the last gateway is identified, and the DUID of IPv6 is updated and stored in the NVRAM area. In addition, when the machine is restarted or shut down, the steps are executed again.
Referring to fig. 4, an embodiment of the present application discloses an operating system installation apparatus in an IPv6 environment, where the apparatus includes:
a first updating module 11, configured to obtain a physical address of a current identification gateway in a basic input/output system starting process, and update a DHCP unique identifier stored in a nonvolatile random access memory with the physical address to obtain a current DHCP unique identifier;
the first comparison module 12 is configured to determine whether to start a pre-boot execution environment, and if so, compare the target physical address of the current boot gateway with the current DHCP unique identifier to obtain a comparison result;
a second updating module 13, configured to obtain a physical address of a next identified portal if the comparison result indicates that the target physical address is inconsistent with the current DHCP unique identifier, and update the current DHCP unique identifier by using the physical address of the next identified portal to obtain an updated current DHCP unique identifier;
the second comparing module 14 is configured to jump to the target physical address of the current boot portal and the current DHCP unique identifier again to obtain a comparison result, until the comparison result indicates that the target physical address is consistent with the current DHCP unique identifier, so as to install an operating system in the pre-boot execution environment of IPv 6.
Therefore, the physical address of the current identification network port is obtained in the starting process of the basic input and output system, and the DHCP unique identifier stored in the nonvolatile random access memory is updated by utilizing the physical address to obtain the current DHCP unique identifier; judging whether a pre-starting execution environment is started, if so, comparing the target physical address of the current starting network port with the current DHCP unique identifier to obtain a comparison result; if the comparison result is that the target physical address is inconsistent with the current DHCP unique identifier, acquiring a physical address of a next identification gateway, and updating the current DHCP unique identifier by using the physical address of the next identification gateway to obtain an updated current DHCP unique identifier; and skipping to the target physical address of the current starting network port and the current DHCP unique identifier again to obtain a comparison result, until the comparison result is that the target physical address is consistent with the current DHCP unique identifier, so as to install an operating system in the pre-starting execution environment of IPv 6. Therefore, in the starting process of the basic input and output system, the physical address of the current identification network port is obtained, the DHCP unique identifier stored in the nonvolatile random access memory is updated by using the physical address to obtain the current DHCP unique identifier, after the pre-starting execution environment is determined to be started, whether the physical address of the current starting network port is consistent with the current DHCP unique identifier is judged, and if so, an operating system is installed in the pre-starting execution environment of IPv 6; if the current DHCP unique identifier is not consistent with the target physical address, the physical address of the next identification network port is continuously acquired, the current DHCP unique identifier is updated by the address, whether the updated current DHCP unique identifier is consistent with the target physical address or not is judged, if the updated current DHCP unique identifier is not consistent with the target physical address, the physical address of the subsequent identification network port is continuously acquired until the current DHCP unique identifier is consistent with the target physical address, and therefore the operating system is successfully installed in the pre-starting execution environment of the IPv 6. Therefore, the current DHCP unique identifier stored in the nonvolatile random access memory is updated by sequentially acquiring the physical address for identifying the network port, and the updated current DHCP unique identifier is compared with the physical address for starting the network port at present, so that the problem that the storage space of the nonvolatile random access memory needs to be manually cleared at present is solved, and human resources are saved.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application. The method specifically comprises the following steps: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input output interface 25, and a communication bus 26. Wherein, the memory 22 is used for storing a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the operating system installation method of IPv6 environment executed by an electronic device disclosed in any of the foregoing embodiments.
In this embodiment, the power supply 23 is configured to provide a working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and a communication protocol followed by the communication interface is any communication protocol applicable to the technical solution of the present application, and is not specifically limited herein; the input/output interface 25 is configured to obtain external input data or output data to the outside, and a specific interface type thereof may be selected according to specific application requirements, which is not specifically limited herein.
The processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 21 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 21 may further include an AI (Artificial Intelligence) processor for processing a calculation operation related to machine learning.
In addition, the storage 22 is used as a carrier for storing resources, and may be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., the resources stored thereon include an operating system 221, a computer program 222, data 223, etc., and the storage may be a transient storage or a permanent storage.
The operating system 221 is used for managing and controlling each hardware device on the electronic device 20 and the computer program 222, so as to implement the operation and processing of the mass data 223 in the memory 22 by the processor 21, which may be Windows, Unix, Linux, or the like. The computer program 222 may further include a computer program that can be used to perform other specific tasks in addition to the computer program that can be used to perform the operating system installation method of the IPv6 environment executed by the electronic device 20 disclosed in any of the foregoing embodiments. The data 223 may include data received by the electronic device and transmitted from an external device, or may include data collected by the input/output interface 25 itself.
Further, an embodiment of the present application also discloses a computer-readable storage medium, in which a computer program is stored, and when the computer program is loaded and executed by a processor, the computer program implements the method steps executed in the installation process of the operating system in the IPv6 environment disclosed in any of the foregoing embodiments.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The method, the apparatus, the device and the medium for installing the operating system in the IPv6 environment provided by the present invention are described in detail above, and a specific example is applied in the present disclosure to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. An operating system installation method of an IPv6 environment, comprising:
acquiring a physical address for currently identifying a network port in the starting process of a basic input and output system, and updating a DHCP unique identifier stored in a nonvolatile random access memory by using the physical address to obtain a current DHCP unique identifier;
judging whether a pre-starting execution environment is started or not, if so, comparing the target physical address of the current starting network port with the current DHCP unique identifier to obtain a comparison result;
if the comparison result is that the target physical address is inconsistent with the current DHCP unique identifier, acquiring a physical address of a next identification gateway, and updating the current DHCP unique identifier by using the physical address of the next identification gateway to obtain an updated current DHCP unique identifier;
and skipping to the target physical address of the current starting network port and the current DHCP unique identifier again to obtain a comparison result, until the comparison result is that the target physical address is consistent with the current DHCP unique identifier, so as to install an operating system in the pre-starting execution environment of IPv 6.
2. The method for installing an operating system in an IPv6 environment according to claim 1, wherein the obtaining a physical address currently identifying a portal during bios boot includes:
and acquiring the physical address of the current identification internet access through the DHCPv6 protocol in the starting process of the basic input output system.
3. The method for installing an operating system in an IPv6 environment according to claim 1, wherein after comparing the target physical address of the currently-started portal with the current DHCP unique identifier to obtain a comparison result, the method further includes:
and if the comparison result shows that the target physical address is consistent with the current DHCP unique identifier, directly installing an operating system in the pre-boot execution environment of the IPv 6.
4. The method for installing an operating system in an IPv6 environment according to claim 1, wherein the determining whether to enable the pre-boot execution environment further includes:
if not, judging whether the current identified internet access is the last internet access or not;
if not, identifying the physical address of the last network port, and updating the current DHCP unique identifier by using the physical address of the last network port to obtain an updated current DHCP unique identifier;
and comparing the target physical address of the current starting network port with the current DHCP unique identifier to obtain a comparison result, and installing an operating system in the pre-starting execution environment of IPv6 after the comparison result shows that the target physical address is consistent with the current DHCP unique identifier.
5. The method for installing an operating system in an IPv6 environment according to any one of claims 1 to 4, wherein if the comparison result indicates that the target physical address is inconsistent with the current DHCP unique identifier, the method further includes:
and judging whether the current starting network port is the last network port or not, and if not, executing the step of acquiring the physical address of the next identification network port.
6. The operating system installation method of the IPv6 environment of claim 5, wherein the determining whether the currently-launched portal is the last portal further includes:
if so, identifying the physical address of the last network port, and updating the current DHCP unique identifier by using the physical address of the last network port to obtain an updated current DHCP unique identifier;
and comparing the target physical address of the current starting network port with the current DHCP unique identifier to obtain a comparison result, and installing an operating system in the pre-starting execution environment of IPv6 after the comparison result shows that the target physical address is consistent with the current DHCP unique identifier.
7. An operating system installation apparatus of an IPv6 environment, comprising:
the first updating module is used for acquiring a physical address for currently identifying the network port in the starting process of the basic input and output system, and updating the DHCP unique identifier stored in the nonvolatile random access memory by using the physical address to obtain the current DHCP unique identifier;
the first comparison module is used for judging whether a pre-starting execution environment is started or not, and if so, comparing the target physical address of the current starting internet access with the current DHCP unique identifier to obtain a comparison result;
a second updating module, configured to obtain a physical address of a next identified portal if the comparison result indicates that the target physical address is inconsistent with the current DHCP unique identifier, and update the current DHCP unique identifier by using the physical address of the next identified portal to obtain an updated current DHCP unique identifier;
and the second comparison module is used for skipping again to compare the target physical address of the current starting network port with the current DHCP unique identifier to obtain a comparison result until the comparison result shows that the target physical address is consistent with the current DHCP unique identifier, so that an operating system is installed in the pre-starting execution environment of IPv 6.
8. The operating system installation apparatus of the IPv6 environment according to claim 7, wherein the second update module further includes:
and the judging unit is used for judging whether the current starting network port is the last network port or not, and if not, executing the step of acquiring the physical address of the next identification network port.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the steps of the operating system installation method of the IPv6 environment of any one of claims 1 to 6.
10. A computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the steps of an operating system installation method of an IPv6 environment as claimed in any one of claims 1 to 6.
CN202210445283.5A 2022-04-26 2022-04-26 Method, device, equipment and medium for installing operating system in IPv6 environment Active CN114661367B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210445283.5A CN114661367B (en) 2022-04-26 2022-04-26 Method, device, equipment and medium for installing operating system in IPv6 environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210445283.5A CN114661367B (en) 2022-04-26 2022-04-26 Method, device, equipment and medium for installing operating system in IPv6 environment

Publications (2)

Publication Number Publication Date
CN114661367A true CN114661367A (en) 2022-06-24
CN114661367B CN114661367B (en) 2023-08-04

Family

ID=82037756

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210445283.5A Active CN114661367B (en) 2022-04-26 2022-04-26 Method, device, equipment and medium for installing operating system in IPv6 environment

Country Status (1)

Country Link
CN (1) CN114661367B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012054023A1 (en) * 2010-10-20 2012-04-26 Hewlett-Packard Development Company, L.P. Computer system with computers that perform network boots
CN106487524A (en) * 2015-08-27 2017-03-08 昆达电脑科技(昆山)有限公司 The method of remote opening
CN106919859A (en) * 2015-12-25 2017-07-04 研祥智能科技股份有限公司 Basic input output system guard method and device
CN107770299A (en) * 2017-10-24 2018-03-06 郑州云海信息技术有限公司 A kind of MAC Address writes with a brush dipped in Chinese ink method, system, device and storage medium
CN112860330A (en) * 2021-02-23 2021-05-28 浙江大华技术股份有限公司 Method and device for installing operating system, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012054023A1 (en) * 2010-10-20 2012-04-26 Hewlett-Packard Development Company, L.P. Computer system with computers that perform network boots
CN106487524A (en) * 2015-08-27 2017-03-08 昆达电脑科技(昆山)有限公司 The method of remote opening
CN106919859A (en) * 2015-12-25 2017-07-04 研祥智能科技股份有限公司 Basic input output system guard method and device
CN107770299A (en) * 2017-10-24 2018-03-06 郑州云海信息技术有限公司 A kind of MAC Address writes with a brush dipped in Chinese ink method, system, device and storage medium
CN112860330A (en) * 2021-02-23 2021-05-28 浙江大华技术股份有限公司 Method and device for installing operating system, computer equipment and storage medium

Also Published As

Publication number Publication date
CN114661367B (en) 2023-08-04

Similar Documents

Publication Publication Date Title
US11762653B2 (en) Method and apparatus for remotely updating firmware in batches, and computer-readable storage medium
US6810478B1 (en) System for remote booting of muntliple operating systems using chained bootstrap mechanism in a network
US9292312B2 (en) Simulated network boot environment for bootstrap redirection
US6684327B1 (en) Extensible, flexible, memory efficient technique for network boot without special DHCP/PXE hardware
US7743242B2 (en) Method and system for automatic generation of operating system boot images
US20100262815A1 (en) Detection Mechanism for System Image Class
CN101431523A (en) Method and micro-system for updating target system configuration in computer
CN109240754B (en) Logic device, method and system for configuring BIOS starting item
CN106657444A (en) Method and device for configuring IP address of BMC
CN111475172B (en) Bare metal deployment method and device
EP3614258B1 (en) Retrieving updated firmware code
CN104935468A (en) PXE technology-based interactive system and method for realizing operation of operating system thereof
US8140683B2 (en) Method and system for selecting an operating system at user login on a target device
US20020073186A1 (en) Method and system for generating a list of operating systems for a target device
US7353377B2 (en) Remotely providing basic input/output system to a client system
CN113867743B (en) Network operating system loading and burning method and device, electronic equipment and storage medium
CN114115917A (en) Operating system installation method and device
CN111200527B (en) Method for automatically discovering and deploying bare computer based on ironic
CN106487524A (en) The method of remote opening
CN114661367B (en) Method, device, equipment and medium for installing operating system in IPv6 environment
CN112506539A (en) Firmware updating method and device, electronic equipment and storage medium
CN106484442B (en) Server system and method for updating startup mapping file
WO2019100704A1 (en) Starting method for multi-mode iot device, multi-mode iot device, and storage medium
CN114995888A (en) Intelligent network card deployment method, device and medium
CN109684134B (en) Method and server for rapidly deploying firmware settings among multiple devices

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant