Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
grub-install error
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
antonellocaroli
Guru
Guru


Joined: 11 Aug 2016
Posts: 503

PostPosted: Wed Feb 09, 2022 7:33 am    Post subject: grub-install error Reply with quote

ottengo questo errore quando lancio il comando

Code:
grub-install /dev/loop0
Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.


sono in chroot, il sistema host é effitivamente un sistema EFI, il sistema in chroot deve essere/é un sistema BIOS/MBR...

non capisco perché grub tenti una installazione efi...forse perché l host é un sistema EFI? come posso forzare l'installazione BIOS/MBR?

le partizioni sono giuste

Code:
Disk /dev/loop0: 9 GiB, 9663676416 bytes, 18874368 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x25fd2af7

Device       Boot   Start      End  Sectors  Size Id Type
/dev/loop0p1         2048     6143     4096    2M 83 Linux
/dev/loop0p2 *       6144  1185791  1179648  576M 83 Linux
/dev/loop0p3      1185792 18874367 17688576  8.4G 83 Linux
Back to top
View user's profile Send private message
antonellocaroli
Guru
Guru


Joined: 11 Aug 2016
Posts: 503

PostPosted: Wed Feb 09, 2022 8:05 am    Post subject: Reply with quote

Questa potrebbe essere la soluzione?

Code:
grub-install --target=i386-pc --recheck /dev/loop0
Back to top
View user's profile Send private message
sabayonino
Veteran
Veteran


Joined: 03 Jan 2012
Posts: 1008

PostPosted: Wed Feb 09, 2022 3:05 pm    Post subject: Reply with quote

EFI funziona correttamente se la tabella delle partizioni è GPT , cideve essere la relativa partzione EFI in FAT32

Se boot è MBR , tabella delle partizioni DOS , installa il grub/bootloader come da te indicato

Inoltre puoi utilizzare un bootloader ibrido (EFI+MBR)

Tabella partizione GPT
poi crei la prima partizione del tipo "BIOS boot" da 1M dove poter installare il bootloader BIOS
la partizione EFI
e il resto

di default Grub installa per EFI

qualcosa del tipo

Boot EFI+ BIOS/BOOT
Code:
Disk /dev/loop0: 14.89 GiB, 15990784000 bytes, 31232000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 700981BF-1069-491E-B47C-B3CA35C35A5C

Device        Start      End  Sectors  Size Type
/dev/loop0p1   2048     4095     2048    1M BIOS boot
/dev/loop0p2   4096   208895   204800  100M EFI System
/dev/loop0p3 208896 31231933 31023038 14.8G Linux filesystem


Instala EFI (di base) su /dev/loop0 (o altro device) -- la partizione EFI deve essere montata
Code:
# grub-install --target=x86_64-efi --efi-directory=/boot/efi

Se /boot risiede su un altra partizione
1 . Monta /
2. Monta /boot
3. Monta /boot/EFI o /boot/efi o quello che vuoi , ovviamente EFI o efi directory deve esistere
Sconsiglio di montare /boot direttamente sulla partizione EFI causa gestione poco flessibile dei permessi del filesystem FAT32
Installa GRUB/BIOS (di base) su /dev/loop0 (o altro dispoitivo)
Code:
# grub-install --target=i386-pc /dev/loop0


Aggiungici eventuali altre opzioni se che ti servono.
Ricordati di aggiornare il grub
Code:
# grub-mkconfig -o /boot/grub/grub.cfg

_________________
LRS i586 on G.Drive
LRS x86-64 EFI on MEGA
Back to top
View user's profile Send private message
antonellocaroli
Guru
Guru


Joined: 11 Aug 2016
Posts: 503

PostPosted: Wed Feb 09, 2022 3:39 pm    Post subject: Reply with quote

Grazie
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum