0

I was doing something in my windows 10 system. Then I accidently deleted all of the files from boot folder. Including the grub folder and all of the vmlinuz stuff. Nothing is left there. So now whenever I try to boot from a pendrive I get the grub command line. I didn't see grub rescue. I tried booting with both kali Linux and parrot OS pendrive. None of it worked. It still shows grub command line. But I can still boot into my windows 10 system. When I type ls command in the grub command line I can see all of the partitions including the pendrive.

like (hd0,gpt1),(hd0,gpt2)

I can see the files inside my pendrive. I can also see the system partition where the boot and EFI and also startup.nsh file resides. There are two folders in the EFI folder. /boot and /microsoft. Please help me fix my grub.

My system configurations -

  1. windows 10 21h1
  2. partition style GPT
  3. bios mode UEFI
  4. sandisk cruzer blade 8gb pendriveenter image description here
2
  • It appers you're not booting from the pendrive. Try configuring the BIOS to boot off the pendri9ve. Actaully, you should be able to hit a F10 key on some machnes and select your boot device. Aug 12, 2021 at 1:24
  • Who told i am not booting from the pendrive. I am choosing it from the boot menu and then booting from it. I got the boot menu with f12 key Aug 12, 2021 at 2:05

1 Answer 1

2

Booting from a pendrive should always be possible (even when you format the internal harddrive, or even physically remove it). So if you get a grub-commandline when booting from a usb stick, there's something else going wrong there (that has nothing to do with your accidental deletion of the linux boot directory.)

As for the recovery of your installed linux OS: It might help if you provide some more concrete info about which linux distro you have installed. Normally the procedure to recover your installation goes as follows:

  • boot from live usb
  • mount your installed linux distro to a mountpoint
  • chroot into the mountpoint
  • with your distros package manager, reinstall the files you accidentally deleted (the linux kernel package and grub package for your distro will probably get you there).
  • run grub-install (or your distros equivalent)
  • generate a grub.cfg file

Then exit the chroot and reboot. The exact commands you need to run depend on your distro.

4
  • I don't have linux installed. I have windows installed. I was trying to install kali or parrot. Both didn't work Aug 12, 2021 at 2:06
  • I am able to boot from a live usb now. I was formatting my usb as gpt as my hdd was in gpt. Now i tried mbr and i successfully booted. What to do now ? Aug 12, 2021 at 3:32
  • which linux distro do you have installed (where the boot directory is missing from)? Aug 12, 2021 at 5:14
  • It sounds like the security options in the BIOS are incorrect - otherwise clean installs on the USB for kali or parrot should work with an EFI boot. Also, it's not clear what it is you're trying to accomplish. If it's just booting off a live USB with kali, then based on your comment you;re done. Aug 14, 2021 at 19:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .