Gentoo Archives: gentoo-user

From: Michael <confabulate@××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] BIOS can not find boot partition
Date: Sun, 24 Jan 2021 12:03:57
Message-Id: 2130603.iZASKD2KPV@lenovo.localdomain
In Reply to: [gentoo-user] BIOS can not find boot partition by thelma@sys-concept.com
1 On Sunday, 24 January 2021 05:49:28 GMT thelma@×××××××××××.com wrote:
2 > I'm missing something as system can not find boot device
3 >
4 > fdisk /dev/nvme0n1
5 > Disklabel type: gpt
6 >
7 > Device Start End Sectors Size Type
8 > /dev/nvme0n1p1 2048 6143 4096 2M BIOS boot
9 > /dev/nvme0n1p2 6144 268287 262144 128M EFI System
10 > /dev/nvme0n1p3 268288 1316863 1048576 512M Linux swap
11 > /dev/nvme0n1p4 1316864 315889663 314572800 150G Linux filesystem
12 >
13 > I don't want to use EFI.
14
15 If you do NOT want to use EFI why have you set up /dev/nvme0n1p2 as an ESP
16 type partition?
17
18 With just 4 partitions in total there's also the question of your choice to
19 use GPT instead of the legacy MBR partition table. :-/
20
21
22 > /boot = dev/nvme0n1p2 (ext4) file system
23 >
24 > When I run:
25 > grub-install /dev/nvme0n1p2
26 > Installing for x86_64-efi platform.
27 > grub-install: error: cannot find EFI directory.
28
29 First, the handbook clearly directs to install GRUB to a disk not a partition:
30
31 https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Bootloader
32
33 However, you *can* install GRUB's boot code in a partition instead of a disk,
34 if you wish to chainload the partition's GRUB from another boot loader, e.g.
35 MSWindows, rEFInd, another GRUB, etc. I don't see you want to do this, from
36 what you have shared.
37
38 Second, I think the error you get is caused because you have created ESP type
39 partition, but there is no EFI/ directory in it, which the UEFI boot protocol
40 requires.
41
42
43 > but there is /boot/grub
44
45 Yes, the error you got does not complain about /boot/grub missing, but about
46 the absence of an "... EFI directory".
47
48
49 > Running: grub-mkconfig -o /boot/grub/grub.cfg is OK (no errors)
50 >
51 > fstab:
52 > /dev/nvme0n1p2 /boot ext4
53 noauto,noatime 1 2
54 >
55 > The BIOS has CSM compatibly mode enable.
56 > When I try to boot, system can not find bootable partition.
57 >
58 > Am I suppose to put any file system on /dev/nvme0n1p1 (2Mb partition) the
59 > installation manual did not mention anything.
60
61 No filesystem formatting is required for the small /dev/nvme0n1p1 BIOS boot
62 partition - GRUB will install its 2nd stage core image in there.
63
64 I'd question if your boot partition should be set as ESP type in the first
65 place. Set it as a Linux partition, reformat it with ext2, or if you want as
66 ext4, mount it as /boot and then install GRUB on the disk as the handbook
67 instructs.

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] BIOS can not find boot partition thelma@×××××××××××.com