使用 Live CD 选项的 Kali Linux Grub 修复不起作用

使用 Live CD 选项的 Kali Linux Grub 修复不起作用

我尝试安装 Kali Linux,但由于以下原因失败互联网连接问题。然后我尝试使用 Kali Linux Live CD 选项修复 grub 文件。我执行了所有命令。但是,我在操作系统列表中看不到 Kali Linux。

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:~# 

我做错什么了吗?

答案1

如果安装失败,为什么要搜索它...安装失败通常会导致更改回滚......

如果安装成功但未出现在 grub 中,则:

使用 boot-repair 修复 grub

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

相关内容