Which kernel does reboot load?

I am making use of ssh to from another location access some equipments. These equipments have a personalized kernel mounted (based upon the 2.6.28 resource). Nonetheless, whenever I attempt to reboot the equipments making use of sudo reboot, the system makes use of kexec and also lots the 2.6.28 - 19 - common kernel, which is additionally intalled on the equipment.

So just how can I define which kernel photo to load after reboot?

EDIT: I have actually ubuntu 9.04 mounted on the equipment, with grub 1. something. The personalized kernel is based upon the 2.6.28 resource with the name being 2.6.28.10 - personalized - 1.1. 2 various other bits are mounted on the equipment 2.6.28 - 19 - common and also 2.6.28 - 6 - 386. I have actually examined that after calling reboot, the equipment does not in fact reboot yet makes use of kexec to load the 19 - common kernel, also if the existing kernel was the personalized one.

0
2019-05-19 00:11:09
Source Share
Answers: 2

Normally, when you reboot, the equipment will certainly go back to grub and also either permit you to select a kernel using the key-board, or boot the default set up kernel. Nonetheless if you have kexec - devices mounted, the reboot command will certainly short circuit this practices and also straight kexec right into a kernel. You can disable this practices, and also go back to grub in reboot, by uninstalling kexec devices or editing and enhancing the documents

/etc/default/kexec 

and also setup:

  LOAD_KEXEC=false 

Alternatively, to maintain kexec energetic and also have it reboot right into the kernel of your selection, attempt a command line similar to this to load your wanted kernel:

 kexec -l /boot/vmlinux --append=root=/dev/hda1 --initrd=/boot/initrd

after that when 'kexec - e' is later on run, the set up kernel in the kexec line too will certainly be run. As I think the reboot manuscript at some point simply calls 'kexec - e' I think the kernel adjustment need to work after that.

0
2019-05-21 10:41:18
Source

I located a rather great blog post here. It has a manuscript to call kexec by hand. Reposting manuscript below:

    UNAMER=`uname -r` # this checks the version of the kernel 
            #just to save typing

    #This just puts all of the parameters for loading in one place

KPARAMS="-l " # tells kexec to load the kernel

# --append tells the kernel all of its parameters
# cat /proc/cmdline gets the current kernel's command line
KPARAMS=$KPARAMS"--append=\"`cat /proc/cmdline`\" "

# this tells the kernel what initrd image to use
KPARAMS=$KPARAMS"--initrd=/boot/initrd.img-$UNAMER "

# this tells the kexec what kernel to load
KPARAMS=$KPARAMS"/boot/vmlinuz-$UNAMER"

    # Message should end with a newline since kFreeBSD may
    # print more stuff (see #323749)
    log_action_msg "Will now restart"

    if [ -x `locate kexec | grep sbin` ]; then # check for the kexec executable
            kexec $KPARAMS  # load the kernel with the correct parameters
            sync            # sync all of the disks so as not to lose data
            umount -a       # make sure all disks are unmounted
            kexec -e        # reboot the kernel
    fi

    #This next line should never happen.

    reboot -d -f -i
0
2019-05-21 10:34:19
Source