[Solved][GRUB Problem] grub rescue but the installation done on external drive

I was installing Manjaro on my external hard disk it was a smooth sail until a guy (don't know what to call him **) smashed the live usb.

So tried booting to windows to fix this but Grub rescue menu showed up,

as installation was done on my ext disk I connected it, now this GRUB menu showed up,

I figured where the grub was installed using the ls, but sure not to what to do next.

(don't know what command to give next)

somehow I made the usbstick to work and booted live Manjaro, Please help me to boot windows (I guess I need to do erase grub but since it was installed on external disk I don't know what I should do first), then I'll probably delete and recreate the partition in the ext hard disk. (or if was able to fix the windows Grub menu error I guess I use GParted directly in this live session)

so I found this thread but this requires windows live cd,

is there a way to do this within this session of live manjaro?

ps. I'm booted in Bios-legacy

I found this finally, Using livecd v17.0.1 (and above) as grub to boot OS with broken bootloader

but I have doubt where to search

grub> search.file /etc/manjaro-release root

grub> configfile /boot/grub/grub.cfg

should I connect my hard disk and search this ?

Assumption: Windows and Manjaro are on bios-legacy/msdos disks.

Use the ‘More Complicated Setups’ in the link.
Not the [Simple First Start]
So... to help you along., at that grub prompt (not the grub rescue prompt) and all disks connected.

grub> search.file /etc/manjaro-release

Any output?
Then continue

grub> search.file /etc/manjaro-release root
grub> probe -u $root --set=abc
grub> linux /boot/vmlinuz-4.19-x86_64 root=UUID=$abc rw
grub> initrd /boot/initramfs-4.19-x86_64.img
grub> boot

Use the kernel installed if the kernel is not 4.19

When booted,

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

Check that the internal drive is sda
If internal drive is sdb, sudo grub-install /dev/sdb
If unsure, do both (recommended)
sudo grub-install /dev/sda
sudo grub-install /dev/sdb
sudo update-grub

Note, you must have external drive plugged in to boot windows.
You can restore windows boot to the internal drive (I cannot help, I don't know how) provided you also have the manjaro boot set to the external drive as well. Then you will not need external drive to boot windows. But you will need to use bios set-up to boot from external drive to boot manjaro.



Oh… a note about rebooting when all is fixed.
When you reboot, you may face a black screen (nothing else).
Press ‘esc’ key at that black screen. You will then see the grub menu.
When fixed, let us know if you want that black screen or you want to see the grub menu.
We’ll fix it then.

my main doubt is how does grub installed in my internal drive when I was doing pretty much everything on external hard disk and live usb.

also it seems like I might face the same once I remove the hard disk and try to boot windows in the future.

During installation (bios-legacy), the default is to 'set mbr' to sda, that's the (internal) windows drive.
Unless you specifically change it to external mbr or to its own partition.

As said, you will need to have the external drive plugged in to boot windows.
Unless, as said, you restore windows boot to the internal drive and. .. But you will need to use bios set-up to boot from external drive to boot manjaro..

Simpler to have all in one disk, but not going to argue about it. (but @AgentS might :joy:, don't worry about this. just jabbing my partner here)

Ok I still have doubts, I can boot from bios each time, this somewhat contradicts my main purpose of being portable. (I'll come to this part later)

let me make things clear,
you're saying that I should connect my external hard (one where manjaro partly being installed ) to get to this menu https://imgur.com/a/orDm0Pz


grub> search.file /etc/manjaro-release
grub> search.file /etc/manjaro-release root
grub> probe -u $root --set=abc
grub> linux /boot/vmlinuz-4.19-x86_64 root=UUID=$abc rw
grub> initrd /boot/initramfs-4.19-x86_64.img
grub> boot

but what does grub>boot do? (I cannot boot I guess) the manjaro is kinda corrupted in the hard disk (well luckily I can still access the date and the see the 3 partitions I created)

If it is truly corrupted, then you will need to reinstall of course.
But my impression of your first post (topic that is removed) that your usb (install media?) is smashed after your installation and that you cannot boot. Anyway, that's was my impression.
And you said you can see your partitions. Then and now.

If wrong and you do not have a 'meaningful' OS, then reinstall.
Just try this out. No harm for a simpler remedy.

of course I'm reinstalling by deleting the partitions I created and recreating again (planned to do on windows)

As you see the live usb stick though it's smacked by that douch* in fact I'm currently using that for this live session (right now on Manjaro) so reinstalling isn't a problem once I get my windows back

Okay. But remember your windows boot is kaput.
That usually happens at the tail end of the full installation after manjaro kernels are installed.
Take care.

hitting on the point,
what commands I should give on Grub (not grub rescue)

grub>ls (hd1,msdos2)/boot #found
grub>set root=(hd1,msdos2)
grub>set prefix=(hd1,msdos2)/boot/grub
grub>insmod normal

should I give the above and then the below

grub> search.file /etc/manjaro-release
grub> search.file /etc/manjaro-release root
grub> probe -u $root --set=abc
grub> linux /boot/vmlinuz-4.19-x86_64 root=UUID=$abc rw
grub> initrd /boot/initramfs-4.19-x86_64.img
grub> boot

yes it was almost 90 done when this happened,
also is the above commands sufficient?

No guarantee. But what have you to lose?

nothing, to be honest this is quite fun and I was impressed by walk-through guide in the first place to choose Manjaro.

Okay, you have that douchebag to thank for. :rofl:
Good night. Late here.

kudos to you, I updated the grub.
it's exactly as you said, https://i.imgur.com/agnJBA2.png
only problem is I couldn't find the 2 partition I made (well, it makes sense because of the interruption)

anyways, I'm reinstalling (delete the mbr in windows first),

then how to do this?

When you install grub to some drive, you ALWAYS HAVE TO verify the drive device name. Many ways to do it. For example with

lsblk -f

If you install on external, it should be logical to install grub on the external drive (check first..)
When you boot with external connected, the drive(disk) that boots first depends on BIOS settings.
On BIOS legacy (MBR) disks, each disk has an MBR, which can be (the disk) selected from BIOS main (or Quick) menu to be first in boot order.
If you have external drives booting first, then your internal disk is skipped and only if there is no bootable external drive, BIOS selects/checks the internal one.
Sometimes, even if the external is a simple (no MBR) data drive, may give you an "Error. No OS found").

Test for yourself to see how it works on your system.

1 Like

I already configured the order of booting, as you said sometimes I get no OS found errors but there a direct method in my machine to boot from usb/optical drive without going bios.

If you install on external, it should be logical to install grub on the external drive (check first…)

I'm planning to re-install everything,
now windows won't boot if I didn't connect my ext drive for the grub menu.
being able to go to windows (with my ext connected) , and if I delete the partition I created on the ext hard drive I guess I get will grub rescue should I delete mbr file manually if so where to find that ?

Trying to recall...(installed so many different OS's I cannot remember specifically for manjaro :upside_down_face:)

At installation (use manual, advanced or whatsit called)
To install to another drive mbr, there is a device drop down bar
Or maybe when selecting bootloader, type in device (sda, sdb, sdc)
To install to own partition, at bootloader location choose 'system'

After installation, at terminal (same for all OS's - this I won't forget :laughing:)
sudo grub-install /dev/sdc
sudo grub-install --force /dev/sdc5

Reminder -

mbr is not a partition (it is the first sector for the drive). Normally do not need deleting. We can just override it with another grub-install to it. But if you want to 'manually delete' there is a specific 'dd' command for it (always careful with dd - it is called disk destroyer for a reason).

right at this moment,
if I delete the partition (created on the ext disk) when booted on windows, if I reboot windows I guess I'll get the GRUB- rescue menu (will I?), how to fix this (the above method will not work since there's nothing to boot I have deleted the partition on ext disk)

Forum kindly sponsored by