Gentoo Archives: gentoo-user

From: Dan Douglas <ormaaj@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Can't get any boot method working
Date: Fri, 25 Mar 2016 16:31:25
Message-Id: CADVxHgPRQ_Wa=d_ZoJEDLLuRBrREaxMfSdwKpnyFb1QqNuCpoQ@mail.gmail.com
1 I'm installing gentoo hardened on several machines all with btrfs root
2 filesystems, the simplest of which is a single gpt partitioned disk.
3 This is my current partitioning scheme (based on numerous conflicting
4 explainations on the wiki and handbook):
5
6 # gdisk /dev/sda -l
7 GPT fdisk (gdisk) version 1.0.1
8
9 Partition table scan:
10 MBR: protective
11 BSD: not present
12 APM: not present
13 GPT: present
14
15 Found valid GPT with protective MBR; using GPT.
16 Disk /dev/sda: 1953525168 sectors, 931.5 GiB
17 Logical sector size: 512 bytes
18 Disk identifier (GUID): 4C1FE8C1-69CE-4433-A3E4-7060FFF5AF10
19 Partition table holds up to 128 entries
20 First usable sector is 34, last usable sector is 1953525134
21 Partitions will be aligned on 2048-sector boundaries
22 Total free space is 2014 sectors (1007.0 KiB)
23
24 Number Start (sector) End (sector) Size Code Name
25 1 2048 1050623 512.0 MiB EF00 EFI System
26 2 1050624 9439231 4.0 GiB 8200 Linux swap
27 3 9439232 1953525134 927.0 GiB 8300 Linux filesystem
28
29 grub2-mkconfig generates no menu entries. Do I need anything generated
30 by /etc/grub.d/00_header? That output looks like garbage.
31
32 The only real relevant configuration in /etc/default/grub should be correct.
33
34 GRUB_CMDLINE_LINUX="root=UUID=f0373f0c-3798-4965-a845-b1b94cc14731
35 rootfstype=btrfs
36 rootflags=rw,noatime,compress=zlib,space_cache,subvol=rootfs"
37
38 I've tried several values for GRUB_DEVICE, which has no effect. This
39 page says an initramfs isn't needed even (for either btrfs RAID or
40 non-RAID configuration), though several pages disagree on this.
41 https://wiki.gentoo.org/wiki/GRUB2
42
43 grub2-install also fails:
44
45 # grub2-install --target=x86_64-efi /dev/sda
46 Installing for x86_64-efi platform.
47 grub2-install: error: cannot find EFI directory.
48
49 What EFI directory? The one I created under /boot?
50
51 I've also tried a pure EFI stub loader. Attempting to build a dracut
52 image into the kernel causes the build to fail in various ways
53 depending on the compression method used.
54
55 GEN usr/initramfs_data.cpio.gz
56 ERROR: incorrect format, could not locate file type line 8: ''
57 usr/Makefile:73: recipe for target 'usr/initramfs_data.cpio.gz' failed
58 make[1]: *** [usr/initramfs_data.cpio.gz] Error 255
59 Makefile:949: recipe for target 'usr' failed
60 make: *** [usr] Error 2
61 make: *** Waiting for unfinished jobs...
62
63 This page suggests generating an uncompressed image with dracut and
64 renaming the file with a .cpio extension which I'd guess is erroneous
65 advice. https://wiki.gentoo.org/wiki/EFI_stub_kernel . The remaining
66 instructions WRT eficompmgr all seem to assume I've been able to build
67 a kernel with a built-in command line and initramfs.
68
69 Is there any simpler way of doing this? I've gotten grub2 to work with
70 a btrfs RAID 10 and initramfs in the past but somehow grub2-mkconfig
71 isn't working now.

Replies

Subject Author
Re: [gentoo-user] Can't get any boot method working Jeremi Piotrowski <jeremi.piotrowski@×××××.com>
[gentoo-user] Re: Can't get any boot method working James <wireless@×××××××××××.com>
[gentoo-user] Re: Can't get any boot method working Hans <linux@××××××××××××××.au>