public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Can't get any boot method working
@ 2016-03-25 16:31 Dan Douglas
  2016-03-25 19:38 ` Jeremi Piotrowski
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Dan Douglas @ 2016-03-25 16:31 UTC (permalink / raw
  To: gentoo-user

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.


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

* Re: [gentoo-user] Can't get any boot method working
  2016-03-25 16:31 [gentoo-user] Can't get any boot method working Dan Douglas
@ 2016-03-25 19:38 ` Jeremi Piotrowski
  2016-03-25 20:07 ` [gentoo-user] " James
  2016-03-26 16:11 ` Hans
  2 siblings, 0 replies; 4+ messages in thread
From: Jeremi Piotrowski @ 2016-03-25 19:38 UTC (permalink / raw
  To: gentoo-user

On Fri, Mar 25, 2016 at 04:31:11PM +0000, Dan Douglas wrote:
> 
> grub2-mkconfig generates no menu entries. Do I need anything generated
> by /etc/grub.d/00_header? That output looks like garbage.
> 

You are better off not removing the header.

Are you running grub2-mkconfig from the chroot? The kernel+initramfs
should be located at /boot. In the case of btrfs you can make it a
subvolume but at the time of running grub2-mkconfig you should be chrooted
into your root subvolume and your kernel has to be at /boot.


> 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"

From what I can remember you don't need any of that - if anything would be
relevant it's subvol=rootfs but grub should be able to figure that out.


> 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?
> 

/dev/sda1 is your EFI partition, formatted as vfat. You can have it
mounted under /boot or under /boot/efi (I recommend the latter). Install
like this

    # grub2-install --target=x86_64-efi --efi-directory=/boot/efi


You can also use dracut to build an uefi executable that includes your
kernel, the kernel commandline and the initramfs.

    # dracut --uefi



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

* [gentoo-user] Re: Can't get any boot method working
  2016-03-25 16:31 [gentoo-user] Can't get any boot method working Dan Douglas
  2016-03-25 19:38 ` Jeremi Piotrowski
@ 2016-03-25 20:07 ` James
  2016-03-26 16:11 ` Hans
  2 siblings, 0 replies; 4+ messages in thread
From: James @ 2016-03-25 20:07 UTC (permalink / raw
  To: gentoo-user

Dan Douglas <ormaaj <at> gmail.com> writes:


> I'm installing gentoo hardened on several machines all with btrfs root
> filesystems, the simplest of which is a single gpt partitioned disk.

> 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.


Not sue this will help, but lots of folks like Rich0's step guide
published here::

https://docs.google.com/document/
d/1VJlJyYLTZScta9a81xgKOIBjYsG3_VfxxmUSxG23Uxg/edit?pli=1

caveat emptor!


hth,
James







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

* [gentoo-user] Re: Can't get any boot method working
  2016-03-25 16:31 [gentoo-user] Can't get any boot method working Dan Douglas
  2016-03-25 19:38 ` Jeremi Piotrowski
  2016-03-25 20:07 ` [gentoo-user] " James
@ 2016-03-26 16:11 ` Hans
  2 siblings, 0 replies; 4+ messages in thread
From: Hans @ 2016-03-26 16:11 UTC (permalink / raw
  To: gentoo-user

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.





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

end of thread, other threads:[~2016-03-26 16:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-25 16:31 [gentoo-user] Can't get any boot method working Dan Douglas
2016-03-25 19:38 ` Jeremi Piotrowski
2016-03-25 20:07 ` [gentoo-user] " James
2016-03-26 16:11 ` Hans

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