On 26/03/16 02:31, Dan Douglas wrote:
I'm installing gentoo hardened on several machines all with btrfs root
filesystems, the simplest of which is a single gpt partitioned disk.
This is my current partitioning scheme (based on numerous conflicting
explainations on the wiki and handbook):

  # gdisk /dev/sda -l
GPT fdisk (gdisk) version 1.0.1

Partition table scan:
   MBR: protective
   BSD: not present
   APM: not present
   GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 1953525168 sectors, 931.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 4C1FE8C1-69CE-4433-A3E4-7060FFF5AF10
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1953525134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
    1            2048         1050623   512.0 MiB   EF00  EFI System
    2         1050624         9439231   4.0 GiB     8200  Linux swap
    3         9439232      1953525134   927.0 GiB   8300  Linux filesystem

grub2-mkconfig generates no menu entries. Do I need anything generated
by /etc/grub.d/00_header? That output looks like garbage.

The only real relevant configuration in /etc/default/grub should be correct.

GRUB_CMDLINE_LINUX="root=UUID=f0373f0c-3798-4965-a845-b1b94cc14731
rootfstype=btrfs
rootflags=rw,noatime,compress=zlib,space_cache,subvol=rootfs"

I've tried several values for GRUB_DEVICE, which has no effect. This
page says an initramfs isn't needed even (for either btrfs RAID or
non-RAID configuration), though several pages disagree on this.
https://wiki.gentoo.org/wiki/GRUB2

grub2-install also fails:

  # grub2-install --target=x86_64-efi /dev/sda
Installing for x86_64-efi platform.
grub2-install: error: cannot find EFI directory.

What EFI directory? The one I created under /boot?

I've also tried a pure EFI stub loader. Attempting to build a dracut
image into the kernel causes the build to fail in various ways
depending on the compression method used.

   GEN     usr/initramfs_data.cpio.gz
ERROR: incorrect format, could not locate file type line 8: ''
usr/Makefile:73: recipe for target 'usr/initramfs_data.cpio.gz' failed
make[1]: *** [usr/initramfs_data.cpio.gz] Error 255
Makefile:949: recipe for target 'usr' failed
make: *** [usr] Error 2
make: *** Waiting for unfinished jobs...

This page suggests generating an uncompressed image with dracut and
renaming the file with a .cpio extension which I'd guess is erroneous
advice. https://wiki.gentoo.org/wiki/EFI_stub_kernel . The remaining
instructions WRT eficompmgr all seem to assume I've been able to build
a kernel with a built-in command line and initramfs.

Is there any simpler way of doing this? I've gotten grub2 to work with
a btrfs RAID 10 and initramfs in the past but somehow grub2-mkconfig
isn't working now.


I installed Gentoo on more than 10 PC's and Laptops and virtual machines during the past 12 month. Tried Grub2, Btrf, etc. They caused problems. Genkernel, Grub-static, Ext4 with Disklabels, Samba, Xfce, always worked at first try, including workstations with RAID 5 booting from a RAID 1 partition using a "Cut & Paste" installation script that does 95% of the keyboard work. Nothing complex, just very simple.




Reply via email to