LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Grub Rescue Error (https://www.linuxquestions.org/questions/linux-newbie-8/grub-rescue-error-4175620385/)

Gwinbush 12-27-2017 10:44 AM

Grub Rescue Error
 
Hey, so I k ow this is a common error but nothing I found online works for me. Basically I had a Nitrux dualboot with my Toshiba Satellite p55w running Windows 10 and tried to remove Linux. I ended up removing it incorrectly (I'm a dumbass) and now have a grub rescue error: no such partition. I am unable to boot from a USB; if I hit f2 on boot, the screen changes for a second with an underscore then goes to the grub rescue terminal. Also, when I type ls (hd0,gpt1) for each drive, they all say unknown filesystem. Can anyone help me solve this issue? Thanks! Here's a picture of the grub rescue screen https://i.imgur.com/PKMUjtP.jpg

Ztcoracat 12-27-2017 03:22 PM

Hi & Welcome to LQ-

How exactly did you remove Linux?
Did you delete the partitions with gparted?

Basically you need to do is find out what partition has the boot/grub on it.

You will have to go through each hdo, gpt to find out.

Here's an example of what I do at the grub rescue prompt.

*** *** *** *** *** *** *** *** ***

At the grub rescue prompt type >ls

You will get something like this listing the hard drives and partitions.
Hdo,msdos2 hdo,msdos1 and so fourth and so on.

Use the ls cmd to find out which one is an ext2/ext3 partition.
For example:

>ls hd1,msdos1 is ext2
>hd2,msdos2 fs is unknown

So you can try to boot into hd1,msdos1 with this:

>set prefix=(hd1,msdos1)/boot/grub

>insmod normal hit enter

>normal hit enter

If that doesn’t give you the Grub Menu try all the others that ls listed.

If that doesn’t work try:
>set prefix=(hd1,msdos1)/boot/grub
> insmod normal (hit Enter)
>normal (hit Enter)

Once you have Grub and can boot into an os install grub with:

#grub-install /dev/sda in the konsole and reboot. If you still have the grub rescue prompt try it with /dev/sdb or /dev/sdc.
That is if you have other drives that would be labeled sdb or sdc otherwise you should only have sda.

I'm not good with gpt so I won't be able to help with that:-Sorry-

Gwinbush 12-27-2017 03:30 PM

Hi,
Thank you for the detailed response. I uninstalled it by deleting the partition in the windows disk utility program and then expanded the windows partition. When I type ls (hd0,gpt1), it says "filesystem is unknown" no matter which one I use

Ztcoracat 12-27-2017 04:58 PM

Quote:

Originally Posted by Gwinbush (Post 5798522)
Hi,
Thank you for the detailed response. I uninstalled it by deleting the partition in the windows disk utility program and then expanded the windows partition. When I type ls (hd0,gpt1), it says "filesystem is unknown" no matter which one I use

Ok-

Use your Windows 10 disk to install the Windows Boot Manager. In which I don't know how you'd do that I haven't touched Windows in 6 years.
<OR> you can shrink your Windows partition and make room for a fresh installation of Linux alongside Windows 10 in order to get the grub bootloader back. During the Linux install you would have to use the partition manager to shrink your Windows 10 partition. I'm not sure if g-parted Live would work to resize your Windows partition.

I'm sorry Gwinbush I am not good with Windows anymore.

Gwinbush 12-27-2017 05:05 PM

I tried making a Windows recovery drive on a usb stick but my computer won't let me boot to usb. All I can do is use the grub rescue screen.

Ztcoracat 12-27-2017 05:41 PM

https://answers.microsoft.com/en-us/...9e00ebb?auth=1

https://www.boyans.net/RepairWindows...dows-boot.html

Ztcoracat 12-27-2017 05:48 PM

If your computer won't let you boot to usb it's most likely because you don't have that as the first boot option in the BIOS.

I've been there where all I could do is use the grub rescue screen.

When I was stuck there I placed a Live Linux CD in the cdrom drive shut down the pc by holding down the power button until the pc shut down. Than 30 seconds later started up the machine and let the Linux CD/DVD boot up and did a fresh install alongside of Windows.

yancek 12-27-2017 07:58 PM

You should be able to boot from a grub prompt which looks like: grub> by entering a series of commands consecutively. I've never used grub rescue but the same steps will probably work from grub rescue. You will first need to determine on which partition your EFI files are located since your image in the initial post shows GPT and windows only uses EFI with GPT. You will also need the UUID of that partition, should be either sda1 or sda2 which in Grub would be gpt1 or gpt2. You can get this info by booting any Linux Live CD and running the blkid command to get the UUID and to find which partition is the EFI, do the following from a terminal:

Code:

mkdir /mnt/sda1 /mnt/sda2
Then mount each partition:
Code:

mount /dev/sda1 /mnt/sda1
Repeat the command for sda2 and then navigate to the /mnt/sda1 and then /mnt/sda2 directories to see if it has EFI files/folders. It should have a Microsoft folder. When you get that info, post back.

ondoho 12-28-2017 03:11 AM

Quote:

Originally Posted by Ztcoracat (Post 5798558)
<OR> you can shrink your Windows partition and make room for a fresh installation of Linux alongside Windows 10 in order to get the grub bootloader back.

this is actually a simple & clever alternative.
as little as 10GB would be enough (sometimes even 5, depending on distro). just to get a nice bootloader, and who knows maybe you'll have some use for it at some point.

Ztcoracat 12-28-2017 10:40 AM

Quote:

Originally Posted by ondoho (Post 5798693)
this is actually a simple & clever alternative.
as little as 10GB would be enough (sometimes even 5, depending on distro). just to get a nice bootloader, and who knows maybe you'll have some use for it at some point.

Worked for me.

Gwinbush 12-28-2017 10:43 AM

Quote:

<OR> you can shrink your Windows partition and make room for a fresh installation of Linux alongside Windows 10 in order to get the grub bootloader back.
Is this possible to do from the grub rescue screen? Because as I said before, this is all I have access to... I can't boot any OS even from a USB.

Ztcoracat 12-28-2017 10:56 AM

Quote:

Originally Posted by Gwinbush (Post 5798818)
Is this possible to do from the grub rescue screen? Because as I said before, this is all I have access to... I can't boot any OS even from a USB.

I don't think so.

The only thing you can do is place a Live Linux CD in your cdrom drive and let it boot up.
Unless you have a Windows CD or USB.

If you can't do that than press the F2 through F12 key to get into the BIOS to change the boot order to USB and reboot.

Gwinbush 12-28-2017 10:59 AM

I don't have a disk drive and none of the function keys let me access the bios. I just ordered a new ssd for my laptop and am planning on doing a fresh install of windows on it. In the future, how should I delete Linux from a dual boot?

Ztcoracat 12-28-2017 10:59 AM

Press the F1 through F12 key while the machine is booting up to get into the BIOS.

Gwinbush 12-28-2017 11:01 AM

Yeah, hitting f2 usually get me to bios, but now when I press it, it switches to a black screen with a blinking underscore for a second then goes to the grub rescue screen...


All times are GMT -5. The time now is 10:04 AM.