#Grub fails to install during chroot

50 messages · Page 1 of 1 (latest)

wooden sluice
#

ai answer

The error you're encountering is "grub-install: error: cannot find a GRUB drive for /dev/sdc1. Check your device.map." This error typically occurs when the EFI System Partition (ESP) is not properly mounted or specified during the installation process. Here are some steps you can take to resolve the issue:

Check if the EFI system is mounted: Run the command mount | grep /boot/efi to see if the EFI system is mounted at /boot/efi. If it is not, try running mount | grep /dev/[efi device] to check if it is mounted elsewhere. If it is not mounted, you can mount it manually using the command mount /dev/[efi device] /mnt.

Specify the EFI directory: When running grub-install, you need to specify the EFI directory using the --efi-directory flag. If the EFI system is mounted at /boot/efi, you can run grub-install --efi-directory=/boot/efi. If it is mounted elsewhere, use the appropriate directory. For example, if it is mounted at /mnt, you would run grub-install --efi-directory=/mnt.

Update the GRUB configuration: After running grub-install, it is recommended to update the GRUB configuration using grub-mkconfig. Run grub-mkconfig -o /boot/grub/grub.cfg to update the configuration file.
proper lava
#

so im confused

#

because /dev/sdc1 is located in /boot for me

#

not /boot/efi

#

do I need to unmount /boot, make a directory called efi in /boot and then mount there..?

wooden sluice
#

Just a convention

proper lava
#

okay

wooden sluice
#

Arch linux doesn't care if esp is /boot or /boot/efi

But that isn't the case for other distros ( mainly debian and its deivatives).

proper lava
#

yeah im on arch so im fine

#

yeah but my device is 1000% mounted and I have specified the efi directory

wooden sluice
proper lava
#

already saw that, grub-mkdevicemap doesn't exist

#

hang on, just saw something interesting

#

okay no this is fine, correct?

wooden sluice
proper lava
#

for some reason, it makes a folder in /boot called grub but when I check the folder, nothing is in there

wooden sluice
#

wipe the disk and do the shit again

proper lava
#

bro...

#

fr?

wooden sluice
proper lava
#

honestly im too lazy to do that

wooden sluice
lucid agate
#

findmnt /boot/efi?

proper lava
#

seems fine, right?

lucid agate
#

and fdisk -l /dev/sdc?

proper lava
lucid agate
#

The type is not right, it should be EFI System

proper lava
#

I just cghanged it to Linux Filesystem

lucid agate
proper lava
#

it was EFI system beforehand

proper lava
#

Just changed it back to EFI System tho

lucid agate
#

It should also have the boot,esp flag.

proper lava
lucid agate
#

and set 1 esp on

proper lava
#

maybe cause im doing /dev/sdc1

lucid agate
#

parted -s /dev/sdc set 1 esp on

proper lava
#

@lucid agate

#

is this fine?

lucid agate
#

It suggests a restart of your computer

proper lava