Kali linux grub error

GRUB-EFI installation fails while installing Kali Linux in external hard disk

I was trying to install Kali Linux from a live USB to an 1TB external hard disk. At first I was unable to boot the live USB with my H2O Insyde BIOS. Then I converted my pen drive partition table to GPT and created a 500MB FAT32 partition labeled EFI and copied BOOTX64.efi and grubx64.efi to the directory boot inside my EFI partition. I created the live USB using a Ubuntu in a VirtualBox (when I created with unetbootin and universal installer, it doesn’t boot.) and then only I succeeded to boot the live USB. Then I tried to install Kali Linux in my external hard disk. the whole installation procedure succeeds with both guided partition and manual partition, but GRUB installation fails. I referred online forums and wikis to fix that, but nothing works. I tried to install GRUB-EFI manually from terminal using the live USB. I followed wiki.archlinux.org and How to reinstall GRUB2 EFI?, but both have failed. for the 1st link, I’m succeeding but same unable to boot to Kali Linux. For the second, when I try to install grub-efi package after mounting the partitions and doing chroot , it asks to insert the Kali Linux CD/DVD in cdrom0 partition. As I’m installing from a live USB, I don’t have it in CD/DVD. I tried to do the same process what I’ve followed for my live USB, creating a EFI FAT32 partition in the external hard disk and copying those 2 files, but no success. I asked a question here before. Got suggestion to edit the hard coded UEFI-BIOS. but I want to install the whole Linux OS with boot loader and EFI partition, all in my external hard disk. and set the 1st boot device as external device. So when my hard disk is plugged in, it’ll boot from Linux else from Windows 7. As I’ve succeeded in booting the live USB, I guess, there is no problem with the hard coded UEFI-BIOS. I tried the same process with Ubuntu by creating a Live USB, but the installation doesn’t proceeds after it asks to select the network during installation. Though I select to not use the network or use the network, it doesn’t proceed to the partitioning. I got another suggestion to install the Linux using BIOS in legacy mode and then install the GRUB-EFI to convert it to boot using UEFI. But with my GPT partition, it doesn’t boot in Legacy mode and with my MBR partition it doesn’t boot in UEFI. So when I’ll install using Legacy mode, I can’t be able to boot in UEFI without cleaning the installation and converting the disk to GPT partition. So it’s of no use. Can anybody please help? my hard disk is 1TB Seagate. (converted to GPT partition.)

Читайте также:  Беспроводная мышь для linux

Second paragraph «but GRUB installation fails», what does this mean? What errors do you get? Also first paragraph, «EFI partition inside a directory boot», I hope you mean «EFI directory inside a boot partition». The exact commands you’ve run with their exact output is always best.

@Patrick the error is as i mentioned. it shows an error that GRUB installation in to hard disk failed. and 1st paragraph means a directory boot inside EFI partition.

Источник

О том о сем бложик

TL;DR: Бездумный distupgrade на Linux — это плохо. А ещё это может поломать grub и система не сможет загрузиться. На помощь в этом случае придет LiveCD, где нужно будет выполнить несколько простых команд.

И вновь приветствую всех в своем блоге.

Знаете, что может быть лучше отдыха в субботу? Эксперименты с ноутбуком! А знаете чем у меня всегда заканчиваются эксперименты? Конечно же проблемами с загрузкой!

Начну с того, что на ноутбуке у меня реализован дуалбут между Windows 10 и Kali Linux. На Kali Linux я захожу раз в несколько месяцев, и за это время успевает выйти достаточно много обновленных версий для установленных пакетов.

А знаете что я люблю делать еще больше, чем экспериментировать? Обновлять! Ведь это так здорово, когда после обновления ты смотришь как изменился функционал или внешний вид приложения!

Именно поэтому каждый мой заход на Kali Linux начинается с выполнения двух команд:

sudo apt-get update
sudo apt-get dist-upgrade

И вот, вновь выполнив уже привычные команды, я перезагрузил ноутбук и столкнулся с таким вот неприятным сообщением:

error: symbol ‘grub_file_filters’ not found.
Entering rescue mode…
grub rescue>

фотография с ошибкой с grub, которая описана выше

К счастью, у меня была заранее записанная флэшка с установщиком Kali Linux, который можно загрузить и как Live систему. так что оставалось лишь найти в гугле подходящие команды для восстановления. Увы, сейчас я уже не найду ссылок, но зато есть четкая последовательность команд, которая помогла мне с восстановлением загрузчика.

В первую очередь, загружаемся с линуксового LiveCD/LiveUSB (желательно конечно с Kali Linux) и запускаем терминал.

Дальше, нужно найти раздел с установленной Kali Linux на компьютере. Для этого я поочередно монтировал sda1,sda2,sdb1,sdb2 в /mnt, и каждый раз через ls смотрел его содержимое. Если там будет иерархия с папками /dev, /root, /var и т.п., то это нужный раздел. В моём случае, это был sda1.

Как только раздел найден, остается лишь выполнить следующие команды (только не забудьте заменить sda1 и sda на ваш раздел соответственно).

sudo mount /dev/sda1 /mnt
sudo mount —rbind /dev /mnt/dev
sudo mount —rbind /proc /mnt/proc
sudo mount —rbind /sys /mnt/sys
sudo chroot /mnt
grub-install /dev/sda
update-grub

После чего, можно делать reboot, и радоваться починенной загрузке двух систем!

Вот не очень качественные фотографии, где я вводил данные команды. Опечатки в процессе ввода прилагаются.

фотография с первой частью введенных команд

фотография со второй частью введенных команд

UPD: Данный способ помог мне и с этой ошибкой:

error: symbol ‘grub_calloc’ not found.
grub rescue>

Источник

Solved -Kali Linux Grub Error Problem with Windows 10 dual boot Problem

Hello Kali Linux Lovers, today we talk about a basic problem which faced by many users after installing Kali Linux on their systems. As you know Kali Linux is an Advanced Penetration Testing Operating system which used for Penetration Testing, White hat Hacking and advanced level network security assessments. Here we talk about a Grub error, In this case, After successful installation of Kali Linux Grub bootloader won’t show on startup, In short, there is no option to choose Kali Linux or Windows 10 during startup. The system directly boot with Windows 10 even we already installed Kali Linux on the system. Means GRUB loader not shown on system start. So here we tell you how to solve this problem and get back to normal grub boot loaded where you enjoy dual boot with Windows 10.

Читайте также:  Tp link tl wn722n v2 драйвера linux

Kali Linux installation:
You need to download official Kali Linux ISO and burn into on a DVD or make a bootable Pendrive. You can also Buy Kali Linux DVD from www.linuxpurchase.com if you are unable to download large files or don’t have a DVD writer or Pendrive.
Now insert your DVD or Pendrive in your system/laptop and shut down your system/laptop. Now start your system/laptop and go to boot order section via F10/F12(It depends on your system model) and choose boot device if you have Kali Linux DVD then choose from DVD OR you have PenDrive then choose boot from USB. Now system boot via Kali Linux. Choose graphical install and then follow on screen instructions.
Once Kali installs then it asks for GRUB installation then please also install grub boot loader in your HDD. after successfully grub installed system asks to remove external media and shut down your system.

GRUB loader not show in Dual boot Windows 10 Problem Solution:

Here we talk about Grub bootloader visibility in with Windows 10. Even after successfully installation of grub boot loader it not shows during boot and windows 10 directly boot in the system. So here we talk about a solution for this grub boot loader problem which not show Kali Linux option during boot. These solutions work for all Kali Linux versions no matter which is Kali Linux 2016.1 or Kali Linux 2017.1, Kali Linux 2.0 etc.

This grub loader happens because of Partition Bootable flag option. During Kali Linux option you create a separate partition for your Kali Linux installation. While creating this partition system asks for Bootable Flag option which is turned off by default. You need to ON this option in order to show grub loader on startup in your system.

Bootable Flag option - Kali Linux Installation process

So the first solution of this grub not showing with windows problem is reinstall kale and during partition, choose must set to Bootable flag ON and install then you won’t face this bootloader problem again in your system. We know Reinstall a panic solution for you even no one wants to reinstall Kali for this minor problem. so don’t worry about it. We have another solution for you.

Next second solution for this grub problem is you need to boot your system/laptop via Kali Linux live mode and perform some commands on terminal to solve this grub not showing problem with windows dual boot.

Читайте также:  Удаление пользователя mysql linux

So please boot from your DVD/Pendrive and choose the live mode. Once system start then open terminal via pressing CTRL+ALT+T then type below commands

# fdisk -l (First we have to find out the partition Kali is installed on (: /dev/sda1, /dev/sda2, etc) ) # mount /dev/sda1 /mnt (Mount your kali partition) # mount --bind /dev /mnt/dev (You will need to mount the /dev directory into mnt) # chroot /mnt (change the root to the mounted partition to be able to run the command from the mounted partition) # grub-install --recheck /dev/sda (install grub in the HDD sda, not sda1, sda2, etc. just sda.

After these commands restart your system. now you see a grub boot menu appear on the screen now you choose which OS you want to boot like Kali Linux or Windows 10.

If after above commands only Kali Linux show in your bootloader then please open terminal and type below commands

Now Reboot your system. Both OS now available in GRUB bootloader.

This solution worked on all Laptop models no matter which is Lenovo, HP, Asus, Acer, Sony, Samsung etc. This is worked in both windows 10 and windows 8/8.1 operatind system.

Источник

grub-install: error: cannot find efi directory

I recently dual-boot kali-linux-2016.2-amd64 with windows 10. After sometime I updated my windows 10 and due to this windows might have removed grub from the boot menu. Now I can’t boot kali-linux from the boot menu because it doesn’t appear there anymore. So I decided to re-install grub by booting into Live-kali(Persistent) from USB. I entered the following command in the terminal:

fdisk -l sudo mount /dev/sda* /mnt sudo mount --bind /dev /mnt/dev sudo mount --bind /proc /mnt/proc sudo mount --bind /sys /mnt/sys sudo chroot /mnt grub-install /dev/sda 
sudo umount /mnt/dev sudo umount /mnt/proc sudo umount /mnt/sys sudo umount /mnt 

enter image description here

After the 7th command-line I got this error:

1 Answer 1

It’s very hard to help you because you don’t know basic commands. but I’ll try okay?

  • With fdisk -l you list your current partition, like your image.
  • With your image I can see that you have /dev/sda1 as EFI System, /dev/sda10 as Linux filesystem and /dev/sda11 as Linux swap. Keep this information.
  • When you boot with a live cd you must do a chroot for access your system, in other words, an operation that changes the apparent root directory for the current running process and its children. Lets go:
  • mount your system at /mnt. Remember? Linux filesystem? Yes. It’s /dev/sda10. So do command:

sudo mount —bind /dev /mnt/dev
sudo mount —bind /dev/pts /mnt/dev/pts
sudo mount —bind /proc /mnt/proc
sudo mount —bind /sys /mnt/sys

If the /mnt/boot folder is empty, so you need mount the /boot partition. The only other possibly usable partition on your case is /dev/sda1, so will be it. Mount at /mnt/boot.

Источник

Оцените статью
Adblock
detector