LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Stuck on 'grub rescue' prompt. Partition not recognised. (https://www.linuxquestions.org/questions/linux-newbie-8/stuck-on-grub-rescue-prompt-partition-not-recognised-4175572622/)

Higgsboson 02-18-2016 04:32 PM

Stuck on 'grub rescue' prompt. Partition not recognised.
 
I've just created a multi-boot system with separate OSs over two hard disks. However, just after I made all the necessary tweaks to get each OS to work properly, I suddenly got the grub rescue prompt on reboot!

The last thing I did was to use gparted to add a label to sdb2 while I was on sdb4 (i.e. the same disk). The sdb2 OS was not mounted.

The grub rescue prompt has the error message 'no such partition' before it. Is there any command I can use to find out why suddenly grub isn't working?

I'm using a live usb but it doesn't recognise the 'update-grub' cmd. After reading another thread on grub rescue, I'm wondering if changing the label of a partition changes its UUID. But I'm not sure what to do now.

hydrurga 02-18-2016 05:30 PM

Quote:

Originally Posted by Higgsboson (Post 5502499)
I've just created a multi-boot system with separate OSs over two hard disks. However, just after I made all the necessary tweaks to get each OS to work properly, I suddenly got the grub rescue prompt on reboot!

The last thing I did was to use gparted to add a label to sdb2 while I was on sdb4 (i.e. the same disk). The sdb2 OS was not mounted.

The grub rescue prompt has the error message 'no such partition' before it. Is there any command I can use to find out why suddenly grub isn't working?

I'm using a live usb but it doesn't recognise the 'update-grub' cmd. After reading another thread on grub rescue, I'm wondering if changing the label of a partition changes its UUID. But I'm not sure what to do now.

Changing a partition's label shouldn't change its UUID.

Personally I would throw Boot Repair Disk (https://sourceforge.net/projects/boot-repair-cd/) at it in case any mucking around worsens the situation. It means you probably won't know what caused the problem but hopefully will resolve it.

Higgsboson 02-19-2016 07:43 AM

Quote:

Originally Posted by hydrurga (Post 5502524)
Changing a partition's label shouldn't change its UUID.

Personally I would throw Boot Repair Disk (https://sourceforge.net/projects/boot-repair-cd/) at it in case any mucking around worsens the situation. It means you probably won't know what caused the problem but hopefully will resolve it.

Thank you. The problem is my dvd drive isn't working so I can't write to a cd.
I found out about the 'Boot-Repair' pgm which can be installed onto a working OS but the command is exclusively for Ubuntu usershttps://help.ubuntu.com/community/Boot-Repair. It's a pity because it looks like a useful tool.

I then looked up a tutorial on how to use the grub-rescue command line for fixes, but it seemed a bit complicated https://help.ubuntu.com/community/Grub2/Troubleshooting. But it was still useful in showing how the problem occurred.

When creating new partitions and installing new OSs, update-grub needs to be done each time so it can see the new changes.
To fix the problem, I plugged in my live-usb and on the login screen I selected the launcher to install a new OS. Once a new OS was installed on the hard disk it took control of the MBR and ran update-grub. I was then able to open up grub and access all my OSs. Then I used gparted to re-format and delete the new OS I created via the live-usb. After that, I ran
Code:

grub-install /dev/sda
update-grub

This is because despite having newly installed OSs, I still wanted grub booting from sda1. So I think I need to keep using this command after a new install to return control of the MBR to sda1.
Anyway, this fixed the problem (so far).

hydrurga 02-19-2016 08:06 AM

Ok, glad you sorted the problem using, as the French would say, "Système D". :-)

Just for info, Boot Repair Disk can be installed onto a bootable USB stick using e.g. Rufus or UNetbootin. I personally have it on a USB stick along with other useful bootable ISOs, courtesy of YUMI.


All times are GMT -5. The time now is 01:49 PM.