Minor discovery: Ubuntu restarts the system with kexec

Source: Internet
Author: User
Kexec uses the overwrite philosophy of exec () called by Unix systems. It generates a new kernel that overwrites the running kernel. In this process, you do not need to start the firmware on the machine (firmware), so you can save some restart time. Because you need to check the bus and identify the device to start the firmware, saving the time will accelerate the system startup. If you know this, we can solve the problem that my system cannot be restarted. How can this problem be solved? 1. grep:/etc directory apple @ Ubunt

Kexec uses the overwrite philosophy of exec () called by Unix systems. It generates a new kernel that overwrites the running kernel. In this process, you do not need to start the firmware on the machine (firmware), so you can save some restart time.

Because you need to check the bus and identify the device to start the firmware, saving the time will accelerate the system startup.

After knowing this, let's solve the problem that my system cannot be restarted,


Why cannot it be started?

1. grep/etc directory

Apple @ Ubuntu :~ $ Sudo grep-r kexec/etc
Grep:/etc/alternatives/smbstatus.1.gz: No such file or directory
/Etc/rc6.d/K18kexec-load: # Provides: kexec-load
/Etc/rc6.d/K18kexec-load: # Required-Stop: $ remote_fs kexec
/Etc/rc6.d/K18kexec-load: # Short-Description: Load kernel image with kexec
/Etc/rc6.d/K18kexec-load: test-r/etc/default/kexec &./etc/default/kexec
/Etc/rc6.d/K18kexec-load: test-x/sbin/kexec | exit 0
/Etc/rc6.d/K18kexec-load: test "x 'cat/sys/kernel/kexec_loaded 'y" = "x1y" & exit 0
/Etc/rc6.d/K18kexec-load: kexec-l "$ KERNEL_IMAGE" -- append = "$ REAL_APPEND"
/Etc/rc6.d/K18kexec-load: kexec-l "$ KERNEL_IMAGE" -- initrd = "$ INITRD" -- append = "$ REAL_APPEND"
/Etc/rc6.d/S85kexec: # Provides: kexec
/Etc/rc6.d/S85kexec: # Short-Description: Execute the kexec-e command to reboot system
/Etc/rc6.d/S85kexec: test-r/etc/default/kexec &./etc/default/kexec
/Etc/rc6.d/S85kexec: test "x 'cat/sys/kernel/kexec_loaded 'y" = "x1y" | exit 0
/Etc/rc6.d/S85kexec: test-x/sbin/kexec | exit 0
/Etc/rc6.d/S85kexec: log_action_msg "Will now restart with kexec"
/Etc/rc6.d/S85kexec: kexec-e
/Etc/rc6.d/S85kexec: log_failure_msg "kexec failed"
/Etc/rc6.d/S60umountroot: # shocould-Stop: halt reboot kexec
/Etc/init. d/kexec-load: # Provides: kexec-load
/Etc/init. d/kexec-load: # Required-Stop: $ remote_fs kexec
/Etc/init. d/kexec-load: # Short-Description: Load kernel image with kexec
/Etc/init. d/kexec-load: test-r/etc/default/kexec &./etc/default/kexec
/Etc/init. d/kexec-load: test-x/sbin/kexec | exit 0
/Etc/init. d/kexec-load: test "x 'cat/sys/kernel/kexec_loaded 'y" = "x1y" & exit 0
/Etc/init. d/kexec-load: kexec-l "$ KERNEL_IMAGE" -- append = "$ REAL_APPEND"
/Etc/init. d/kexec-load: kexec-l "$ KERNEL_IMAGE" -- initrd = "$ INITRD" -- append = "$ REAL_APPEND"
/Etc/init. d/kexec: # Provides: kexec
/Etc/init. d/kexec: # Short-Description: Execute the kexec-e command to reboot system
/Etc/init. d/kexec: test-r/etc/default/kexec &./etc/default/kexec
/Etc/init. d/kexec: test "x 'cat/sys/kernel/kexec_loaded 'y" = "x1y" | exit 0
/Etc/init. d/kexec: test-x/sbin/kexec | exit 0
/Etc/init. d/kexec: log_action_msg "Will now restart with kexec"
/Etc/init. d/kexec: kexec-e
/Etc/init. d/kexec: log_failure_msg "kexec failed"
/Etc/init. d/umountroot: # shocould-Stop: halt reboot kexec
/Etc/init. d/kdump: # Short-Description: Load crashkernel image with kexec
/Etc/init. d/kdump: test-x/sbin/kexec | exit 0
/Etc/init. d/kdump: kexec-p "$ KERNEL_IMAGE" -- initrd = "$ INITRD" -- append = "$ APPEND"
/Etc/rc2.d/S00kdump: # Short-Description: Load crashkernel image with kexec
/Etc/rc2.d/S00kdump: test-x/sbin/kexec | exit 0
/Etc/rc2.d/S00kdump: kexec-p "$ KERNEL_IMAGE" -- initrd = "$ INITRD" -- append = "$ APPEND"
/Etc/default/kexec: # Defaults for kexec initscript
/Etc/default/kexec: # sourced by/etc/init. d/kexec and/etc/init. d/kexec-load
/Etc/default/kexec: # Load a kexec kernel (true/false)
/Etc/rc0.d/S60umountroot: # shocould-Stop: halt reboot kexec
Apple @ ubuntu :~ $

It seems that the script/etc/init. d/kexec needs to be used to restart the system.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.