Re: [gentoo-user] Gentoo-sources 5.7.x [FIXED]

2020-06-10 Thread Peter Humphrey
On Wednesday, 10 June 2020 15:49:30 BST Neil Bothwick wrote:

> Any reason you bury the iniitrd in the options list rather that having it
> on a separate line?

None in particular. Perhaps I was following an example. I don't think it 
matters much, especially as I rarely need to change it.

> This is what I'm now using:
> 
> title Desktop
> version   5.4.38-gentoo
> linux vmlinuz-5.4.38-gentoo
> options   root=LABEL=yooden rd.luks.uuid=luks-...
> initrdintel-uc.img
> initrdinitramfs-5.4.38-gentoo.img

Maybe I'll take some ideas from that - thanks.

-- 
Regards,
Peter.






Re: [gentoo-user] Gentoo-sources 5.7.x [FIXED]

2020-06-10 Thread Neil Bothwick
On Wed, 10 Jun 2020 11:01:45 +0100, Peter Humphrey wrote:

> > > Did you also remove the leading slash from the kernel? I'm still
> > > running 5.4 but I tried removing the slashes from the kernel and
> > > initrds and it booted fine. Thanks for the heads up, I'll be ready
> > > when 5.7+ goes longterm.  
> > 
> > I didn't, no, but I'll try it.  
> 
> This is the new default boot entry:
> 
> # cat /boot/loader/entries/30-gentoo-5.7.1.conf
> title Gentoo Linux 5.7.1
> linux vmlinuz-5.7.1-gentoo
> options root=/dev/nvme0n1p4 initrd=intel-uc.img net.ifnames=0 
> raid=noautodetect
> 
> I've just booted from it.
> 
> I assume I wouldn't be able to if I removed the leading slash from root=

I /think/ you're right there.

Any reason you bury the iniitrd in the options list rather that having it
on a separate line? This is what I'm now using:

title   Desktop
version 5.4.38-gentoo
linux   vmlinuz-5.4.38-gentoo
options root=LABEL=yooden rd.luks.uuid=luks-...
initrd  intel-uc.img
initrd  initramfs-5.4.38-gentoo.img


-- 
Neil Bothwick

Don't let your mind wander, it's too little to be let out alone.


pgpbgtbxMkHPA.pgp
Description: OpenPGP digital signature


Re: [gentoo-user] Gentoo-sources 5.7.x [FIXED]

2020-06-10 Thread Peter Humphrey
On Tuesday, 9 June 2020 19:32:23 BST Andrew Udvare wrote:

[Snip much interesting stuff]

My motherboard is also Asus: an X99-A. I haven't overwritten the UEFI BIOS 
kernel image for quite a while; not since I arrived at a stable layout of 
/boot.

This is my /boot layout:

# tree /boot
/boot
├── config-5.4.38-gentoo
├── config-5.4.38-gentoo-rescue
├── config-5.7.1-gentoo
├── early_ucode.cpio
├── EFI
│   ├── Boot
│   │   └── bootx64.efi
│   └── systemd
│   └── systemd-bootx64.efi
├── intel-uc.img
├── loader
│   ├── entries
│   │   ├── 08-gentoo-5.4.38-rescue.conf
│   │   ├── 09-gentoo-5.4.38-rescue.nonet.conf
│   │   ├── 30-gentoo-5.7.1.conf
│   │   ├── 32-gentoo-5.7.1.nox.conf
│   │   ├── 34-gentoo-5.7.1.nonet.conf
│   │   ├── 40-gentoo-5.4.38.conf
│   │   ├── 42-gentoo-5.4.38.nox.conf
│   │   └── 44-gentoo-5.4.38.nonet.conf
│   ├── loader.conf
│   └── random-seed
├── System.map-5.4.38-gentoo
├── System.map-5.4.38-gentoo-rescue
├── System.map-5.7.1-gentoo
├── vmlinuz-5.4.38-gentoo
├── vmlinuz-5.4.38-gentoo-rescue
└── vmlinuz-5.7.1-gentoo

It's the outcome of a good deal of effort to find a working structure, and I'd 
need some persuasion to change it again.  :)

-- 
Regards,
Peter.


Re: [gentoo-user] Gentoo-sources 5.7.x [FIXED]

2020-06-10 Thread Peter Humphrey
On Wednesday, 10 June 2020 09:57:18 BST Peter Humphrey wrote:
> On Tuesday, 9 June 2020 18:29:50 BST Neil Bothwick wrote:

> > Did you also remove the leading slash from the kernel? I'm still running
> > 5.4 but I tried removing the slashes from the kernel and initrds and it
> > booted fine. Thanks for the heads up, I'll be ready when 5.7+ goes
> > longterm.
> 
> I didn't, no, but I'll try it.

This is the new default boot entry:

# cat /boot/loader/entries/30-gentoo-5.7.1.conf
title Gentoo Linux 5.7.1
linux vmlinuz-5.7.1-gentoo
options root=/dev/nvme0n1p4 initrd=intel-uc.img net.ifnames=0 
raid=noautodetect

I've just booted from it.

I assume I wouldn't be able to if I removed the leading slash from root=

-- 
Regards,
Peter.






Re: [gentoo-user] Gentoo-sources 5.7.x [FIXED]

2020-06-10 Thread Peter Humphrey
On Tuesday, 9 June 2020 18:29:50 BST Neil Bothwick wrote:
> On Tue, 09 Jun 2020 17:07:40 +0100, Peter Humphrey wrote:
> > > Nope. Didn't help. All I have now is dredging through the kernel
> > > config yet again, or possibly even trying an initrd. I hope I'm not
> > > being forced down that road after all these years.
> > 
> > It was so simple, and the clue was in an earlier message.
> > 
> > # cat /boot/loader/entries/30-gentoo-5.7.1.conf
> > title Gentoo Linux 5.7.1initrd=/intel-uc.img
> > linux /vmlinuz-5.7.1-gentoo
> > options root=/dev/nvme0n1p4 initrd=/intel-uc.img net.ifnames=0
> > raid=noautodetect

That's got corrupted somehow. My first post had it right, but the first line of 
the file above is not.

> > All I had to do was to remove the slash from initrd=/intel-uc.img. I
> > did that in all the .../entries files and 5.4.38 also still boots
> > happily.
> 
> Did you also remove the leading slash from the kernel? I'm still running
> 5.4 but I tried removing the slashes from the kernel and initrds and it
> booted fine. Thanks for the heads up, I'll be ready when 5.7+ goes
> longterm.

I didn't, no, but I'll try it.

-- 
Regards,
Peter.






Re: [gentoo-user] Gentoo-sources 5.7.x [FIXED]

2020-06-09 Thread Andrew Udvare
On 09/06/2020 12:07, Peter Humphrey wrote:
> On Tuesday, 9 June 2020 15:56:52 BST Peter Humphrey wrote:
> # cat /boot/loader/entries/30-gentoo-5.7.1.conf
> title Gentoo Linux 5.7.1initrd=/intel-uc.img
> linux /vmlinuz-5.7.1-gentoo
> options root=/dev/nvme0n1p4 initrd=/intel-uc.img net.ifnames=0 
> raid=noautodetect

Since you are using systemd-boot or something that fulfils that
specification[1], you can also build your kernel with EFI stub enabled
(CONFIG_EFI_STUB) and then simply put the binary in:

${ESP}/EFI/Linux/vmlinuz-5.7.1-gentoo.efi

You can then run `bootctl set-default vmlinuz-5.7.1-gentoo.efi` or on
the menu, select it and press d to set it within systemd-boot.

(My ASUS motherboard for some reason never lets me write EFI variables
from within Linux so I have to do it from within systemd-boot.)

You can specify the options in the kernel configuration as well:

CONFIG_CMDLINE="root=/dev/nvme0n1p4 initrd=/intel-uc.img net.ifnames=0
raid=noautodetect"

To add the /intel-uc.img to this configuration you either have to
include that in kernel configuration or you can use Dracut to build an
EFI image.

Kernel config:

CONFIG_INITRAMFS_SOURCE="/boot/intel_uc.img"

Or with Dracut:

dracut --force --uefi --uefi-stub
'/usr/lib/systemd/boot/efi/linuxx64.efi.stub' ...

Dracut will automatically pick up your kernel installed to /boot (from
kernel `make install`) and /boot/intel-uc.img (and other similar
things). It will also automatically place the file into

In both cases, you have to remember to update the EFI image/rebuild and
reinstall the kernel whenever you update intel-microcode.

The benefit to this is you don't have to maintain entries files, and you
keep configuration generally in one place: the kernel config. Then you
just drop in EFI binaries into the correct place and they will appear in
the menu. You could have always keep two Linux EFI binaries in
${ESP}/EFI/Linux/ in case the newest one fails.

If you want to do this semi-automatically as part of updates and with
UEFI secure boot signing, use my project: https://github.com/tatsh/upkeep

[1] https://systemd.io/BOOT_LOADER_SPECIFICATION/

--
Andrew




signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] Gentoo-sources 5.7.x [FIXED]

2020-06-09 Thread Neil Bothwick
On Tue, 09 Jun 2020 17:07:40 +0100, Peter Humphrey wrote:

> > Nope. Didn't help. All I have now is dredging through the kernel
> > config yet again, or possibly even trying an initrd. I hope I'm not
> > being forced down that road after all these years.  
> 
> It was so simple, and the clue was in an earlier message.
> 
> # cat /boot/loader/entries/30-gentoo-5.7.1.conf
> title Gentoo Linux 5.7.1initrd=/intel-uc.img
> linux /vmlinuz-5.7.1-gentoo
> options root=/dev/nvme0n1p4 initrd=/intel-uc.img net.ifnames=0
> raid=noautodetect
> 
> All I had to do was to remove the slash from initrd=/intel-uc.img. I
> did that in all the .../entries files and 5.4.38 also still boots
> happily.

Did you also remove the leading slash from the kernel? I'm still running
5.4 but I tried removing the slashes from the kernel and initrds and it
booted fine. Thanks for the heads up, I'll be ready when 5.7+ goes
longterm.


-- 
Neil Bothwick

WinErr 008: Broken window - Watch out for glass fragments


pgpsPXYVLVzKT.pgp
Description: OpenPGP digital signature


Re: [gentoo-user] Gentoo-sources 5.7.x [FIXED]

2020-06-09 Thread Peter Humphrey
On Tuesday, 9 June 2020 15:56:52 BST Peter Humphrey wrote:
> On Tuesday, 9 June 2020 15:46:43 BST Peter Humphrey wrote:
> > > Other than that, the naming scheme may have changed but I don't know
> > > about
> > > this. For better future-proofing, use a UUID of your root partition
> > > rather
> > > than a device name.
> > > 
> > > root=UUID=...
> > > 
> > > You can get this UUID with the blkid command.
> > 
> > I'll try this in a minute - thanks for the idea. I've stuck with device
> > names so far because (i) I can read them, and (ii) I can't ever have more
> > than one NVMe device in this box.
> 
> Nope. Didn't help. All I have now is dredging through the kernel config yet
> again, or possibly even trying an initrd. I hope I'm not being forced down
> that road after all these years.

It was so simple, and the clue was in an earlier message.

# cat /boot/loader/entries/30-gentoo-5.7.1.conf
title Gentoo Linux 5.7.1initrd=/intel-uc.img
linux /vmlinuz-5.7.1-gentoo
options root=/dev/nvme0n1p4 initrd=/intel-uc.img net.ifnames=0 raid=noautodetect

All I had to do was to remove the slash from initrd=/intel-uc.img. I did that
in all the .../entries files and 5.4.38 also still boots happily.

Thanks to those who offered help.

-- 
Regards,
Peter.