zbm-dev / zfsbootmenu

ZFS Bootloader for root-on-ZFS systems with support for snapshots and native full disk encryption
https://zfsbootmenu.org
MIT License
857 stars 65 forks source link

generate-zbm not respecting CommandLine pararmeters in config,yaml #667

Closed enjewneer closed 1 month ago

enjewneer commented 2 months ago

ZFSBootMenu build source

Local build, mkinitcpio

ZFSBootMenu version

2.3.0

Boot environment distribution

Void Linux x86_64 glibc

Problem description

I was trying to set up networking and tailscale in ZBM, so needed to build locally and use mkinitcpio. My config.yaml looks like this:

Global:
  ManageImages: true
  BootMountPoint: /boot/efi
  InitCPIO: true
  InitCPIOConfig: /etc/zfsbootmenu/mkinitcpio.conf
  DracutConfDir: /etc/zfsbootmenu/dracut.conf.d
  PreHooksDir: /etc/zfsbootmenu/generate-zbm.pre.d
  PostHooksDir: /etc/zfsbootmenu/generate-zbm.post.d
Components:
  ImageDir: /boot/efi/EFI/zbm
  Versions: 3
  Enabled: false
EFI:
  ImageDir: /boot/efi/EFI/zbm
  Versions: false
  Enabled: true
Kernel:
  CommandLine: quiet loglevel=0 zbm.autosize ip=:::::eth0:dhcp

After generating ZBM, all of the config.yaml seems to be taken into account except the Kernel CommandLine (tinkering with Components Enabled: false/true does indeed give me split images and of course, mkinitcpio works). I also tried encasing the parameter line in quotes as I've seen both conventions in documentation but it does not seem to make a difference.

In order for kernel commandline parameters to be built into the image, I must use generate-zbm -l "quiet loglevel=0 zbm.autosize ip=:::::eth0:dhcp"

Steps to reproduce

  1. Include kernel commandline parameters in config.yaml (I noticed primarily on zbm.autosize and setting up networking on eth0)
  2. generate-zbm and reboot
  3. Kernel commandline parameters are not working
  4. generate-zbm -l "<parameters here>" and reboot
  5. Kernel parameters are working
ahesford commented 2 months ago

What does zbm-kcl report as the command line in each case?

zdykstra commented 1 month ago

Closing this due to no additional information.