public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] BIOS can not find boot partition
@ 2021-01-24  5:49 thelma
  2021-01-24 12:03 ` Michael
  2021-01-24 20:27 ` Andrea Conti
  0 siblings, 2 replies; 4+ messages in thread
From: thelma @ 2021-01-24  5:49 UTC (permalink / raw
  To: Gentoo mailing list

I'm missing something as system can not find boot device 

fdisk /dev/nvme0n1
Disklabel type: gpt

Device             Start        End    Sectors   Size Type
/dev/nvme0n1p1      2048       6143       4096     2M BIOS boot
/dev/nvme0n1p2      6144     268287     262144   128M EFI System
/dev/nvme0n1p3    268288    1316863    1048576   512M Linux swap
/dev/nvme0n1p4   1316864  315889663  314572800   150G Linux filesystem

I don't want to use EFI.
/boot = dev/nvme0n1p2  (ext4) file system

When I run:
grub-install /dev/nvme0n1p2
Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.

but there is /boot/grub 

Running: grub-mkconfig -o /boot/grub/grub.cfg  is OK (no errors) 

fstab:
/dev/nvme0n1p2		/boot		ext4		noauto,noatime	1 2 

The BIOS has CSM compatibly mode enable. 
When I try to boot, system can not find bootable partition.

Am I suppose to put any file system on /dev/nvme0n1p1 (2Mb partition) the installation manual did not mention anything. 
  


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] BIOS can not find boot partition
  2021-01-24  5:49 [gentoo-user] BIOS can not find boot partition thelma
@ 2021-01-24 12:03 ` Michael
  2021-01-24 20:49   ` thelma
  2021-01-24 20:27 ` Andrea Conti
  1 sibling, 1 reply; 4+ messages in thread
From: Michael @ 2021-01-24 12:03 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 2423 bytes --]

On Sunday, 24 January 2021 05:49:28 GMT thelma@sys-concept.com wrote:
> I'm missing something as system can not find boot device
> 
> fdisk /dev/nvme0n1
> Disklabel type: gpt
> 
> Device             Start        End    Sectors   Size Type
> /dev/nvme0n1p1      2048       6143       4096     2M BIOS boot
> /dev/nvme0n1p2      6144     268287     262144   128M EFI System
> /dev/nvme0n1p3    268288    1316863    1048576   512M Linux swap
> /dev/nvme0n1p4   1316864  315889663  314572800   150G Linux filesystem
> 
> I don't want to use EFI.

If you do NOT want to use EFI why have you set up /dev/nvme0n1p2 as an ESP 
type partition?

With just 4 partitions in total there's also the question of your choice to 
use GPT instead of the legacy MBR partition table.  :-/


> /boot = dev/nvme0n1p2  (ext4) file system
> 
> When I run:
> grub-install /dev/nvme0n1p2
> Installing for x86_64-efi platform.
> grub-install: error: cannot find EFI directory.

First, the handbook clearly directs to install GRUB to a disk not a partition:

https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Bootloader

However, you *can* install GRUB's boot code in a partition instead of a disk, 
if you wish to chainload the partition's GRUB from another boot loader, e.g. 
MSWindows, rEFInd, another GRUB, etc.  I don't see you want to do this, from 
what you have shared.

Second, I think the error you get is caused because you have created ESP type 
partition, but there is no EFI/ directory in it, which the UEFI boot protocol 
requires.


> but there is /boot/grub

Yes, the error you got does not complain about /boot/grub missing, but about 
the absence of an "... EFI directory".


> Running: grub-mkconfig -o /boot/grub/grub.cfg  is OK (no errors)
> 
> fstab:
> /dev/nvme0n1p2		/boot		ext4		
noauto,noatime	1 2
> 
> The BIOS has CSM compatibly mode enable.
> When I try to boot, system can not find bootable partition.
> 
> Am I suppose to put any file system on /dev/nvme0n1p1 (2Mb partition) the
> installation manual did not mention anything.

No filesystem formatting is required for the small /dev/nvme0n1p1 BIOS boot 
partition - GRUB will install its 2nd stage core image in there.

I'd question if your boot partition should be set as ESP type in the first 
place.  Set it as a Linux partition, reformat it with ext2, or if you want as 
ext4, mount it as /boot and then install GRUB on the disk as the handbook 
instructs.

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] BIOS can not find boot partition
  2021-01-24  5:49 [gentoo-user] BIOS can not find boot partition thelma
  2021-01-24 12:03 ` Michael
@ 2021-01-24 20:27 ` Andrea Conti
  1 sibling, 0 replies; 4+ messages in thread
From: Andrea Conti @ 2021-01-24 20:27 UTC (permalink / raw
  To: gentoo-user

Hello,

> I don't want to use EFI.

Then you probably should not be attempting to boot off an NVMe drive, as that is only possible if the drive has an onboard BIOS-mode boot ROM; AFAIK those are only found on some of the earliest NVMe drives.

Moreover...

> grub-install /dev/nvme0n1p2
> Installing for x86_64-efi platform.

You are installing GRUB in EFI mode. My guess is that it's because you're running the command from a system that was booted in EFI mode, so grub-install picks EFI by default.
For BIOS you want the 'i386-pc' platform, and you _must_ install GRUB to the block device itself (/dev/nvme0n1)

And once again, whether or not you'll be able to boot from that is very much open to debate.

> Am I suppose to put any file system on /dev/nvme0n1p1 (2Mb partition) the installation manual did not mention anything.

That partition is only there to reserve space for the initial stages of GRUB when BIOS-booting from a GPT disk. It does not need to be formatted or mounted, and as long as it has the proper flags grub-install should be able to pick it up on its own.

andrea



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] BIOS can not find boot partition
  2021-01-24 12:03 ` Michael
@ 2021-01-24 20:49   ` thelma
  0 siblings, 0 replies; 4+ messages in thread
From: thelma @ 2021-01-24 20:49 UTC (permalink / raw
  To: gentoo-user

On 1/24/21 5:03 AM, Michael wrote:
> On Sunday, 24 January 2021 05:49:28 GMT thelma@sys-concept.com wrote:
>> I'm missing something as system can not find boot device
>>
>> fdisk /dev/nvme0n1
>> Disklabel type: gpt
>>
>> Device             Start        End    Sectors   Size Type
>> /dev/nvme0n1p1      2048       6143       4096     2M BIOS boot
>> /dev/nvme0n1p2      6144     268287     262144   128M EFI System
>> /dev/nvme0n1p3    268288    1316863    1048576   512M Linux swap
>> /dev/nvme0n1p4   1316864  315889663  314572800   150G Linux filesystem
>>
>> I don't want to use EFI.
> 
> If you do NOT want to use EFI why have you set up /dev/nvme0n1p2 as an ESP 
> type partition?
> 
> With just 4 partitions in total there's also the question of your choice to 
> use GPT instead of the legacy MBR partition table.  :-/

I have 5-partitions, all together, and use 
fdisk  -t gpt  /dev//dev/nvme0n1
 
> 
>> /boot = dev/nvme0n1p2  (ext4) file system
>>
>> When I run:
>> grub-install /dev/nvme0n1p2
>> Installing for x86_64-efi platform.
>> grub-install: error: cannot find EFI directory.
> 
> First, the handbook clearly directs to install GRUB to a disk not a partition:
> 
> https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Bootloader
> 
> However, you *can* install GRUB's boot code in a partition instead of a disk, 
> if you wish to chainload the partition's GRUB from another boot loader, e.g. 
> MSWindows, rEFInd, another GRUB, etc.  I don't see you want to do this, from 
> what you have shared.

You are correct here, this was my mistake, it should be (it was late at night didn't notice it) :
grub-install /dev/nvme0n1   (now it works)

not:
grub-install /dev/nvme0n1p2

> Second, I think the error you get is caused because you have created ESP type 
> partition, but there is no EFI/ directory in it, which the UEFI boot protocol 
> requires.
> 
> 
>> but there is /boot/grub
> 
> Yes, the error you got does not complain about /boot/grub missing, but about 
> the absence of an "... EFI directory".
> 
> 
>> Running: grub-mkconfig -o /boot/grub/grub.cfg  is OK (no errors)
>>
>> fstab:
>> /dev/nvme0n1p2		/boot		ext4		
> noauto,noatime	1 2
>>
>> The BIOS has CSM compatibly mode enable.
>> When I try to boot, system can not find bootable partition.
>>
>> Am I suppose to put any file system on /dev/nvme0n1p1 (2Mb partition) the
>> installation manual did not mention anything.
> 
> No filesystem formatting is required for the small /dev/nvme0n1p1 BIOS boot 
> partition - GRUB will install its 2nd stage core image in there.
> 
> I'd question if your boot partition should be set as ESP type in the first 
> place.  Set it as a Linux partition, reformat it with ext2, or if you want as 
> ext4, mount it as /boot and then install GRUB on the disk as the handbook 
> instructs.

Yah, I change this partition to "Linux filesystem" 
/dev/nvme0n1p2      6144     268287     262144   128M Linux filesystem

Without reinstalling anything, it works (it was ext4).


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-24 20:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-24  5:49 [gentoo-user] BIOS can not find boot partition thelma
2021-01-24 12:03 ` Michael
2021-01-24 20:49   ` thelma
2021-01-24 20:27 ` Andrea Conti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox