Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Failed to generate initramfs using ugRD.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
asy1
n00b
n00b


Joined: 14 Jan 2025
Posts: 1

PostPosted: Tue Jan 14, 2025 10:01 am    Post subject: [SOLVED] Failed to generate initramfs using ugRD. Reply with quote

[SOLVED]. After upgrading to =sys-kernel/ugrd-9999 this error no longer persists.

I can't build initramfs using ugRD.

I was following https://wiki.gentoo.org/wiki/Handbook:AMD64 , https://wiki.gentoo.org/wiki/Full_Disk_Encryption .
After encountering this error I read https://forums.gentoo.org/viewtopic-t-1171774-start-0.html < Was no help to me, but it might be that I misunderstood something.

My goal is to have "Full Disk Encrypted" system. I want grub, linux, luks_header to be on external detachable USB drive.

ugrd output:
Code:

modules:
  - ugrd.base.core
  - ugrd.fs.mounts
  - ugrd.base.cmdline
  - ugrd.base.banner
  - ugrd.kmod.kmod
  - ugrd.fs.cpio
  - ugrd.base.checks
  - ugrd.base.base
  - ugrd.kmod.nosound
  - ugrd.kmod.novideo
  - ugrd.kmod.nonetwork
  - ugrd.kmod.standard_mask
  - ugrd.kmod.usb
  - ugrd.fs.btrfs
  - ugrd.crypto.cryptsetup
  - ugrd.base.console
  - ugrd.crypto.gpg
imports:
  config_processing:
    - <function _process_loglevel at 0x7f3b7d236520>
    - <function _process_init_target at 0x7f3b7d52c5e0>
    - <function _process_autodetect_init at 0x7f3b7d236700>
    - <function _process_build_logging at 0x7f3b7d24be20>
    - <function _process_out_file at 0x7f3b7d24b6a0>
    - <function _process_binaries_multi at 0x7f3b7d24ba60>
    - <function _process_dependencies_multi at 0x7f3b7d24bba0>
    - <function _process_opt_dependencies_multi at 0x7f3b7d24bc40>
    - <function _process_xz_dependencies_multi at 0x7f3b7d24bce0>
    - <function _process_gz_dependencies_multi at 0x7f3b7d24bd80>
    - <function _process_copies_multi at 0x7f3b7d24bec0>
    - <function _process_symlinks_multi at 0x7f3b7d24bf60>
    - <function _process_nodes_multi at 0x7f3b7d270040>
    - <function _process_paths_multi at 0x7f3b7d24b9c0>
    - <function _process_masks_multi at 0x7f3b7d2700e0>
    - <function _process_hostonly at 0x7f3b7d270180>
    - <function _process_validate at 0x7f3b7d270220>
    - <function _process_mounts_multi at 0x7f3b7d270ae0>
    - <function _process_late_mounts_multi at 0x7f3b7d270b80>
    - <function _process_mount_timeout at 0x7f3b7d270a40>
    - <function _process_kmod_init_multi at 0x7f3b7d273240>
    - <function _process_kernel_modules_multi at 0x7f3b7d2731a0>
    - <function _process__kmod_auto_multi at 0x7f3b7d2732e0>
    - <function _process_root_subvol at 0x7f3b7d2a4fe0>
    - <function _process_subvol_selector at 0x7f3b7d2a51c0>
    - <function _process_cryptsetup_multi at 0x7f3b7d2a5b20>
    - <function _process_cryptsetup_key_types_multi at 0x7f3b7d2a5a80>
  build_pre:
    - <function autodetect_init at 0x7f3b7d236840>
    - <function detect_tmpdir at 0x7f3b7d24afc0>
    - <function clean_build_dir at 0x7f3b7d24b1a0>
    - <function find_libgcc at 0x7f3b7d24b920>
    - <function get_mounts_info at 0x7f3b7d271080>
    - <function get_virtual_block_info at 0x7f3b7d270f40>
    - <function get_blkid_info at 0x7f3b7d2711c0>
    - <function autodetect_root at 0x7f3b7d271f80>
    - <function autodetect_mounts at 0x7f3b7d272200>
    - <function autodetect_root_dm at 0x7f3b7d271940>
    - <function autodetect_init_mount at 0x7f3b7d271260>
    - <function get_kernel_metadata at 0x7f3b7d273420>
    - <function autodetect_modules at 0x7f3b7d273740>
    - <function autodetect_root_subvol at 0x7f3b7d2a53a0>
    - <function detect_argon2 at 0x7f3b7d2a5e40>
  init_early:
    - <function set_loglevel at 0x7f3b7d2368e0>
    - <function mount_fstab at 0x7f3b7d2723e0>
    - <function start_agent at 0x7f3b7d2a63e0>
  init_final:
    - <function do_switch_root at 0x7f3b7d236ac0>
  functions:
    - <function check_var at 0x7f3b7d236d40>
    - <function setvar at 0x7f3b7d236c00>
    - <function readvar at 0x7f3b7d236ca0>
    - <function prompt_user at 0x7f3b7d236de0>
    - <function retry at 0x7f3b7d236e80>
    - <function edebug at 0x7f3b7d236f20>
    - <function einfo at 0x7f3b7d236fc0>
    - <function ewarn at 0x7f3b7d237060>
    - <function eerror at 0x7f3b7d237100>
    - <function rd_fail at 0x7f3b7d236b60>
    - <function rd_restart at 0x7f3b7d236980>
    - <function _find_init at 0x7f3b7d2365c0>
    - <function mount_root at 0x7f3b7d2725c0>
    - <function parse_cmdline_bool at 0x7f3b7d270720>
    - <function parse_cmdline_str at 0x7f3b7d272a20>
    - <function get_crypt_dev at 0x7f3b7d2a6200>
  build_deploy:
    - <function generate_structure at 0x7f3b7d24b060>
    - <function deploy_dependencies at 0x7f3b7d24b380>
    - <function deploy_xz_dependencies at 0x7f3b7d24b420>
    - <function deploy_gz_dependencies at 0x7f3b7d24b4c0>
    - <function deploy_copies at 0x7f3b7d24b560>
    - <function deploy_nodes at 0x7f3b7d24b7e0>
    - <function deploy_symlinks at 0x7f3b7d24b600>
  build_final:
    - <function handle_usr_symlinks at 0x7f3b7d24b2e0>
    - <function generate_fstab at 0x7f3b7d270ea0>
    - <function regen_kmod_metadata at 0x7f3b7d273ba0>
    - <function get_archive_path at 0x7f3b7d2a4860>
  build_tasks:
    - <function export_mount_info at 0x7f3b7d2727a0>
    - <function export_root_target at 0x7f3b7d272840>
    - <function export_crypt_sources at 0x7f3b7d2a6020>
  init_pre:
    - <function mount_base at 0x7f3b7d272160>
    - <function export_exports at 0x7f3b7d272d40>
    - <function parse_cmdline at 0x7f3b7d272b60>
    - <function print_banner at 0x7f3b7d272de0>
    - <function load_modules at 0x7f3b7d2a42c0>
  init_mount_late:
    - <function mount_late at 0x7f3b7d272520>
  init_mount:
    - <function mount_cmdline_root at 0x7f3b7d272ca0>
  build_late:
    - <function process_modules at 0x7f3b7d2a4180>
    - <function process_ignored_modules at 0x7f3b7d273f60>
    - <function process_module_metadata at 0x7f3b7d2739c0>
  pack:
    - <function make_cpio at 0x7f3b7d2a4900>
  checks:
    - <function check_cpio_deps at 0x7f3b7d2a4400>
    - <function check_cpio_funcs at 0x7f3b7d2a45e0>
    - <function check_in_cpio at 0x7f3b7d2a4680>
    - <function check_included_funcs at 0x7f3b7d2a4c20>
    - <function check_in_file at 0x7f3b7d2a4d60>
  init_premount:
    - <function btrfs_scan at 0x7f3b7d2a5260>
    - <function set_root_subvol at 0x7f3b7d2a5940>
    - <function select_subvol at 0x7f3b7d2a56c0>
  init_main:
    - <function crypt_init at 0x7f3b7d2a6340>
  custom_init: <function custom_init at 0x7f3b7d2a6520>
validated: False
custom_parameters:
  init_target: <class 'pathlib.Path'>
  autodetect_init: <class 'bool'>
  loglevel: <class 'int'>
  shebang: <class 'str'>
  hostonly: <class 'bool'>
  validate: <class 'bool'>
  _custom_init_file: <class 'str'>
  tmpdir: <class 'pathlib.Path'>
  build_dir: <class 'pathlib.Path'>
  build_logging: <class 'bool'>
  _build_log_level: <class 'int'>
  symlinks: <class 'dict'>
  dependencies: <class 'zenlib.util.nodupflatlist.NoDupFlatList'>
  opt_dependencies: <class 'zenlib.util.nodupflatlist.NoDupFlatList'>
  xz_dependencies: <class 'zenlib.util.nodupflatlist.NoDupFlatList'>
  gz_dependencies: <class 'zenlib.util.nodupflatlist.NoDupFlatList'>
  library_paths: <class 'zenlib.util.nodupflatlist.NoDupFlatList'>
  find_libgcc: <class 'bool'>
  binaries: <class 'zenlib.util.nodupflatlist.NoDupFlatList'>
  copies: <class 'dict'>
  nodes: <class 'dict'>
  paths: <class 'zenlib.util.nodupflatlist.NoDupFlatList'>
  masks: <class 'dict'>
  out_dir: <class 'pathlib.Path'>
  out_file: <class 'str'>
  old_count: <class 'int'>
  clean: <class 'bool'>
  mounts: <class 'dict'>
  late_mounts: <class 'dict'>
  late_fstab: <class 'str'>
  auto_mounts: <class 'zenlib.util.nodupflatlist.NoDupFlatList'>
  mount_wait: <class 'bool'>
  mount_timeout: <class 'float'>
  mount_retries: <class 'int'>
  mount_cmd: <class 'str'>
  autodetect_root: <class 'bool'>
  autodetect_root_dm: <class 'bool'>
  autodetect_root_luks: <class 'bool'>
  autodetect_root_lvm: <class 'bool'>
  autodetect_root_raid: <class 'bool'>
  autodetect_init_mount: <class 'bool'>
  resolve_root_dev: <class 'bool'>
  _mounts: <class 'dict'>
  _vblk_info: <class 'dict'>
  _blkid_info: <class 'dict'>
  exports: <class 'dict'>
  cmdline_bools: <class 'zenlib.util.nodupflatlist.NoDupFlatList'>
  cmdline_strings: <class 'zenlib.util.nodupflatlist.NoDupFlatList'>
  _init_mount: <class 'zenlib.util.nodupflatlist.NoDupFlatList'>
  banner: <class 'str'>
  _kmod_removed: <class 'zenlib.util.nodupflatlist.NoDupFlatList'>
  _kmod_modinfo: <class 'dict'>
  _kmod_auto: <class 'zenlib.util.nodupflatlist.NoDupFlatList'>
  _kmod_dir: <class 'pathlib.Path'>
  _kernel_config_file: <class 'pathlib.Path'>
  kernel_version: <class 'str'>
  kmod_ignore: <class 'zenlib.util.nodupflatlist.NoDupFlatList'>
  kmod_pull_firmware: <class 'bool'>
  kmod_decompress_firmware: <class 'bool'>
  kmod_ignore_softdeps: <class 'bool'>
  kmod_autodetect_lsmod: <class 'bool'>
  kmod_autodetect_lspci: <class 'bool'>
  kernel_modules: <class 'zenlib.util.nodupflatlist.NoDupFlatList'>
  kmod_init: <class 'zenlib.util.nodupflatlist.NoDupFlatList'>
  no_kmod: <class 'bool'>
  cpio_rotate: <class 'bool'>
  mknod_cpio: <class 'bool'>
  cpio_compression: <class 'str'>
  _archive_out_path: <class 'pathlib.Path'>
  _cpio_archive: <class 'pycpio.pycpio.PyCPIO'>
  check_cpio: <class 'bool'>
  check_in_cpio: <class 'dict'>
  check_included_funcs: <class 'bool'>
  check_in_file: <class 'dict'>
  _base_mount_path: <class 'pathlib.Path'>
  root_subvol: <class 'str'>
  subvol_selector: <class 'bool'>
  autodetect_root_subvol: <class 'bool'>
  cryptsetup_key_type: <class 'str'>
  cryptsetup_keyfile_validation: <class 'bool'>
  cryptsetup_key_types: <class 'dict'>
  cryptsetup_retries: <class 'int'>
  cryptsetup_prompt: <class 'bool'>
  cryptsetup_autoretry: <class 'bool'>
  cryptsetup_trim: <class 'bool'>
  cryptsetup: <class 'dict'>
  argon2: <class 'bool'>
  gpg_agent_args: <class 'zenlib.util.nodupflatlist.NoDupFlatList'>
  console: <class 'dict'>
  primary_console: <class 'str'>
custom_processing:
  _process_loglevel: <function _process_loglevel at 0x7f3b7d236520>
  _process_init_target: <function _process_init_target at 0x7f3b7d52c5e0>
  _process_autodetect_init: <function _process_autodetect_init at 0x7f3b7d236700>
  _process_build_logging: <function _process_build_logging at 0x7f3b7d24be20>
  _process_out_file: <function _process_out_file at 0x7f3b7d24b6a0>
  _process_binaries_multi: <function _process_binaries_multi at 0x7f3b7d24ba60>
  _process_dependencies_multi: <function _process_dependencies_multi at 0x7f3b7d24bba0>
  _process_opt_dependencies_multi: <function _process_opt_dependencies_multi at 0x7f3b7d24bc40>
  _process_xz_dependencies_multi: <function _process_xz_dependencies_multi at 0x7f3b7d24bce0>
  _process_gz_dependencies_multi: <function _process_gz_dependencies_multi at 0x7f3b7d24bd80>
  _process_copies_multi: <function _process_copies_multi at 0x7f3b7d24bec0>
  _process_symlinks_multi: <function _process_symlinks_multi at 0x7f3b7d24bf60>
  _process_nodes_multi: <function _process_nodes_multi at 0x7f3b7d270040>
  _process_paths_multi: <function _process_paths_multi at 0x7f3b7d24b9c0>
  _process_masks_multi: <function _process_masks_multi at 0x7f3b7d2700e0>
  _process_hostonly: <function _process_hostonly at 0x7f3b7d270180>
  _process_validate: <function _process_validate at 0x7f3b7d270220>
  _process_mounts_multi: <function _process_mounts_multi at 0x7f3b7d270ae0>
  _process_late_mounts_multi: <function _process_late_mounts_multi at 0x7f3b7d270b80>
  _process_mount_timeout: <function _process_mount_timeout at 0x7f3b7d270a40>
  _process_kmod_init_multi: <function _process_kmod_init_multi at 0x7f3b7d273240>
  _process_kernel_modules_multi: <function _process_kernel_modules_multi at 0x7f3b7d2731a0>
  _process__kmod_auto_multi: <function _process__kmod_auto_multi at 0x7f3b7d2732e0>
  _process_root_subvol: <function _process_root_subvol at 0x7f3b7d2a4fe0>
  _process_subvol_selector: <function _process_subvol_selector at 0x7f3b7d2a51c0>
  _process_cryptsetup_multi: <function _process_cryptsetup_multi at 0x7f3b7d2a5b20>
  _process_cryptsetup_key_types_multi: <function _process_cryptsetup_key_types_multi at 0x7f3b7d2a5a80>
_processing:
init_target: /usr/bin/init
autodetect_init: True
loglevel: 5
shebang: #!/bin/bash -l
hostonly: True
validate: True
_custom_init_file: init_main.sh
tmpdir: /tmp
build_dir: initramfs_build
build_logging: False
_build_log_level: 10
symlinks:
  _auto_libreadline.so.8:
    source: /usr/lib64/libreadline.so.8.2
    target: /usr/lib64/libreadline.so.8
  _auto_libtinfow.so.6:
    source: /usr/lib64/libtinfow.so.6.4
    target: /usr/lib64/libtinfow.so.6
  _auto_libtinfo.so.6:
    source: /usr/lib64/libtinfo.so.6.4
    target: /usr/lib64/libtinfo.so.6
  _auto_libblkid.so.1:
    source: /usr/lib64/libblkid.so.1.1.0
    target: /usr/lib64/libblkid.so.1
  _auto_libmount.so.1:
    source: /usr/lib64/libmount.so.1.1.0
    target: /usr/lib64/libmount.so.1
  _auto_libpcre2-8.so.0:
    source: /usr/lib64/libpcre2-8.so.0.13.0
    target: /usr/lib64/libpcre2-8.so.0
  _auto_libsmartcols.so.1:
    source: /usr/lib64/libsmartcols.so.1.1.0
    target: /usr/lib64/libsmartcols.so.1
  _auto_modprobe:
    source: /usr/bin/kmod
    target: /usr/bin/modprobe
  _auto_libzstd.so.1:
    source: /usr/lib64/libzstd.so.1.5.6
    target: /usr/lib64/libzstd.so.1
  _auto_liblzma.so.5:
    source: /usr/lib64/liblzma.so.5.6.3
    target: /usr/lib64/liblzma.so.5
  _auto_libz.so.1:
    source: /usr/lib64/libz.so.1.3.1
    target: /usr/lib64/libz.so.1
  _auto_awk:
    source: /usr/bin/gawk
    target: /usr/bin/awk
  _auto_libcap.so.2:
    source: /usr/lib64/libcap.so.2.71
    target: /usr/lib64/libcap.so.2
  _auto_libacl.so.1:
    source: /usr/lib64/libacl.so.1.1.2302
    target: /usr/lib64/libacl.so.1
  _auto_libattr.so.1:
    source: /usr/lib64/libattr.so.1.1.2502
    target: /usr/lib64/libattr.so.1
  _auto_libuuid.so.1:
    source: /usr/lib64/libuuid.so.1.3.0
    target: /usr/lib64/libuuid.so.1
  _auto_liblzo2.so.2:
    source: /usr/lib64/liblzo2.so.2.0.0
    target: /usr/lib64/liblzo2.so.2
  _auto_libcryptsetup.so.12:
    source: /usr/lib64/libcryptsetup.so.12.10.0
    target: /usr/lib64/libcryptsetup.so.12
  _auto_libudev.so.1:
    source: /usr/lib64/libudev.so.1.7.7
    target: /usr/lib64/libudev.so.1
  _auto_libjson-c.so.5:
    source: /usr/lib64/libjson-c.so.5.4.0
    target: /usr/lib64/libjson-c.so.5
  _auto_libpopt.so.0:
    source: /usr/lib64/libpopt.so.0.0.2
    target: /usr/lib64/libpopt.so.0
  _auto_libbz2.so.1:
    source: /usr/lib64/libbz2.so.1.0.8
    target: /usr/lib64/libbz2.so.1
  _auto_libsqlite3.so.0:
    source: /usr/lib64/libsqlite3.so.0.8.6
    target: /usr/lib64/libsqlite3.so.0
  _auto_libgcrypt.so.20:
    source: /usr/lib64/libgcrypt.so.20.5.0
    target: /usr/lib64/libgcrypt.so.20
  _auto_libassuan.so.9:
    source: /usr/lib64/libassuan.so.9.0.0
    target: /usr/lib64/libassuan.so.9
  _auto_libnpth.so.0:
    source: /usr/lib64/libnpth.so.0.3.0
    target: /usr/lib64/libnpth.so.0
  _auto_libgpg-error.so.0:
    source: /usr/lib64/libgpg-error.so.0.38.0
    target: /usr/lib64/libgpg-error.so.0
  pinentry:
    source: /usr/bin/pinentry-tty
    target: /usr/bin/pinentry
dependencies:
  - /bin/bash
  - /lib64/ld-linux-x86-64.so.2
  - /usr/lib64/libreadline.so.8.2
  - /usr/lib64/libtinfow.so.6.4
  - /usr/lib64/libtinfo.so.6.4
  - /usr/lib64/libc.so.6
  - /usr/bin/lsblk
  - /usr/lib64/libblkid.so.1.1.0
  - /usr/lib64/libmount.so.1.1.0
  - /usr/lib64/libselinux.so.1
  - /usr/lib64/libpcre2-8.so.0.13.0
  - /usr/lib64/libsmartcols.so.1.1.0
  - /usr/lib64/libtinfow.so.6
  - /usr/bin/blkid
  - /usr/lib64/libblkid.so.1
  - /usr/bin/mount
  - /usr/lib64/libmount.so.1
  - /usr/lib64/libpcre2-8.so.0
  - /usr/bin/sleep
  - /usr/bin/umount
  - /usr/bin/mkdir
  - /usr/bin/kmod
  - /usr/lib64/libzstd.so.1.5.6
  - /usr/lib64/liblzma.so.5.6.3
  - /usr/lib64/libz.so.1.3.1
  - /usr/bin/gawk
  - /usr/lib64/libreadline.so.8
  - /usr/lib64/libm.so.6
  - /usr/bin/grep
  - /usr/bin/ls
  - /usr/lib64/libcap.so.2.71
  - /usr/bin/cp
  - /usr/lib64/libacl.so.1.1.2302
  - /usr/lib64/libattr.so.1.1.2502
  - /usr/bin/cat
  - /usr/bin/switch_root
  - /usr/bin/btrfs
  - /usr/lib64/libuuid.so.1.3.0
  - /usr/lib64/libz.so.1
  - /usr/lib64/liblzo2.so.2.0.0
  - /usr/lib64/libzstd.so.1
  - /usr/bin/cryptsetup
  - /usr/lib64/libcryptsetup.so.12.10.0
  - /usr/lib64/libdevmapper.so.1.02
  - /usr/lib64/libudev.so.1.7.7
  - /usr/lib64/libcap.so.2
  - /usr/lib64/libcrypto.so.3
  - /usr/lib64/libjson-c.so.5.4.0
  - /usr/lib64/libpopt.so.0.0.2
  - /usr/lib64/libuuid.so.1
  - /usr/bin/agetty
  - /usr/bin/gpg
  - /usr/lib64/libbz2.so.1.0.8
  - /usr/lib64/libsqlite3.so.0.8.6
  - /usr/lib64/libgcrypt.so.20.5.0
  - /usr/lib64/libassuan.so.9.0.0
  - /usr/lib64/libnpth.so.0.3.0
  - /usr/lib64/libgpg-error.so.0.38.0
  - /usr/bin/gpg-agent
  - /usr/lib64/libgcrypt.so.20
  - /usr/lib64/libassuan.so.9
  - /usr/lib64/libnpth.so.0
  - /usr/lib64/libgpg-error.so.0
  - /usr/bin/gpgconf
  - /usr/bin/gpg-connect-agent
  - /usr/bin/pinentry-tty
  - /usr/libexec/keyboxd
  - /usr/lib/gcc/x86_64-pc-linux-gnu/14/libgcc_s.so.1
opt_dependencies:
xz_dependencies:
gz_dependencies:
library_paths:
  - /lib64
  - /usr/lib64
  - /usr/lib/gcc/x86_64-pc-linux-gnu/14
find_libgcc: True
binaries:
  - /bin/bash
  - lsblk
  - blkid
  - mount
  - sleep
  - umount
  - mkdir
  - modprobe
  - awk
  - grep
  - ls
  - cp
  - cat
  - switch_root
  - btrfs
  - cryptsetup
  - agetty
  - /usr/bin/gpg
  - /usr/bin/gpg-agent
  - /usr/bin/gpgconf
  - /usr/bin/gpg-connect-agent
  - /usr/bin/pinentry-tty
copies:
nodes:
  console:
    mode: 420
    major: 5
    minor: 1
    path: dev/console
paths:
  - target_rootfs
  - proc
  - sys
  - dev
  - run
  - root
  - boot
masks:
out_dir: /tmp/initramfs_out
out_file:
old_count: 1
clean: True
mounts:
  root:
    options:
      + ro
    destination: /target_rootfs
    base_mount: False
    label: rootfs
  proc:
    type: proc
    path: proc
    options:
      + noexec
      + nodev
      + nosuid
    base_mount: True
    destination: /proc
  sys:
    type: sysfs
    path: sysfs
    options:
      + noexec
      + nodev
      + nosuid
    base_mount: True
    destination: /sys
  dev:
    type: devtmpfs
    path: devtmpfs
    options:
      + nosuid
      + mode=0755
    base_mount: True
    destination: /dev
  run:
    type: tmpfs
    path: tmpfs
    base_mount: True
    destination: /run
    options:
  boot:
    type: ext4
    uuid: f234eaac-e62e-4ccb-a4c2-5e6f15e5a1dc
    destination: /boot
    base_mount: False
    options:
late_mounts:
late_fstab: /etc/fstab.late
auto_mounts:
  - /boot
mount_wait: True
mount_timeout: 2
mount_retries: 5
mount_cmd:
autodetect_root: True
autodetect_root_dm: True
autodetect_root_luks: True
autodetect_root_lvm: True
autodetect_root_raid: True
autodetect_init_mount: True
resolve_root_dev: False
_mounts:
  /:
    device: /dev/dm-0
    fstype: btrfs
    options:
      - rw
      - relatime
      - ssd
      - space_cache=v2
      - subvolid=5
      - subvol=/
  /proc:
    device: proc
    fstype: proc
    options:
      - rw
      - nosuid
      - nodev
      - noexec
      - relatime
  /sys:
    device: sys
    fstype: sysfs
    options:
      - ro
      - nosuid
      - nodev
      - noexec
      - relatime
  /sys/firmware/efi/efivars:
    device: efivarfs
    fstype: efivarfs
    options:
      - rw
      - nosuid
      - nodev
      - noexec
      - relatime
  /dev:
    device: udev
    fstype: devtmpfs
    options:
      - rw
      - nosuid
      - relatime
      - size=10240k
      - nr_inodes=985138
      - mode=755
      - inode64
  /dev/pts:
    device: devpts
    fstype: devpts
    options:
      - rw
      - nosuid
      - noexec
      - relatime
      - gid=5
      - mode=620
      - ptmxmode=000
  /dev/shm:
    device: shm
    fstype: tmpfs
    options:
      - rw
      - nosuid
      - nodev
      - relatime
      - inode64
  /run:
    device: tmpfs
    fstype: tmpfs
    options:
      - rw
      - nosuid
      - nodev
      - noexec
      - mode=755
      - inode64
  /tmp:
    device: tmp
    fstype: tmpfs
    options:
      - rw
      - nosuid
      - nodev
      - inode64
  /etc/resolv.conf:
    device: LiveOS_rootfs
    fstype: overlay
    options:
      - rw
      - relatime
      - lowerdir=/run/rootfsbase
      - upperdir=/run/overlayfs
      - workdir=/run/ovlwork
      - uuid=on
  /efi:
    device: /dev/sda1
    fstype: vfat
    options:
      - rw
      - relatime
      - fmask=0022
      - dmask=0022
      - codepage=437
      - iocharset=ascii
      - shortname=mixed
      - errors=remount-ro
  /boot:
    device: /dev/sda2
    fstype: ext4
    options:
      - rw
      - relatime
_vblk_info:
  dm-0:
    major: 253
    minor: 0
    holders:
    slaves:
      - nvme0n1p1
    uuid: CRYPT-LUKS2-2d5908e6b84944fb8d0f84152e9808d4-root
    name: root
_blkid_info:
  /dev/loop0:
    type: squashfs
  /dev/mapper/root:
    uuid: 01a18c87-ae4d-41f0-846d-b25ee3793e04
    label: rootfs
    type: btrfs
  /dev/sda2:
    uuid: f234eaac-e62e-4ccb-a4c2-5e6f15e5a1dc
    partuuid: 6194216e-0cca-437b-b495-2960eac0e0d5
    label: boot
    type: ext4
  /dev/sda1:
    uuid: 5D30-0F3B
    partuuid: 4dc01688-639f-473f-9a40-3d71dc646050
    type: vfat
  /dev/nvme0n1p1:
    partuuid: d1eb3d74-7206-4d77-adbb-a4e2c3dec1e2
  /dev/dm-0:
    uuid: 01a18c87-ae4d-41f0-846d-b25ee3793e04
    label: rootfs
    type: btrfs
exports:
  loglevel: 5
  init: /usr/bin/init
cmdline_bools:
  - quiet
  - debug
  - recovery
  - rootwait
cmdline_strings:
  - init
  - root
  - roottype
  - rootflags
  - rootdelay
  - loglevel
_init_mount:
banner: einfo "UGRD v$(readvar VERSION)"
_kmod_removed:
_kmod_modinfo:
_kmod_auto:
  - dm_mod
  - sd_mod
_kmod_dir: .
_kernel_config_file: .
kernel_version:
kmod_ignore:
  - snd
  - soundcore
  - pcspkr
  - snd_hda_core
  - snd_hda_codec
  - snd_hda_ext_core
  - snd_hwdep
  - snd_timer
  - snd_hrtimer
  - snd_pcm
  - snd_rawmidi
  - snd_seq_device
  - snd_seq
  - snd_seq_dummy
  - snd_ump
  - snd_usb_audio
  - snd_usbmidi_lib
  - snd_soc_core
  - snd_soc_acpi
  - snd_acp_config
  - snd_soc_acpi_intel_match
  - snd_sof
  - snd_sof_utils
  - snd_sof_pci
  - snd_sof_xtensa_dsp
  - snd_sof_intel_hda
  - snd_sof_intel_hda_common
  - snd_hda_intel
  - snd_intel_sdw_acpi
  - snd_intel_dspcfg
  - ac97_bus
  - snd_rpl_pci_acp6x
  - snd_rn_pci_acp3x
  - snd_pci_acp3x
  - snd_hda_codec_hdmi
  - soundwire_cadence
  - soundwire_bus
  - soundwire_generic_allocation
  - ledtrig_audio
  - video
  - videodev
  - ttm
  - gpu_sched
  - uvcvideo
  - uvc
  - drm_kms_helper
  - drm_display_helper
  - drm_buddy
  - drm_ttm_helper
  - amdgpu
  - radeon
  - amdxcp
  - nouveau
  - nvidia
  - nvidia_drm
  - ast
  - mgag200
  - videobuf2_common
  - videobuf2_v4l2
  - drm_suballoc_helper
  - videobuf2_vmalloc
  - videobuf2_memops
  - rfkill
  - bluetooth
  - cfg80211
  - mac80211
  - iwlwifi
  - iwlmvm
  - btusb
  - btintel
  - btrtl
  - btbcm
  - btmtk
  - mt76
  - mt76x2_common
  - mt7921_common
  - mt76x0_common
  - mt76_usb
  - mt76x02_lib
  - cdc_acm
  - cdc_ncm
  - cdc_wdm
  - cdc_ether
  - stp
  - 8021q
  - llc
  - garp
  - mrp
  - bridge
  - bonding
  - r8169
  - r8152
  - r8153_ecm
  - igb
  - ixgbe
  - tg3
  - e1000e
  - e1000
  - tun
  - tap
  - wireguard
  - udp_tunnel
  - ip6_udp_tunnel
  - net_failover
  - failover
  - vhost_net
  - usbnet
  - tls
  - sctp
  - rtl2832
  - r820t
  - dvb_usb_rtl28xxu
  - dvb_core
  - dvb_usb_v2
  - grace
  - nfs_acl
  - nfsd
  - lockd
  - sunrpc
  - auth_rpcgss
  - nfs
  - netfs
  - nf_nat
  - nfnetlink
  - nfnetlink_queue
  - nfnetlink_log
  - nf_conntrack
  - nf_conntrack_netlink
  - nf_defrag_ipv4
  - nf_defrag_ipv6
  - nf_reject_ipv4
  - nf_reject_ipv6
  - iptable_filter
  - ip_tables
  - ip6table_filter
  - ip6_tables
  - xt_MASQUERADE
  - xt_conntrack
  - xt_CHECKSUM
  - xt_addrtype
  - xt_comment
  - xt_mark
  - xt_multiport
  - xt_nat
  - xt_recent
  - xt_set
  - xt_tcpudp
  - xt_u32
  - ip6table_nat
  - iptable_nat
  - iptable_mangle
  - ip6table_mangle
  - ipt_REJECT
  - ip6t_REJECT
  - kvm
  - kvm_amd
  - kvm_intel
  - ch341
  - cp210x
  - joydev
  - binfmt_misc
  - wmi
  - xpad
  - coretemp
  - x86_pkg_temp_thermal
  - k10temp
  - iTCO_wdt
  - iTCO_vendor_support
  - sp5100_tco
  - intel_qat
  - intel_powerclamp
  - intel_cstate
  - rapl
  - intel_rapl_common
  - intel_rapl_msr
  - intel_pmc_bxt
  - i2c_piix4
  - spi_intel_pci
  - i2c_ismt
  - i2c_i801
kmod_pull_firmware: True
kmod_decompress_firmware: True
kmod_ignore_softdeps: False
kmod_autodetect_lsmod: False
kmod_autodetect_lspci: True
kernel_modules:
  - uas
  - usbcore
  - scsi_mod
  - ehci_hcd
  - ohci_hcd
  - uhci_hcd
  - xhci_hcd
  - btrfs
  - dm_crypt
  - ext4
kmod_init:
  - uas
  - usbcore
  - scsi_mod
  - ehci_hcd
  - ohci_hcd
  - uhci_hcd
  - xhci_hcd
  - btrfs
  - dm_crypt
  - ext4
no_kmod: False
cpio_rotate: True
mknod_cpio: True
cpio_compression: xz
_archive_out_path: .
_cpio_archive:
check_cpio: True
check_in_cpio:
check_included_funcs: True
check_in_file:
_base_mount_path: /root_base
root_subvol:
subvol_selector: False
autodetect_root_subvol: True
cryptsetup_key_type:
cryptsetup_keyfile_validation: True
cryptsetup_key_types:
  keyfile:
    key_command: cat {key_file} |
  gpg:
    key_command: gpg --decrypt {key_file}
cryptsetup_retries: 5
cryptsetup_prompt: False
cryptsetup_autoretry: True
cryptsetup_trim: False
cryptsetup:
  root:
    partuuid: d1eb3d74-7206-4d77-adbb-a4e2c3dec1e2
    key_type: gpg
    key_file: /boot/crypt_key.luks.gpg
    header_file: /boot/luks_header.img
    key_command: gpg --decrypt /boot/crypt_key.luks.gpg
    retries: 5
argon2: False
gpg_agent_args:
console:
  tty0:
    type: tty
primary_console: tty0

ERROR    | Unknown device mapper device type: None
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/ugrd/main.py", line 66, in main
    generator.build()
  File "/usr/lib/python3.12/site-packages/ugrd/initramfs_generator.py", line 76, in build
    self.run_build()
  File "/usr/lib/python3.12/site-packages/ugrd/initramfs_generator.py", line 207, in run_build
    self.run_hook(task, force_exclude=True)
  File "/usr/lib/python3.12/site-packages/ugrd/initramfs_generator.py", line 126, in run_hook
    if function_output := self.run_func(function, *args, **kwargs):
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ugrd/initramfs_generator.py", line 92, in run_func
    if function_output := function(self):
                          ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/zenlib/util/dict_check.py", line 36, in _contains
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/zenlib/util/dict_check.py", line 36, in _contains
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ugrd/fs/mounts.py", line 415, in autodetect_root_dm
    _autodetect_dm(self, '/')
  File "/usr/lib/python3.12/site-packages/zenlib/util/dict_check.py", line 36, in _contains
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ugrd/fs/mounts.py", line 382, in _autodetect_dm
    raise RuntimeError("Unknown device mapper device type: %s" % blkid_info.get('type'))
RuntimeError: Unknown device mapper device type: None


FILE /etc/ugrd/config.toml
Code:

# This config will decrypt the LUKS volume with uuid "fdf442da-0574-4531-98c7-55227a041f1d", mapping it to "/dev/mapper/root"
# It will attempt to mount the btrfs volume with label "rootfs" to /target_rootfs
# It will pull all current kernel modules from lspci -k results
# It will try to process the cmdline and mount the rootfs based on the root= parameter

modules = [
  "ugrd.kmod.standard_mask",
  "ugrd.kmod.usb",
  "ugrd.fs.btrfs",
  "ugrd.crypto.cryptsetup", # This is included by the gpg module
  "ugrd.crypto.gpg", # This is included by the smartcard module
#  "ugrd.crypto.smartcard",   
]

# Mask the parse_cmdline function to prevent it from running
#mask.init_pre = 'parse_cmdline'

# The initramfs will be built in /tmp/initramfs if "build_dir" is not specified not specified
#out_dir = "/usr/src/initramfs"


# Optionally supply a kernel version, uses the current kernel version if not specified
#kernel_version = "6.1.53-gentoo-dist"
# lspci based detection is usually helpful
kmod_autodetect_lspci = true
# lsmod detection can be helpful, but can bring in unnecessary modules
kmod_autodetect_lsmod = false

# Wait a few seconds for storage to settle after modules are loaded if external or slow storage is used
mount_wait = true
mount_timeout = 2

# The location of the gpg public key, if using a smartcard and gpg encrypted keyfile
#sc_public_key = "/etc/ugrd/pubkey.gpg"

 auto_mounts = ['/boot']  # Automatically create mount config for /boot on the host

# Optionally specify the root mountpoint information manually
[mounts.root]
# The label of the root filesystem, a uuid or partuuid could be used instead
label = "rootfs"

# This is necessary if the keyfile is on another device.
# The keyfile could be added as a dependency. if it's on the same device.
#[mounts.boot]
#type = "ext4"
#uuid = "f234eaac-e62e-4ccb-a4c2-5e6f15e5a1dc"


# If the root is a LUKS volume, specify the LUKS volume information
[cryptsetup.root]
# The UUID of the encrypted volume, mounted at /dev/mapper/root
partuuid = "d1eb3d74-7206-4d77-adbb-a4e2c3dec1e2"
# If a GPG encrypted key file is used, the key_type must be set to gpg.
key_type = "gpg"
# The key file must either be included as a dependency, or it must be under an external mountpoint.
key_file = "/boot/crypt_key.luks.gpg"
header_file = "/boot/luks_header.img"


blkid:
Code:

/dev/loop0: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/mapper/root: LABEL="rootfs" UUID="01a18c87-ae4d-41f0-846d-b25ee3793e04" UUID_SUB="50283392-a10c-4a99-8ae7-5b5375dac73b" BLOCK_SIZE="4096" TYPE="btrfs"
/dev/sda2: LABEL="boot" UUID="f234eaac-e62e-4ccb-a4c2-5e6f15e5a1dc" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="6194216e-0cca-437b-b495-2960eac0e0d5"
/dev/sda1: UUID="5D30-0F3B" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="4dc01688-639f-473f-9a40-3d71dc646050"
/dev/nvme0n1p1: PARTUUID="d1eb3d74-7206-4d77-adbb-a4e2c3dec1e2"


lsblk:
Code:

NAME        MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
loop0         7:0    0 511.4M  1 loop 
sda           8:0    1  57.7G  0 disk 
├─sda1        8:1    1     1G  0 part  /efi
└─sda2        8:2    1     1G  0 part  /boot
nvme0n1     259:0    0 238.5G  0 disk 
└─nvme0n1p1 259:1    0 238.5G  0 part 
  └─root    253:0    0 238.5G  0 crypt /
Back to top
View user's profile Send private message
zen_desu
Tux's lil' helper
Tux's lil' helper


Joined: 25 Oct 2024
Posts: 102

PostPosted: Tue Jan 14, 2025 4:58 pm    Post subject: Reply with quote

Sorry it didn't work for you at first, I think the stable version is 1.24.2 which is somewhat old at this point. I've been testing the current 9999 (1.30.1) quite a lot the last few days and I'm getting ready for a release.

For what it's worth, you config can probably be minimized a bit:

Code:

modules = [
  "ugrd.crypto.gpg", # This is included by the smartcard module
#  "ugrd.crypto.smartcard",   
]

auto_mounts = ['/boot']  # Automatically create mount config for /boot on the host

# If the root is a LUKS volume, specify the LUKS volume information
[cryptsetup.root]
# If a GPG encrypted key file is used, the key_type must be set to gpg.
key_type = "gpg"
# The key file must either be included as a dependency, or it must be under an external mountpoint.
key_file = "/boot/crypt_key.luks.gpg"
header_file = "/boot/luks_header.img"


Older versions required a lot more stuff was explicitly defined, but the latest version should auto detect a lot more (including USB modules if it sees your /boot is on a USB)
In most cases it's not necessary to define device info such as uuids or labels, if it's able to autodetect it. If it's not able to, it'll raise an AutodetectError and describe the issue (without a full traceback and dump like older versions). Defining it manually is fine but with validation, it will compare that value to what is set on the system currently.
_________________
µgRD dev
Wiki writer
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum