PDA

View Full Version : Kali Linux Grub repair using live CD option does not work



isurumadusanka
2017-12-12, 10:30
I tried to install Kali Linux but it failed due to internet connection issue (https://superuser.com/questions/1276056/is-there-a-way-to-install-kali-linux-without-internet-connection). Then I tried to repair the grub file using Kali Linux Live CD option. I executed all the commands. However, I cannot see the Kali Linux in the OS list.


root@kali:~# sudo mount /dev/sda8 /mnt
root@kali:~# mount --bind /dev /mnt/dev
root@kali:~# mount --bind /proc /mnt/proc
root@kali:~# mount --bind /sys /mnt/sys
root@kali:~# mount /dev/sda+ /mnt/boot/efi
ntfs-3g: Failed to access volume '/dev/sda+': No such file or directory

ntfs-3g 2016.2.22AR.2 integrated FUSE 28 - Third Generation NTFS Driver
Configuration type 7, XATTRS are on, POSIX ACLS are on

Copyright (C) 2005-2007 Yura Pakhuchiy
Copyright (C) 2006-2009 Szabolcs Szakacsits
Copyright (C) 2007-2016 Jean-Pierre Andre
Copyright (C) 2009 Erik Larsson

Usage: ntfs-3g [-o option[,...]] <device|image_file> <mount_point>

Options: ro (read-only mount), windows_names, uid=, gid=,
umask=, fmask=, dmask=, streams_interface=.
Please see the details in the manual (type: man ntfs-3g).

Example: ntfs-3g /dev/sda1 /mnt/windows

News, support and information: http://tuxera.com
root@kali:~# mount /dev/sda8 /mnt/boot/efi
root@kali:~# mount -o remount,rw /dev/sda8 /mnt/boot/efi
root@kali:~# mkdir /mnt/hostrun
root@kali:~# mount --bind /run /mnt/hostrun
root@kali:~# chroot /mnt
root@kali:/# mkdir /run/lvm
root@kali:/# mount --bind /hostrun/lvm /run/lvm
root@kali:/# grub-install /dev/sda
Installing for i386-pc platform.
grub-install: warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible.
grub-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
grub-install: error: will not proceed with blocklists.
root@kali:/# grub-install --force /dev/sda
Installing for i386-pc platform.
grub-install: warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible.
grub-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
Installation finished. No error reported.
root@kali:/# update-grub
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-4.13.0-kali1-amd64
Found initrd image: /boot/initrd.img-4.13.0-kali1-amd64
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 8 on /dev/sda4
Found Windows Recovery Environment on /dev/sda7
done
root@kali:/# exit
exit
root@kali:~# unmount /mnt/dev/pts
bash: unmount: command not found
root@kali:~# umount /mnt/dev/pts
umount: /mnt/dev/pts: not mounted.
root@kali:~# umount /mnt/dev
root@kali:~# umount /mnt/proc
root@kali:~# umount /mnt/sys
root@kali:~# umount /mnt
umount: /mnt: target is busy.
root@kali:~# umount -f /mnt
umount: /mnt: target is busy.
root@kali:~# umount -l /mnt
root@kali:~# umount -f /mnt
umount: /mnt: not mounted.
root@kali:~# ^C
root@kali:~#

Is there something I'm doing wrong here?

_defalt
2017-12-12, 16:43
/dev/sda+ is your EFI partition. Fill the number in place of + just like you filled it for /dev/sda* as your kali filesystem.

Look in the output of fdisk -l which partition is EFI.

Follow this thread: https://forums.kali.org/showthread.php?36601-UEFI-How-to-repair-kali-linux-grub-dual-boot-with-Windows-10