1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[Tip] fast reboots with kexec

Discussion in 'Proxmox VE: Installation and configuration' started by morph027, Jul 11, 2017.

Tags:
  1. morph027

    morph027 Active Member

    Joined:
    Mar 22, 2013
    Messages:
    328
    Likes Received:
    36
    Install the package:

    Code:
    echo "kexec-tools kexec-tools/load_kexec boolean false" | debconf-set-selections
    apt-get -y install kexec-tools
    
    Create /etc/systemd/system/kexec-pve.service with content:

    Code:
    [Unit]
    Description=boot into into the current pve kernel
    Documentation=man:kexec(8)
    DefaultDependencies=no
    Before=shutdown.target umount.target final.target
    
    [Service]
    Type=oneshot
    ExecStart=/sbin/kexec -l /boot/pve/vmlinuz --initrd=/boot/pve/initrd.img --reuse-cmdline
    
    [Install]
    WantedBy=kexec.target
    
    Enable:

    Code:
    systemctl enable kexec-pve.service
    
    Now you can reboot without the whole UEFI/BIOS/OpROM stuff with

    Code:
    systemctl kexec
    
     
    #1 morph027, Jul 11, 2017
    Last edited: Jul 12, 2017
  2. neonmaus

    neonmaus New Member

    Joined:
    Sep 11, 2015
    Messages:
    23
    Likes Received:
    0
    Thanks for this very good tip :)
     
  3. bogo22

    bogo22 New Member

    Joined:
    Nov 4, 2016
    Messages:
    23
    Likes Received:
    0
    Really nice, thanks. The proxmox dev's should integrate it and make it as alternative reboot option to the "real" reboot with bios :)
    Small nit: Is the "into into" in the description right?
     
  4. homozavrus

    homozavrus New Member

    Joined:
    Oct 22, 2010
    Messages:
    4
    Likes Received:
    0
    Thanks, work like a charm! :)
    Better to place this thread as page in wiki
     
  5. Rhinox

    Rhinox Active Member

    Joined:
    Sep 28, 2016
    Messages:
    201
    Likes Received:
    29
    Just to make things clear: it does not boot into the current (running) kernel, but into the kernel defined as primary in boot-loader. So if kernel was updated, it boots into the new one...
     

Share This Page