Bootloader installation error

Recently I ahve tried to install manjaro after failing to install arch and wiping my drive in the process. Around 90% into the installation I got an error stating “the installation command
grub-install --target=i386-pc --recheck --force/dev/sda
Returned error code 1”. It maybe because my os is installed on /dev/sdb, as my ssd is the second disk in my pc.
EDIT: i have succesfully installed manjaro. had to change an option in the setting for it to work.

so to make things clear its the manjaro installer that throws this error, and not your separate invocation of this command. is it a EFI system?

the bootloader installation should happen in whichever device containing the EFI partition, and is usually handled by the installer provided both drives were visible to it at the time installation.

Then show fdisk -l.

Yes it the manjaro installer that executed the command. It is a EFI system. I am dual-booting windows(for games etc) and the windows EFI partition is on /dev/sdb which is my SSD that I boot from. (sda is my 1TB HDD).

to start with the command seems to be wrong;

  1. “–target=i386-pc” is meant to install a 32-bit bootoader
  2. if EFI partition is on /dev/sdb, then it it should be installed there

besides normally (atleast way i’ve used it), the EFI is expected to be mounted on /boot/efi/ and switch --efi-directory=/boot/efi is used to direct it there.

i think to get to the bottom of it, get output of commands;

sudo lsblk -fs
sudo fdisk -l