Cannot find a GRUB drive for /dev/sda2 (grub-install error)

Hello folks,

I’m here with a problem while installing Arch in my old laptop (2006 BIOS, with MBR), which just arose while installing GRUB.

This is how it goes:

[root@archiso /]# grub-install /dev/sda
Installing for i386-pc platform.
grub-install: error: cannot find a GRUB drive for /dev/sda2.  Check your device.map.

I do not know what could be the fix for this error… I’ve never faced this too!
Usually GRUB would report that no errors have been found, and this is the first time I’m finding an error.

I searched for /boot/grub/device.map (according to an askubuntu topic), and it’s just not there.

What should I actually do to overcome this, folks? What is the error actually?

P.S. I used Ventoy (GPT) this time

1 Like

@Pranav
Is this laptop 32bit? Arch dropped 32 bit support awhile back.

1 Like

When did that happen brother?

And my laptop is fortunately 64 bit… I have seen 64 bit packages executing

It’s around 12 years old, and previous installations were successful (except the last one which had locale problems)

1 Like

@Pranav
Hi,
The message seems to indicate that grub is looking for an EFI system partition on /dev/sda2.
That would mean it is treating it as a GPT disk, not an MBR.

Regards
Neville

3 Likes

@nevj
Very possible!!!

@4dandl4 ,
Great. So can we suggest to @Pranav that he do the install again and when he comes to the grub section, make sure he specifies MBR?
Regards
Neville

I installed ventoy gpt for a purpose, but it booted through BIOS mode (that’s what the ventoy screen said).

Is it possible to install mbr grub via gpt? How do I do it?

@Pranav
If /dev/sda2 is root then the mount point is mount /dev/sda2 /mnt.

@Pranav ,
Ventoy is for making bootable usb drives.
I thought you were trying to install Linux on a hard drive?
A hard drive has to be either MBR or GPT. If it is GPT it has to have an EFI boot partition, in addition to the partitions needed for Linux, and part of grub is written in the EFI partition. If it is MBR grub is written in the master boot record at the start of the disk. It cant be both.

If you are getting the install material from a usb drive, that is fine, and you should be able to use Ventoy there OK. But Ventoy should not interfere with the hard disk. You have to setup the hard disk yourself.

Neville

2 Likes

Yes brother, I am installing it in a hard drive, an MBR disk to be exact.

So, the output cannot find a GRUB drive for /dev/sda2 means that the EFI partition is missing?

With what arguments should I install GRUB from an EFI device (i.e. the usb containing ventoy) to the MBR hard disk?

I did grub-install /dev/sda with no arguments, should I specify something else along with this?

UPDATE:

I reformatted the pen-drive and used dd to flash the ISO to it.

Now I tried installing GRUB, and it just worked (after using --force since it generated a warning)

Is there a way to install GRUB from an EFI pendrive (i.e. the USB) to an MBR disk? How should I do that, with what arguments?

@Pranav ,
Thank you, I understand the situation now.
If you are doing grub-install that means you have finished the install and are in the booted linux. I do not know how to specify MBR from there. I know you can specify MBR if you install grub while in the install script (at least you can in a Debian install, I have never installed Arch, so I cant be sure)

When you reformatted the pendrive and used dd that got rid of ventoy and it worked. So that proved that it was the GPT pendrive that was causing grub install to look for an EFI partition on /sda

So we know what caused the problem. Sorry I do not have a fix.
Maybe someone else knows

Regards
Neville

@Pranav
To install Arch burn the Arch ISO to a CD. Boot the
laptop with the CD and install Arch from the CD. You will need 2 to 3
partitions. /dev/xxx .ext4 about 20G mounted at /mnt, /mnt is root make bootable, mkdir
/mnt/home /dev/xxx .ext4, if needed, mounted at /mnt/home, mkswap /dev/xxx
mounted with swapon /dev/xxx.
Follow the Arch install guide, use pacman -S grub, to install grub, use grub-install
to install to the HDD MBR, use grub-mkconfig -o /boot/grub/grub.cfg
to configure the boot loader use nano /etc/default/grub to edit grub.
Be sure HDD is in dos/mbr mode.

1 Like