'Add a kernel entry to the bootloader (or replace if one exists
already with the same title).
:param path: string path to the kernel image file
:param title: title of this entry in the bootloader config
:param root: string of the root device
:param args: string with cmdline args
:param initrd: string path to the initrd file
:param default: set to True to make this entry the default one
(default False)
:param position: where to insert the new entry in the bootloader
config file (default \'end\', other valid input \'start\', or
# of the title)
:param xen_hypervisor: xen hypervisor image file (valid only when
xen mode is enabled)'

def add_kernel(self, path, title='autoserv', root=None, args=None, initrd=None, default=False, position='end'):

    if (title in self.get_titles()):
        self.remove_kernel(title)
    parameters = [('--add-kernel=%s' % path), ('--title=%s' % title)]
    if args:
        parameters.append(('--args=%s' % self._remove_duplicate_cmdline_args(args)))
    if initrd:
        parameters.append(('--initrd=%s' % initrd))
    if default:
        parameters.append('--make-default')
    parameters.append('--copy-default')
    return self._run_grubby_get_return(parameters)
