Created
September 27, 2018 08:36
-
-
Save carlos-jenkins/16fc3c84ad980a9cc6f75843bdf7390f to your computer and use it in GitHub Desktop.
After Windows 10 "Creators" update the fucker removes Grub and fucks your dual boot.
This file contains 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
After Windows 10 "Creators" update the fucker removes Grub and fucks your dual boot. | |
To restore a Ubuntu 16.04 installation with the following characteristics: | |
- EFI mode. | |
- GPT partition table. | |
- One encrypted / partition. | |
- One /boot partition. | |
- One EFI partition. | |
- Dual boot with Windows 10. | |
So, first, download Ubuntu 16.04 ISO image and create a live-USB. Boot to the USB, load the Ubuntu desktop and open a terminal. | |
# Install Grub for EFI | |
sudo apt update | |
sudo apt install grub-efi | |
# Locate and mount the encrypted partition | |
sudo blkid | grep "crypto_LUKS" # -> /dev/sda7 | |
sudo udisksctl unlock -b /dev/sda7 | |
sudo udisksctl mount -b /dev/mapper/... | |
sudo mount --bind /media/root/... /mnt/ | |
# Locate and mount the boot partition | |
sudo blkid | grep "Grub" # -> /dev/sda4 | |
sudo mount /dev/sda4 /mnt/boot | |
# Locate and mount the EFI partition | |
sudo blkid | grep "EFI" # -> /dev/sda2 | |
sudo mount /dev/sda2 /mnt/boot/efi | |
# Mount the virtual file systems | |
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 | |
# Change root | |
sudo chroot /mnt | |
# Install and check | |
grub-install --target=x86_64-efi /dev/sda | |
grub-install --recheck /dev/sda | |
# Exit fake root | |
exit | |
# Unmount volumes and reboot | |
sudo umount /mnt/sys | |
sudo umount /mnt/proc | |
sudo umount /mnt/dev/pts | |
sudo umount /mnt/dev | |
sudo umount /mnt/boot/efi | |
sudo umount /mnt/boot | |
sudo umount /mnt | |
reboot | |
Now, Windows will still boot. Boot in Windows and open Command Prompt as Administrator: | |
bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi | |
Reboot and you should have your fucking Ubuntu back. Fuck you Windows piece of shit. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment