Created
June 28, 2026 05:14
-
-
Save vtvh/c5711221c66009e288968e31ae962bc4 to your computer and use it in GitHub Desktop.
fix grub dualboot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Perfect. Looking at your terminal, we have exactly what we need. | |
| Here is the translation of your partition table: | |
| * **EFI System Partition:** /dev/nvme0n1p1 (This is where the bootloader lives) | |
| * **Linux Filesystem (Root):** /dev/nvme0n1p5 (This is your Parrot OS) | |
| Here are the exact commands you need to run in your terminal, one by one. I have plugged your specific partition numbers in for you. | |
| ### Step 1: Mount the Partitions | |
| 1. Mount your Parrot OS root partition: | |
| ```bash | |
| sudo mount /dev/nvme0n1p5 /mnt | |
| ``` | |
| 2. Ensure the EFI directory exists, then mount your EFI partition: | |
| ```bash | |
| sudo mkdir -p /mnt/boot/efi | |
| sudo mount /dev/nvme0n1p1 /mnt/boot/efi | |
| ``` | |
| ### Step 2: Bind the System Directories | |
| Copy and paste this entire line and press Enter. This links your live USB hardware environment to your installed system: | |
| ```bash | |
| for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done | |
| ``` | |
| ### Step 3: Chroot and Rebuild GRUB | |
| 1. Enter the chroot environment (your terminal prompt will change to indicate you are now "inside" your Parrot OS installation): | |
| ```bash | |
| sudo chroot /mnt | |
| ``` | |
| 2. Reinstall GRUB to the main NVMe drive (note that there is no partition number at the end of this command): | |
| ```bash | |
| grub-install /dev/nvme0n1 | |
| ``` | |
| 3. Update the GRUB configuration to detect both Parrot and Windows: | |
| ```bash | |
| update-grub | |
| ``` | |
| ### Step 4: Clean Up and Reboot | |
| If update-grub finishes without errors and lists your Linux and Windows boot managers, you are good to go! | |
| 1. Exit the chroot environment: | |
| ```bash | |
| exit | |
| ``` | |
| 2. Restart your computer safely: | |
| ```bash | |
| reboot | |
| ``` | |
| Pull out your USB drive when the screen goes black, and your GRUB menu will be right back where it belongs. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.