CN109976886B - Kernel remote switching method and device - Google Patents

Kernel remote switching method and device Download PDF

Info

Publication number
CN109976886B
CN109976886B CN201711465639.7A CN201711465639A CN109976886B CN 109976886 B CN109976886 B CN 109976886B CN 201711465639 A CN201711465639 A CN 201711465639A CN 109976886 B CN109976886 B CN 109976886B
Authority
CN
China
Prior art keywords
new kernel
server
new
kernel
kernel file
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.)
Active
Application number
CN201711465639.7A
Other languages
Chinese (zh)
Other versions
CN109976886A (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.)
Shenzhen Cec Greatwall Information Safety System Co ltd
Original Assignee
Shenzhen Cec Greatwall Information Safety System 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 Shenzhen Cec Greatwall Information Safety System Co ltd filed Critical Shenzhen Cec Greatwall Information Safety System Co ltd
Priority to CN201711465639.7A priority Critical patent/CN109976886B/en
Publication of CN109976886A publication Critical patent/CN109976886A/en
Application granted granted Critical
Publication of CN109976886B publication Critical patent/CN109976886B/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
    • 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/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4812Task transfer initiation or dispatching by interrupt, e.g. masked
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/481Exception handling

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)
  • Hardware Redundancy (AREA)

Abstract

The invention relates to the technical field of Linux systems, and provides a kernel remote switching method and device. The method comprises the following steps: receiving a new kernel file sent by a baseboard management controller; acquiring a trigger signal sent by the substrate management controller; executing a system management interrupt processing program for stopping a service process according to the trigger signal; loading and starting a new kernel according to the new kernel file; and utilizing the new kernel to continuously execute the service process. The method and the device can solve the problems that the new kernel cannot be quickly switched to in the running state of the Linux system, the kernel can not be effectively guaranteed to be upgraded or the running fault cannot be solved under the condition that the server does not need to be restarted, and the like.

Description

Kernel remote switching method and device
Technical Field
The invention relates to the technical field of Linux systems, in particular to a kernel remote switching method and device.
Background
With the continuous development of server technology, the performance and functions are increasingly powerful, and the requirements of multi-channel CPUs, large-capacity memories, high expandability and the like make the hardware design complicated, the devices are various, a large amount of initialization, detection and verification work is required in the starting stage, and the starting speed is slow. However, the server generally needs to operate continuously for a long time, and the requirements on availability and stability are very high, so that the server is rarely restarted, but the service provision may be affected by conditions such as irretrievable operation failure or installation of a security patch which can be effective after restarting. In the prior art, the Linux system kernel must be restarted when being switched to a new kernel, so that the switching efficiency is low.
Disclosure of Invention
In view of this, embodiments of the present invention provide a kernel remote switching method and apparatus, which can solve the problems in the prior art that a Linux system cannot be quickly switched to a new kernel in an operating state, and cannot effectively ensure that kernel upgrade is completed or an operation failure is solved without restarting a server.
The embodiment of the invention provides a kernel remote switching method, which comprises the following steps:
receiving a new kernel file sent by a baseboard management controller;
acquiring a trigger signal sent by the substrate management controller;
executing a system management interrupt processing program for stopping a service process according to the trigger signal;
loading and starting a new kernel according to the new kernel file;
and utilizing the new kernel to continuously execute the service process.
Optionally, receiving a new kernel file sent by the baseboard management controller includes:
and receiving a new kernel file sent by the substrate management controller in an in-band network management mode or an out-of-band network management mode.
Optionally, after receiving the new kernel file sent by the baseboard management controller, the method further includes:
backing up an original kernel file, and covering the new kernel file with the original kernel file;
and modifying corresponding configuration information according to the new kernel file.
Optionally, loading and starting the new kernel according to the new kernel file, including:
and according to the new kernel file, loading and starting a new kernel by calling a bootstrap program in a system management interrupt processing program.
The embodiment of the invention provides a kernel remote switching device, which comprises:
the receiving module is used for receiving a new kernel file sent by the substrate management controller;
the acquisition module is used for acquiring the trigger signal sent by the substrate management controller;
the execution module is used for executing a system management interrupt processing program for stopping a service process according to the trigger signal;
the loading module is used for loading and starting the new kernel according to the new kernel file;
and the starting module is used for continuously executing the service process by utilizing the new kernel.
The embodiment of the invention provides a kernel remote switching method, which comprises the following steps:
sending the new kernel file to a server;
sending a trigger signal to the server; the trigger signal is used for indicating the server to stop the service process, loading and starting a new kernel according to the new kernel file, and continuously executing the service process by using the new kernel.
Optionally, sending the new kernel file to the server includes:
and sending the new kernel file to the server in an in-band network management mode or an out-of-band network management mode.
The embodiment of the invention provides a kernel remote switching device, which comprises:
the sending module is used for sending the new kernel file to the server;
the triggering module is used for sending a triggering signal to the server; the trigger signal is used for indicating the server to stop the service process, loading and starting a new kernel according to the new kernel file, and continuously executing the service process by using the new kernel.
The embodiment of the invention provides computer equipment, which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, and is characterized in that when the processor executes the program, the steps of any one of the kernel remote switching methods are realized.
Compared with the prior art, the technical scheme adopted by the embodiment of the invention has the beneficial effects that: the embodiment of the invention receives the new kernel file sent by the baseboard management controller, then obtains the trigger signal sent by the baseboard management controller, executing a system management interrupt processing program for stopping the service process according to the trigger signal, loading and starting a new kernel according to the new kernel file, continuously executing the service process by utilizing the new kernel, thereby the kernel is quickly switched to a new kernel in the running state, the server does not need to be restarted, the service is quickly recovered after being temporarily suspended, the method can be used for upgrading the kernel or solving operation faults and the like, is convenient and efficient, and can achieve the purposes of rapidly updating the kernel of the target server in batches or rapidly removing the kernel fault to ensure the stable operation of the service process compared with the traditional process of switching the kernel by skipping multiple stages of hardware equipment restarting, firmware initialization, verification and the like.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a flowchart of a kernel remote switching method according to an embodiment of the present invention;
fig. 2 is a block diagram of a remote kernel switching device according to a second embodiment of the present invention;
fig. 3 is a flowchart of a remote kernel switching method according to a third embodiment of the present invention;
fig. 4 is a block diagram of a remote kernel switching apparatus according to a fourth embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. 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.
Referring to fig. 1, a method for remotely switching kernels according to an embodiment of the present invention includes:
step S101, receiving a new kernel file sent by the baseboard management controller.
The execution subject of the method in the first embodiment may be a server. The server is used for storing the new kernel file and executing the service process. The invention designs a remote control function based on a substrate management controller, has a cluster management function and can realize batch monitoring of the server, the substrate management controller is a hardware module which is arranged on a mainboard of the server in a built-in mode, can carry out remote control management on the server through an intelligent platform management interface IPMI protocol, and the server can receive a new kernel file sent by the substrate management controller and store the new kernel file in a hard disk of a Linux system.
Specifically, receiving a new kernel file sent by the baseboard management controller may include: and receiving a new kernel file sent by the substrate management controller in an in-band network management mode or an out-of-band network management mode.
In this embodiment, the manner in which the baseboard management controller sends the new kernel file to the server may include an in-band network management manner or an out-of-band network management manner, where the in-band network management enables network management data and service data in the network to be transmitted in the same link, when the management data (including simple network management protocol SNMP, data exchange Netflow, verification service Radius, charging, and the like) is more, the performance of the entire network will be affected, and when the flow of the management data is less, the performance of the entire network will not be affected significantly, the in-band network management may be adopted; the network management control information of the out-of-band network management and the bearing service information of the user network are transmitted in different logic channels, the network management data and the service data are separated, an independent channel is established for the network management data, only management data, statistical information, charging information and the like are transmitted in the channel, and the network management data and the service data are separated, so that the efficiency and the reliability of the network management can be improved, and the safety of the network management data can also be improved.
Optionally, after receiving the new kernel file sent by the baseboard management controller, the method may further include: backing up an original kernel file, and covering the new kernel file with the original kernel file; and modifying corresponding configuration information according to the new kernel file.
In this embodiment, after receiving the new kernel file sent by the baseboard management controller, the server backs up the original kernel file to the memory to store the original kernel file for performing later-stage operation failure analysis and the like, and after the back-up is completed, the server covers the original kernel file in the Linux system with the new kernel file and modifies corresponding configuration information, for example, uniformly matches the new kernel file name, and can be used for the server to execute a system management interrupt handler according to the configuration information, where the covered original kernel file is an original kernel file according to which the original kernel in the Linux system operates and is not backed up in the memory.
And step S102, acquiring a trigger signal sent by the baseboard management controller.
In this embodiment, after receiving a new kernel file sent by a baseboard management controller, a server obtains a trigger signal sent by the baseboard management controller, where the trigger signal is used to instruct the server to stop a service process, and at this time, an original kernel stops running, a running service process also stops, and the service process can be resumed after the new kernel is started.
And step S103, executing a system management interrupt processing program for stopping the service process according to the trigger signal.
In this embodiment, after the server obtains the trigger signal, according to the trigger signal, the CPU on the server enters a system management SMM mode to execute a system management interrupt handler registered at a server boot stage.
And step S104, loading and starting a new kernel according to the new kernel file.
Specifically, according to the new kernel file, a bootstrap program is called in a system management interrupt handler to load and start the new kernel.
In this embodiment, according to the new kernel file, the system management interrupt handler is designed to call a boot program of the UEFI BIOS in the BDS stage, and directly load the new kernel, at this time, the original kernel stops running, the running service process also stops, and the new kernel starts to be started.
And step S105, utilizing the new kernel to continuously execute the service process.
In this embodiment, the service process can be recovered after the new kernel is started.
In this embodiment, by receiving a new kernel file sent by a baseboard management controller, and then acquiring a trigger signal sent by the baseboard management controller, executing a system management interrupt processing program for stopping the service process according to the trigger signal, loading and starting a new kernel according to the new kernel file, continuously executing the service process by utilizing the new kernel, thereby the kernel is quickly switched to a new kernel in the running state, the server does not need to be restarted, the service is quickly recovered after being temporarily suspended, the method can be used for upgrading the kernel or solving operation faults and the like, is convenient and efficient, and can achieve the purposes of rapidly updating the kernel of the target server in batches or rapidly removing the kernel fault to ensure the stable operation of the service process compared with the traditional process of switching the kernel by skipping multiple stages of hardware equipment restarting, firmware initialization, verification and the like.
Referring to fig. 2, the core remote switching apparatus provided in the second embodiment may include: a receiving module 201, configured to receive a new kernel file sent by a baseboard management controller; an obtaining module 202, configured to obtain a trigger signal sent by the baseboard management controller; the execution module 203 is configured to execute a system management interrupt handler for stopping a service process according to the trigger signal; a loading module 204, configured to load and start a new kernel according to the new kernel file; and the starting module 205 is configured to continue executing the service process by using the new kernel.
The remote kernel switching device in this embodiment may be configured to execute the remote kernel switching method shown in fig. 1, and specific implementation principles of the remote kernel switching device may refer to the foregoing method embodiment, which is not described herein again.
In the second embodiment, by setting the receiving module 201, the obtaining module 202, the executing module 203, the loading module 204, and the starting module 205, the system management interrupt handler for stopping the service process is executed according to the trigger signal and the new kernel is loaded and started according to the new kernel file, and the new kernel is used to continue executing the service process, so that the kernel is quickly switched to the new kernel in the running state, the server does not need to be restarted, the service is quickly recovered after being temporarily suspended, the server can be used for kernel upgrade or solving running faults, and the like, and is convenient and efficient And updating the kernels of the target servers in batches, or quickly eliminating the kernel fault to ensure the stable operation of the service process.
The receiving module 201 is specifically configured to receive a new kernel file sent by the baseboard management controller in an in-band network management manner or an out-of-band network management manner; the kernel remote switching device further comprises a backup module, wherein the backup module is used for backing up an original kernel file after the receiving module 201 receives a new kernel file sent by the baseboard management controller, and covering the new kernel file with the original kernel file; the loading module 204 is specifically configured to load and start the new kernel by invoking a bootstrap program in a system management interrupt handler according to the new kernel file.
In this embodiment, the standby module is specifically configured to, after the receiving module 201 receives the new kernel file sent by the baseboard management controller, backup the original kernel file to the memory to store the original kernel file for later-stage operation fault analysis and the like, and after the backup is completed, the server covers the original kernel file in the Linux system with the new kernel file and modifies corresponding configuration information.
The obtaining module 202 is specifically configured to, after receiving a new kernel file sent by a baseboard management controller, obtain, by a server, a trigger signal sent by the baseboard management controller, where the trigger signal is used to instruct the server to stop a service process, at this time, an original kernel stops running, a running service process also stops, and the service process can be resumed after the new kernel is started.
The execution module 203 is specifically configured to, after the server obtains the trigger signal, enter a system management SMM mode by the CPU on the server according to the trigger signal to execute a system management interrupt handler registered at a server boot stage.
The loading module 204 is specifically configured to, according to the new kernel file, design the system management interrupt handler to call a boot program of the UEFI BIOS at the BDS stage, directly load the new kernel, at this time, the original kernel stops running, the running service process also stops, and the new kernel starts to be started.
The starting module 205 is specifically configured to recover and continue to execute the service process after the new kernel is started.
Referring to fig. 3, the kernel remote switching method provided in the third embodiment includes:
step S301, a new kernel file is sent to the server.
The main body of the method in the third embodiment may be a substrate management controller. The substrate management controller is used for carrying out remote control management on the server through an IPMI protocol. The invention designs a remote control function based on a substrate management controller, has a cluster management function and can realize batch monitoring of the servers, the substrate management controller is a hardware module which is arranged on a mainboard of the server in a built-in mode, can carry out remote control management on the server through an intelligent platform management interface IPMI protocol, and can send a new kernel file to the server.
Specifically, sending the new kernel file to the server may include: and sending the new kernel file to the server in an in-band network management mode or an out-of-band network management mode.
In this embodiment, the baseboard management controller may transmit a file and operate the server in an in-band network management manner or an out-of-band network management manner, where the file may include a new kernel file, and if the baseboard management controller uses a service network interface, the baseboard management controller may transmit network management data and service data in a network in the same link through a secure shell protocol SSH, or use a dedicated network interface, and the baseboard management controller may remotely control through a KVM (keyboard, video, mouse), and the like, where the in-band network management causes the network management data and the service data in the network to be transmitted in the same link, when the management data (including a simple network management protocol SNMP, a data exchange Netflow, a verification service Radius, charging, and the like) is more, the performance of the entire network may be affected, and when the flow rate of the management data is less, the performance of the entire network may not be significantly affected, the in-band network management may be adopted; the network management control information of the out-of-band network management and the bearing service information of the user network are transmitted in different logic channels, the network management data and the service data are separated, an independent channel is established for the network management data, only management data, statistical information, charging information and the like are transmitted in the channel, and the network management data and the service data are separated, so that the efficiency and the reliability of the network management can be improved, and the safety of the network management data can also be improved.
Step S302, sending a trigger signal to the server; the trigger signal is used for indicating the server to stop the service process, loading and starting a new kernel according to the new kernel file, and continuously executing the service process by using the new kernel.
In this embodiment, after sending a new kernel file to the server, the baseboard management controller triggers system management interrupt SMI and sends a trigger signal to the server, so that after the server acquires the trigger signal, according to the trigger signal, the CPU on the server enters a system management SMM mode to execute a system management interrupt handler registered at a server boot stage, where the system management interrupt handler is designed to call a bootstrap program of the UEFI BIOS at a BDS stage, and directly load a new kernel, at this time, the original kernel stops running, a running service process also stops, and starts to start the new kernel, and after the new kernel starts, the service process can be recovered.
On an X86 platform with a baseboard management controller, the baseboard management controller needs to be connected with a System Management Interrupt (SMI) interrupt pin, a Linux system is installed under an X86 framework, a corresponding system management interrupt processing program is compiled in UEFI BIOS codes, and the system management interrupt processing program is registered when a server is started.
In this embodiment, the baseboard management controller sends a new kernel file to the server and sends a trigger signal to the server, so that the server stops the service process according to the indication of the trigger signal, loads and starts a new kernel according to the new kernel file, and continues to execute the service process by using the new kernel, thereby quickly switching the kernel to the new kernel in the running state, the server does not need to be restarted, the service is quickly recovered after being temporarily suspended, and the method can be used for kernel upgrade or operation failure resolution, and the like, is convenient and efficient, and skips multiple restart stages of hardware equipment, firmware initialization, verification and the like compared with the traditional kernel switching process, and can achieve the purpose of quickly and batch updating the kernel of the target server, or quickly removing the kernel failure to ensure stable running of the service process.
Referring to fig. 4, the kernel remote switching apparatus provided in the fourth embodiment includes:
a sending module 401, configured to send a new kernel file to a server; a triggering module 402, configured to send a triggering signal to the server; the trigger signal is used for indicating the server to stop the service process, loading and starting a new kernel according to the new kernel file, and continuously executing the service process by using the new kernel.
The remote kernel switching device in this embodiment may be configured to execute the remote kernel switching method shown in fig. 3, and specific implementation principles of the remote kernel switching device may refer to the foregoing method embodiment, which is not described herein again.
In the fourth embodiment, the sending module 401 and the triggering module 402 are arranged and configured to send a new kernel file to a server through a baseboard management controller, send a triggering signal to the server to instruct the server to stop a service process, load and start a new kernel according to the new kernel file, and continue to execute the service process by using the new kernel, so that the kernel is quickly switched to the new kernel in an operating state, the server does not need to be restarted, the service is quickly recovered after being temporarily suspended, the kernel can be used for kernel upgrade or operation failure resolution, and the like, and is convenient and efficient.
The sending module 401 is specifically configured to send a new kernel file to a server by a baseboard management controller through an in-band network management mode or an out-of-band network management mode; the triggering module 402 is specifically configured to instruct the server to stop the service process, load and start a new kernel according to the new kernel file, and continue to execute the service process by using the new kernel.
In this embodiment, after sending a new kernel file to the server, the baseboard management controller triggers system management interrupt SMI and sends a trigger signal to the server, so that after the server acquires the trigger signal, according to the trigger signal, the CPU on the server enters a system management SMM mode to execute a system management interrupt handler registered at a server boot stage, where the system management interrupt handler is designed to call a bootstrap program of the UEFI BIOS at a BDS stage, and directly load a new kernel, at this time, the original kernel stops running, a running service process also stops, and starts to start the new kernel, and after the new kernel starts, the service process can be recovered.
The embodiment of the invention also provides a kernel remote switching method, which comprises the following steps of S501 to S508:
step S501, start;
step S502, the baseboard management controller is remotely connected to a server;
step S503, the baseboard management controller sends a new kernel file to the server through an in-band network management mode or an out-of-band network management mode;
step S504, the server backups the original kernel file and covers the new kernel on the original kernel;
step S505, the baseboard management controller triggers system management interrupt SMI, so that the CPU on the server enters an SMM mode, and executes a corresponding system management interrupt handler;
step S506, the system management interrupt processing program calls a bootstrap program to execute a new kernel;
step S507, the new kernel finishes starting and continues to execute the service process;
and step S508, ending.
The SMI is in the CPU level and is transparent to the operating system, and under the condition that the operating system has serious abnormalities such as downtime, breakdown and the like on a software level, the SMI can also be normally triggered to enable the CPU to enter an SMM mode and execute a pre-designed system management interrupt processing program, and the system management interrupt processing program is registered by a BIOS (basic input output System) in the server startup phase and is stored in a memory.
The computer device provided by the invention comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, and when the processor executes the program, the steps of the method can be realized.
The computer device in this embodiment may be configured to execute the kernel remote switching method shown in fig. 1 and/or fig. 3, and specific implementation principles of the method may refer to the foregoing method embodiment, which is not described herein again.
The present invention provides a computer readable storage medium storing a computer program which, when executed by one or more processors, performs the steps of the above method.
The computer-readable storage medium in this embodiment may be used to execute the kernel remote switching method shown in fig. 1 and/or fig. 3, and specific implementation principles of the method may refer to the foregoing method embodiment, which is not described herein again.
The invention remotely connects a substrate management controller to a server by setting an inner core remote switching method and a device, the substrate management controller sends a new inner core file to the server by an in-band network management mode or an out-band network management mode, the server backups an original inner core file and covers the new inner core, the substrate management controller triggers a system management interrupt SMI, so that a CPU on the server enters an SMM mode and executes a corresponding system management interrupt processing program, the system management interrupt processing program calls a bootstrap program to execute the new inner core, the new inner core finishes starting and continues to execute a service process. The kernel is quickly switched to the new kernel in the running state, the server does not need to be restarted, the service is quickly recovered after being temporarily suspended, the method can be used for kernel upgrading or solving running faults and the like, is convenient and efficient, and compared with the traditional kernel switching process, the method skips multiple stages of hardware equipment restarting, firmware initialization, verification and the like, and can achieve the purposes of quickly updating the kernel of the target server in batches or quickly removing the kernel fault to ensure that the service process stably runs.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (7)

1. A method for remotely switching kernels is characterized by comprising the following steps:
receiving a new kernel file sent by a baseboard management controller, comprising: receiving a new kernel file sent by a substrate management controller in an in-band network management mode or an out-of-band network management mode; the baseboard management controller is a hardware module which is built in a mainboard of the server, and selects different modes for transmitting a new kernel file according to the flow condition of management data;
acquiring a trigger signal sent by the substrate management controller;
executing a system management interrupt handler for stopping a service process according to the trigger signal, comprising: according to the trigger signal, the CPU on the server enters a system management SMM mode to execute a system management interrupt handler;
loading and starting a new kernel according to the new kernel file, comprising: according to the new kernel file, loading and starting a new kernel by calling a boot program of a UEFI BIOS in a BDS stage in a system management interrupt processing program;
and utilizing the new kernel to continuously execute the service process.
2. The remote kernel switching method according to claim 1, further comprising, after receiving a new kernel file sent by a baseboard management controller:
backing up an original kernel file, and covering the new kernel file with the original kernel file;
and modifying corresponding configuration information according to the new kernel file.
3. A kernel remote switching device, comprising:
the receiving module is used for receiving a new kernel file sent by the baseboard management controller, and comprises: receiving a new kernel file sent by a substrate management controller in an in-band network management mode or an out-of-band network management mode; the baseboard management controller is a hardware module which is built in a mainboard of the server, and selects different modes for transmitting a new kernel file according to the flow condition of management data;
the obtaining module is used for obtaining the trigger signal sent by the baseboard management controller, and comprises: according to the trigger signal, the CPU on the server enters a system management SMM mode to execute a system management interrupt handler;
the execution module is used for executing a system management interrupt processing program for stopping a service process according to the trigger signal;
the loading module is used for loading and starting the new kernel according to the new kernel file, and comprises: according to the new kernel file, loading and starting a new kernel by calling a boot program of a UEFI BIOS in a BDS stage in a system management interrupt processing program;
and the starting module is used for continuously executing the service process by utilizing the new kernel.
4. A method for remotely switching kernels is characterized by comprising the following steps:
sending the new kernel file to the server, including: a new kernel file is sent through an in-band network management mode or an out-of-band network management mode; selecting different modes for transmitting the new kernel file according to the flow condition of the management data;
sending a trigger signal to the server; the trigger signal is used for instructing the server to stop the service process, and comprises the following steps: according to the trigger signal, the CPU on the server enters a system management SMM mode to execute a system management interrupt handler; loading and starting a new kernel according to the new kernel file, comprising: according to the new kernel file, loading and starting a new kernel by calling a boot program of a UEFI BIOS in a BDS stage in a system management interrupt processing program; and utilizing the new kernel to continuously execute the service process.
5. A kernel remote switching device, comprising:
a sending module, configured to send a new kernel file to a server, including: a new kernel file is sent through an in-band network management mode or an out-of-band network management mode; selecting different modes for transmitting the new kernel file according to the flow condition of the management data;
the triggering module is used for sending a triggering signal to the server; the trigger signal is used for instructing the server to stop the service process, and comprises the following steps: according to the trigger signal, the CPU on the server enters a system management SMM mode to execute a system management interrupt handler; loading and starting a new kernel according to the new kernel file, comprising: according to the new kernel file, loading and starting a new kernel by calling a boot program of a UEFI BIOS in a BDS stage in a system management interrupt processing program; and utilizing the new kernel to continuously execute the service process.
6. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method according to claim 1 or 2 are implemented when the processor executes the program.
7. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the steps of the method according to claim 4 are performed when the program is executed by the processor.
CN201711465639.7A 2017-12-28 2017-12-28 Kernel remote switching method and device Active CN109976886B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711465639.7A CN109976886B (en) 2017-12-28 2017-12-28 Kernel remote switching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711465639.7A CN109976886B (en) 2017-12-28 2017-12-28 Kernel remote switching method and device

Publications (2)

Publication Number Publication Date
CN109976886A CN109976886A (en) 2019-07-05
CN109976886B true CN109976886B (en) 2021-10-22

Family

ID=67075250

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711465639.7A Active CN109976886B (en) 2017-12-28 2017-12-28 Kernel remote switching method and device

Country Status (1)

Country Link
CN (1) CN109976886B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110851138A (en) * 2019-11-06 2020-02-28 山东超越数控电子股份有限公司 BMC software development method for separating kernel and application
CN111131296B (en) * 2019-12-30 2022-04-26 杭州迪普科技股份有限公司 Message distribution method and device
CN114064128B (en) * 2020-07-29 2024-01-02 华为技术有限公司 Kernel restarting method
CN116383091B (en) * 2023-05-29 2023-08-29 珠海妙存科技有限公司 Starting method and starting device of eMMC verification platform and storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101324850B (en) * 2007-06-12 2011-04-06 中兴通讯股份有限公司 LINUX inner core dynamic loading method
CN101556547B (en) * 2009-05-25 2012-01-25 芯通科技(成都)有限公司 Safe method and system used for remotely upgrading embedded Linux kernel
CN102629206B (en) * 2012-02-29 2018-02-06 深圳市赛格导航科技股份有限公司 A kind of method for updating embedded system software and system
EP3033894B1 (en) * 2013-08-12 2021-09-22 CIS Maxwell, LLC Operating system integrated domain management
CN103984585A (en) * 2014-06-06 2014-08-13 浪潮电子信息产业股份有限公司 Method for upgrading Linux kernel in running process of kernel module capable of being plugged in thermal mode
CN106708619B (en) * 2015-07-21 2021-01-15 华为技术有限公司 Resource management method and device
CN106446305A (en) * 2016-12-23 2017-02-22 网际傲游(北京)科技有限公司 System and method for Linux browser to realize Webkit/IE dual-core seamless browsing

Also Published As

Publication number Publication date
CN109976886A (en) 2019-07-05

Similar Documents

Publication Publication Date Title
CN109976886B (en) Kernel remote switching method and device
CN101814035B (en) Method and system to enable fast platform restart
US20200159302A1 (en) Information Handling System And Method To Detect And Recover From No Power/No Post Failures
WO2018095107A1 (en) Bios program abnormal processing method and apparatus
US11314665B2 (en) Information processing system, information processing device, BIOS updating method for information processing device, and BIOS updating program for information processing device
CN104199753B (en) A kind of virtual machine application service fault recovery system and its fault recovery method
US10802916B2 (en) System and method to enable rapid recovery of an operating system image of an information handling system after a malicious attack
US10460111B2 (en) System and method to isolate host and system management in an information handling system
KR20090120541A (en) Method and system for automatic recovery of an embedded operating system
US20190026126A1 (en) System and Method for Operating System Initiated Firmware Update via UEFI Applications
CN114741233A (en) Quick start method
CN114116280A (en) Interactive BMC self-recovery method, system, terminal and storage medium
US20240345844A1 (en) Cluster Management Method, Device, and Computing System
CN102637139A (en) Method, device and single panel for feeding watchdog by embedded system
US10572435B2 (en) Techniques of accessing serial console of BMC using host serial port
CN111090546A (en) Method, device and equipment for restarting operating system and readable storage medium
CN114116276A (en) BMC hang-up self-recovery method, system, terminal and storage medium
JP6073710B2 (en) Information processing apparatus, automatic recovery method from startup failure, and automatic recovery program from startup failure
US10198275B2 (en) Protecting firmware flashing from power operations
CN111078452A (en) BMC firmware image recovery method and device
US10768940B2 (en) Restoring a processing unit that has become hung during execution of an option ROM
CN111221683A (en) Double-flash hot backup method, system, terminal and storage medium for data center switch
CN104268026A (en) Monitoring and management method and device for embedded system
TWI554876B (en) Method for processing node replacement and server system using the same
CN112698870A (en) Startup and shutdown management method, computing device and storage medium

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