Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] UEFI-fails to boot
Date: Thu, 25 Jan 2018 11:35:37
Message-Id: 2174775.DKVvEhNtrk@dell_xps
In Reply to: [gentoo-user] UEFI-fails to boot by Dan Johansson
1 On Thursday, 25 January 2018 10:54:28 GMT Dan Johansson wrote:
2 > I have bought me a shiny new Supermicro X10DRi-T motherboard with two
3 > Xenon-E5-2620-v3 CPUs for use as a server.
4 >
5 > I have configured the MB for UEFI-mode only and my rescuecd-USB-key
6 > boots find in UEFI-mode.
7 >
8 > Following the Handbook and the "EFI System Partition" handbook I have
9 > created the following GPT-disklayout:
10 >
11 > root@sysresccd /root % parted /dev/sda print
12 > Model: ATA ST1000DX002-2DV1 (scsi)
13 > Disk /dev/sda: 1000GB
14 > Sector size (logical/physical): 512B/4096B
15 > Partition Table: gpt
16 > Disk Flags:
17 >
18 > Number Start End Size File system Name Flags
19 > 1 1049kB 3146kB 2097kB fat32 grub bios_grub
20
21 The above implies an MBR partition table approach to booting your OS, which a
22 non-UEFI (BIOS only) MoBo will need. However you are meant to be using UEFI
23 *only* and GPT ...
24
25
26 > 2 3146kB 137MB 134MB ext2 boot boot, esp
27
28 and this partition is what should be used for an UEFI MoBo, but the fs is
29 wrong. Change it to fat32 and check with gdisk that its partition code is
30 EF00, which according to your 'boot, esp' flags it should be. This is your
31 EFI System Partition (ESP).
32
33
34 > 3 137MB 4429MB 4292MB linux-swap(v1) swap
35 > 4 4429MB 5503MB 1074MB root
36 > 5 5503MB 1000GB 995GB vg
37 >
38 > Partition-1 was created like this: mkfs.fat -F 32 -n efi-boot /dev/sda1
39 > Partition-2 was created like this: mkfs.ext2 -T small /dev/sda2
40 >
41 > GRUB_PLATFORMS was set to "efi-64" in make.conf before emerging grub:2
42 >
43 > /boot and /boot/efi is mounted like this
44 > # mount | grep boot
45 > /dev/sda2 on /boot type ext2 (rw,relatime,errors=continue,user_xattr,acl)
46 > /dev/sda1 on /boot/efi type vfat
47 > (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mi
48 > xed,errors=remount-ro)
49 >
50 > I had to remount /sys/firmware/efi/efivars in rw-mode, otherwise
51 > grub-install would complain.
52
53 Yes, this has been the case for some time now. You will always need to
54 remount it as rw before you change the contents of the ESP boot partition. It
55 is also mentioned here:
56
57 https://wiki.gentoo.org/wiki/GRUB2
58
59
60 > grub-install was run like this
61 > "grub-install --target=x86_64-efi --efi-directory=/boot/efi"
62
63 But ... /boot/efi is not your ESP.
64
65
66 > And "grub-mkconfig -o /boot/grub/grub.cfg" has been run without any errors.
67 >
68 > efibootmgr shows my gentoo as the first entry
69 > # efibootmgr
70 > Timeout: 1 seconds
71 > BootOrder: 0000,0001,0002,0003
72 > Boot0000 gentoo
73 > Boot0001 Hard Drive
74 > Boot0002 Network Card
75 > Boot0003 UEFI: Built-in EFI Shell
76
77 Use 'efibootmgr -v' to check the path of the .efi image it tries to boot and
78 check the path is correct without any typos. What you show above is only a
79 label.
80
81
82 > But when I boot without the USB-key inserted I always "lands" in the
83 > Built-in EFI Shell - NO sign of GRUB.
84 >
85 > Any suggestions where I have gone wrong?
86 >
87 > KR
88
89 The ESP needs to be formatted as vfat and the GRUB boot image grubx64.efi
90 should be installed there.
91
92 HTH.
93 --
94 Regards,
95 Mick

Attachments

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

Replies

Subject Author
Re: [gentoo-user] UEFI-fails to boot Dan Johansson <dan@×××.nu>