0
  1. I Installed Kali Linux 2.0 64bit (full version) using USB device in dual-boot with Windows 10, done without error if I remember well. My device is an Asus TP300LA (UEFI), enabled CSM in bios, and disabled secure boot.
  2. No grub showing even with shift holding after install: directly booted to Windows 10
  3. Few researches on the net: regain acces to the grub using "boot-repair" iso but..:
  4. I'm now stuck here:

                      GNU GRUB version 2.02~beta2-22ubuntu1
    
    Minimal BASH-like line editing is supported. For the first word, TAB...
    
    grub> _
    

I can access kali using few commands found on the net (ls, select partition, load kernel (I think it's that), then initrd then boot... (somethink like that) but even when I repair/upgrade grub, the problem remains event retrying boot-repair tool :/

There are my partitions:

Some Gparted

By the way I don't understand what is all this, I only have Windows, a Data partition, and Kali.


Here is my grub.cfg after generating it:

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}
function recordfail {
  set recordfail=1
  if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod ext2
set root='hd0,gpt10'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt10 --hint-efi=hd0,gpt10 --hint-baremetal=ahci0,gpt10  8047cda5-cffa-4d3f-9481-cef578f83efc
else
  search --no-floppy --fs-uuid --set=root 8047cda5-cffa-4d3f-9481-cef578f83efc
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=fr_FR
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=-1
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=hidden
    set timeout=0
  # Fallback hidden-timeout code in case the timeout_style feature is
  # unavailable.
  elif sleep --interruptible 0 ; then
    set timeout=0
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_gpt
insmod ext2
set root='hd0,gpt10'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt10 --hint-efi=hd0,gpt10 --hint-baremetal=ahci0,gpt10  8047cda5-cffa-4d3f-9481-cef578f83efc
else
  search --no-floppy --fs-uuid --set=root 8047cda5-cffa-4d3f-9481-cef578f83efc
fi
insmod png
if background_image /usr/share/images/desktop-base/kali-grub.png; then
  set color_normal=white/black
  set color_highlight=black/white
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
    set gfxpayload="${1}"
    if [ "${1}" = "keep" ]; then
        set vt_handoff=vt.handoff=7
    else
        set vt_handoff=
    fi
}
if [ "${recordfail}" != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry 'Kali GNU/Linux' --class kali --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-8047cda5-cffa-4d3f-9481-cef578f83efc' {
    recordfail
    load_video
    gfxmode $linux_gfx_mode
    insmod gzio
    if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
    insmod part_gpt
    insmod ext2
    set root='hd0,gpt10'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt10 --hint-efi=hd0,gpt10 --hint-baremetal=ahci0,gpt10  8047cda5-cffa-4d3f-9481-cef578f83efc
    else
      search --no-floppy --fs-uuid --set=root 8047cda5-cffa-4d3f-9481-cef578f83efc
    fi
    linux   /boot/vmlinuz-4.0.0-kali1-amd64 root=UUID=8047cda5-cffa-4d3f-9481-cef578f83efc ro  quiet splash $vt_handoff
    initrd  /boot/initrd.img-4.0.0-kali1-amd64
}
submenu 'Advanced options for Kali GNU/Linux' $menuentry_id_option 'gnulinux-advanced-8047cda5-cffa-4d3f-9481-cef578f83efc' {
    menuentry 'Kali GNU/Linux, with Linux 4.0.0-kali1-amd64' --class kali --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.0.0-kali1-amd64-advanced-8047cda5-cffa-4d3f-9481-cef578f83efc' {
        recordfail
        load_video
        gfxmode $linux_gfx_mode
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt10'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt10 --hint-efi=hd0,gpt10 --hint-baremetal=ahci0,gpt10  8047cda5-cffa-4d3f-9481-cef578f83efc
        else
          search --no-floppy --fs-uuid --set=root 8047cda5-cffa-4d3f-9481-cef578f83efc
        fi
        echo    'Loading Linux 4.0.0-kali1-amd64 ...'
        linux   /boot/vmlinuz-4.0.0-kali1-amd64 root=UUID=8047cda5-cffa-4d3f-9481-cef578f83efc ro  quiet splash $vt_handoff
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-4.0.0-kali1-amd64
    }
    menuentry 'Kali GNU/Linux, with Linux 4.0.0-kali1-amd64 (recovery mode)' --class kali --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.0.0-kali1-amd64-recovery-8047cda5-cffa-4d3f-9481-cef578f83efc' {
        recordfail
        load_video
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt10'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt10 --hint-efi=hd0,gpt10 --hint-baremetal=ahci0,gpt10  8047cda5-cffa-4d3f-9481-cef578f83efc
        else
          search --no-floppy --fs-uuid --set=root 8047cda5-cffa-4d3f-9481-cef578f83efc
        fi
        echo    'Loading Linux 4.0.0-kali1-amd64 ...'
        linux   /boot/vmlinuz-4.0.0-kali1-amd64 root=UUID=8047cda5-cffa-4d3f-9481-cef578f83efc ro single nomodeset 
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-4.0.0-kali1-amd64
    }
    menuentry 'Kali GNU/Linux, with Linux 3.19.0-15-generic' --class kali --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.19.0-15-generic-advanced-8047cda5-cffa-4d3f-9481-cef578f83efc' {
        recordfail
        load_video
        gfxmode $linux_gfx_mode
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt10'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt10 --hint-efi=hd0,gpt10 --hint-baremetal=ahci0,gpt10  8047cda5-cffa-4d3f-9481-cef578f83efc
        else
          search --no-floppy --fs-uuid --set=root 8047cda5-cffa-4d3f-9481-cef578f83efc
        fi
        echo    'Loading Linux 3.19.0-15-generic ...'
        linux   /boot/vmlinuz-3.19.0-15-generic.efi.signed root=UUID=8047cda5-cffa-4d3f-9481-cef578f83efc ro  quiet splash $vt_handoff
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-3.19.0-15-generic
    }
    menuentry 'Kali GNU/Linux, with Linux 3.19.0-15-generic (recovery mode)' --class kali --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.19.0-15-generic-recovery-8047cda5-cffa-4d3f-9481-cef578f83efc' {
        recordfail
        load_video
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt10'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt10 --hint-efi=hd0,gpt10 --hint-baremetal=ahci0,gpt10  8047cda5-cffa-4d3f-9481-cef578f83efc
        else
          search --no-floppy --fs-uuid --set=root 8047cda5-cffa-4d3f-9481-cef578f83efc
        fi
        echo    'Loading Linux 3.19.0-15-generic ...'
        linux   /boot/vmlinuz-3.19.0-15-generic.efi.signed root=UUID=8047cda5-cffa-4d3f-9481-cef578f83efc ro single nomodeset 
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-3.19.0-15-generic
    }
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/25_custom ###

menuentry "Windows UEFI bootmgfw.efi" {
search --fs-uuid --no-floppy --set=root 523E-93B4
chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
}

menuentry "Windows Boot UEFI loader" {
search --fs-uuid --no-floppy --set=root 523E-93B4
chainloader (${root})/EFI/Boot/bootx64.efi
}
### END /etc/grub.d/25_custom ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows Boot Manager (on /dev/sda2)' --class windows --class os $menuentry_id_option 'osprober-efi-523E-93B4' {
    insmod part_gpt
    insmod fat
    set root='hd0,gpt2'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  523E-93B4
    else
      search --no-floppy --fs-uuid --set=root 523E-93B4
    fi
    chainloader /efi/Microsoft/Boot/bootmgfw.efi
}
set timeout_style=menu
if [ "${timeout}" = 0 ]; then
  set timeout=10
fi
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
menuentry 'System setup' $menuentry_id_option 'uefi-firmware' {
    fwsetup
}
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
2

You're not getting reasonable dualboot with UEFI-booting Windows and BIOS-booting anything else. All the other answers I currently see are utter crap unfortunately as they start off with ignoring this fact.

You're better off disabling CSM and trying to install Kali in UEFI mode as it's required to get a UEFI bootloader (like grub-efi) in place properly -- judging by lack of /boot/efi mount it's BIOS-booted by now.

You're better off yet to have a read at what goes on, Rod Smith has got an excellent intro on UEFI bootloaders -- it helped me a lot while introducing UEFI support to ALT Linux.

Good luck, and you might want to pass the link to those who answered if it helps you -- answering with no clue is just a waste of everyone's time.

From Russia with love ;-)

-1

What you need to do is to make a grub.cfg file that contains the commands you use to boot. Then every time you start up, it'll show a menu with the entries you define in grub.cfg, and you can just pick one rather than retype all the time.

This should be pretty easy, if you've already successfully booted from the grub command line; you just need to specify the commands in grub.cfg that you would have typed manually. The file goes in a directory like /boot/grub or /boot/grub2; check which one exists on your system (from within Kali). I'll include a minimal example:

set timeout=5
set default=0

menuentry "Title for the boot menu" {
        set root='(hd0,gpt2)'
        linux /kernel-4.2.3 root=/dev/sda3
        initrd /initramfs-4.2.3.img
}

You'll have to edit this to go along with the precise commands you booted; just put whatever you used between the braces.

Alternatively, after determining what the full path to your grub.cfg should be (e.g. /boot/grub/grub.cfg), you can type at a command line:

grub-mkconfig -o /path/to/grub.cfg

This will create a significantly less minimal grub.cfg, using settings from various places. It will most likely do what you want, but customizing it can be somewhat painful.

-1

Just generate the config file:

grub-mkconfig -o /boot/grub/grub.cfg

Using grub-mkconfig makes your life a lot easier, since it uses a thing called os-prober to detect other OSes like Windows and writes menu items to boot them automatically too. If you want to customize it, use something to edit /etc/default/grub.

And then use reboot to reboot.

If it still doesn't work:

  • Try to make sure that your UEFI settings goes like ‘UEFI first’ or ‘UEFI only’. You can also run efibootmgr in your Kali and see what's in the EFI boot order list.

  • You may want to make sure you have a correctly-installed grub in your ESP, in case boot-repair performs badly:

    # run all those commands in this answer as root
    # I think boot-repair has done all those already
    mkdir -p /boot/efi # first create the mount point
    mount -t vfat /dev/sda2 /boot/efi # so we mount the ESP
    grub-install --target=x86_64-efi --bootloader-id=grub --recheck
    
  • Run the grub-install stuff above with an extra --boot-directory=/boot/efi argument. Then use grub-mkconfig -o /boot/efi/grub/grub.cfg, so you get all grub's files in the ESP (this may fill up your ESP).

If grub still can't find them and gives you a command line, try some other distros.

  • thanks a lot but it don't work, i tried all you said, grub-install --boot-directory=/boot/efi give me this: cannot find EFI directory – Jäger Oct 24 '15 at 11:21
  • And efibootmgr command give me this: s9.postimg.org/ec80yjqlb/efibootmgr.png – Jäger Oct 24 '15 at 11:30
  • @Jäger I TOLD YOU TO MOUNT THE EFI DIRECTORY. ALSO, IF IT WAS NOT FOUND, JUST INSTALL IT! – Arthur2e5 Oct 25 '15 at 19:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.