0

I have Windows 10 and Ubuntu on my PC. After I updated Windows I received this message:

Error: unknown filesystem
grub rescue>

I entered these commands:

set root=(hd0,6)
set prefix=(hd0,6)/boot/grub
insmod normal
normal

It worked fine but when I restarted the PC the same error message came up, so I deleted the partitions with Ubuntu. I restarted the PC and again the same error. Now when I try to put the commands from above I receive unknown filesystem.

What do I need to do to avoid this grub rescue?


I tried to run the commands given in the answer in a root shell but when I try to run the first command mount -t ext4 /dev/sda6 /mnt/ubuntu it returns

mount: /mnt/ubuntu: mount point does not exist

Maybe I haven't selected the correct partition so here I give you a link to check all my partitions and decide which one is the partition with Ubuntu:

fdisk output

Zanna
  • 70,465
Capatina Stefan
  • 1
  • 1
  • 1
  • 3

1 Answers1

0

You'd need a live disk running Ubuntu or any Linux variant.

After such, follow the commands here to mount the necessary drives and chroot into the directory.

For the CHROOT PROCESS

See this article

I've highlighted the commands you can use in the window below:

sudo mount -t ext4 /dev/sda6 /mnt/ubuntu

Confirm that sda6 is your current root partition.

sudo mount /dev/sda1 /mnt/ubuntu/boot

Check if this drive is your windows boot partition

Then follow up and mount the other required filesystems

sudo mount -t proc none /mnt/ubuntu/proc
sudo mount -o bind /dev /mnt/ubuntu/dev
sudo mount -o bind /sys /mnt/ubuntu/sys

Follow up to chroot here using this:

chroot /mnt/ubuntu /bin/bash

You should get into another window screen with a terminal window

COMMANDS TO FIX FILESYSTEM MAPPINGS

Run the following to fix your issue

sudo grub-install /dev/sda
sudo update-grub

That should fix your GRUB issues for you automatically with the default filesystems containing your various operating systems.

Zanna
  • 70,465
  • But if I want to get rid of Ubuntu and run windows only is there any easier method? – Capatina Stefan Nov 06 '18 at 10:34
  • You'd have to delete the Ubuntu partition and then restore the windows grub. Restoring it is optional as you could always continue with the linux one, if you're interested tho, it requires you have a windows bootable disk to get to the windows recovery option and reset your BCD configuration. More details here about how to do that after deleting the partition here: https://www.lifewire.com/how-to-rebuild-the-bcd-in-windows-2624508 – Bakare Emmanuel Nov 06 '18 at 14:56
  • What is the command for writing on this site “program language”? – Capatina Stefan Nov 07 '18 at 10:17
  • Sorry, could you expatiate on what you mean ---- "by writing on the site 'program language' " please – Bakare Emmanuel Nov 07 '18 at 13:05
  • How can i write with that font with grey background – Capatina Stefan Nov 07 '18 at 14:19
  • I run Ubuntu on live stick and I put your commands in terminal. Please check the image below. https://i.stack.imgur.com/WkBtM.jpg – Capatina Stefan Nov 07 '18 at 14:21
  • You should run those guys in a root shell.

    sudo bash

    And also copy them in one command at a type please.

    For the grey background, you can do that by using "" for formatting.

    – Bakare Emmanuel Nov 07 '18 at 14:43