aboutsummaryrefslogtreecommitdiff
path: root/doc
Commit message (Collapse)AuthorAgeFilesLines
* manpage: Update rootfstype documentationThomas Deutschmann2020-09-021-1/+2
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/linuxrc: Add gk.udev.debug to run udevd in debug modeThomas Deutschmann2020-08-281-0/+4
| | | | | | | When gk.udev.debug=yes is set (boolean option), udevd will run in debug mode. Output will be written to /run/initramfs/udevd.log. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/linuxrc: Always preserve logThomas Deutschmann2020-08-281-12/+1
| | | | | | | | | | Now that we are using UDEV and have to preserve /run, we can also use /run to always store log from initramfs. This will make debugging easier because user don't have to explicit enable logging (disabling is still possible). Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Remove --disklabel optionThomas Deutschmann2020-08-281-4/+0
| | | | | | | Now that we always build util-linux for switch_root, we no longer need this option. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/linuxrc: Disable processing of modules_load file by defaultThomas Deutschmann2020-08-261-6/+11
| | | | | | | | | | | Now that we are using (e)udev with kmod support, we can rely on UDEV to load required kernel modules. Old module loading based on modules_load file can still be enabled via boolean "gk.hw.use-modules_load" kernel command-line option which is inverting and replacing previous "nodetect" kernel command-line option. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Rename INSTALL_MOD_PATH option to KERNEL_MODULES_PREFIXThomas Deutschmann2020-08-031-3/+3
| | | | | | | | | | Before this change we had different names in config file and command-line for the same thing. With this change we have one option named KERNEL_MODULES_PREFIX and its corresponding --kernel-modules-prefix command-line argument. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Switch from MDEV to UDEVThomas Deutschmann2020-07-241-0/+4
| | | | | | | | | We need to switch from using MDEV to UDEV to avoid boot problems due to timeouts caused by some UDEV rules from real system when real system is using systemd. Bug: https://bugs.gentoo.org/706434 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* linuxrc: Add gk.userinteraction.disabledThomas Deutschmann2020-07-161-0/+8
| | | | | | | | When this option is set and enabled, genkernel initramfs will not prompt on errors, i.e. this will disable any user interaction, e.g. for a kiosk system. Bug: https://bugs.gentoo.org/730966 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Add ZSTD compression support for initramfsThomas Deutschmann2020-07-161-1/+2
| | | | | Bug: https://bugs.gentoo.org/731294 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_initramfs.sh: create_initramfs(): Move and unify validation of ↵Thomas Deutschmann2020-07-161-3/+7
| | | | | | | | | | | | | | | --compress-initramfs-type to determine_real_args() This will allow us to error out early if required user space tool needed to compress initramfs based on specified --compress-initramfs-type is missing or selected type is invalid/unsupported. Best/fastest list is based on results from [Link1][Link2][Link3]. Link1: https://events.static.linuxfound.org/sites/events/files/lcjpcojp13_klee.pdf Link2: https://kernel.ubuntu.com/~cking/boot-speed-eoan-5.3/kernel-compression-method.txt Link3: https://lwn.net/Articles/817134/ Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Document lz4 compression supportRichard Yao2020-05-251-1/+1
| | | | | | Signed-off-by: Richard Yao <ryao@gentoo.org> Closes: https://github.com/gentoo/genkernel/pull/15 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Make kernel config filename customizableThomas Deutschmann2020-03-041-0/+6
| | | | | | | | This commit will make kernel config filename used by --save-config feature customizable like previous commit 769a07fd3e947 did for initramfs and kernel image. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Add b2sumThomas Deutschmann2020-02-151-0/+4
| | | | | | | b2sum can be used to verify (boot) media since commit 5c55dd467a563623f16be27f670b5a3ddc79fb02. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/config.sh: Use --buildpkg=n and --usepkg=n in DEFAULT_MODULEREBUILD_CMDThomas Deutschmann2020-01-291-1/+1
| | | | | | | | | While we call emerge with "--ignore-default-opts" since commit da5a5fa797a5fffa6c4d694cbfe2edc83bab4890 to avoid conflicting emerge options, we also need to ensure that we don't clash with problematic emerge FEATURES like "getbinpkg". Reported-by: Rick Farina <zerochaos@gentoo.org> Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/config.sh: Use --quiet-build=y in DEFAULT_MODULEREBUILD_CMDThomas Deutschmann2020-01-121-1/+1
| | | | | | | | | --quiet-build=y instead of just --quiet will output error message in case emerge failed. Because we catch output this will make genkernel.log a single point of truth logfile without the need to consult any additional logfile. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* --module-rebuild: Call emerge with --ignore-default-optsThomas Deutschmann2020-01-111-4/+11
| | | | | | | | | | | | | It's possible that user has set conflicting emerge options like "--ask" in EMERGE_DEFAULT_OPTS which could break genkernel. Calling emerge with --ignore-default-opts will allow us to avoid such scenarios. In addition, --module-rebuild-cmd (MODULEREBUILD_CMD) option was added to allow user to alter default command. Closes: https://bugs.gentoo.org/705082 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* genkernel.conf: Disable MICROCODE_INITRAMFS option by defaultThomas Deutschmann2019-12-041-0/+3
| | | | | | | Embedding microcode updates into initramfs is deprecated when system is able to load multiple initramfs. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* initrd.scripts: modules_load() refactoredThomas Deutschmann2019-11-241-0/+7
| | | | | | | | | | | | | | | | | - Add support for LABEL/UUID in root kernel parameter - When loading network, always load all network modules even when root block device is already available - Always load crypto and USB module group when CRYPT_{ROOT,SWAP} is set. - Always load fs module group. - Add gk.hw.load-all kernel command-line argument to allow user to force loading of all module groups. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Add support for a custom font at bootThomas Deutschmann2019-11-241-0/+15
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Add --utils-cxx optionThomas Deutschmann2019-09-301-1/+4
| | | | | | | | | | | To compile thin-provisioning-tools, required for LVM thin provisioning support which was added in commit 9dea735590ebfff278710148fa8743777a18c4bd, we need a C++ compiler. This option will allow user to specify custom C++ compiler (for example when using ccache/distcc). Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* manpage: Add documentation about initramfs.mounts fileThomas Deutschmann2019-08-071-0/+14
| | | | | Bug: https://bugs.gentoo.org/560710 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* initrd.scripts: prompt_user(): Read answer from $GK_PROMPT_FILE on timeoutThomas Deutschmann2019-08-071-0/+9
| | | | | | | | | | | | | | | | | | | | This commit will bring back read timeout which was removed in Commit a280829. Read timeout is still disabled by default but can now be controlled via gk.prompt.timeout kernel command-line argument. When gk.prompt.timeout is != 0, the current prompt will be written to $GK_PROMPT_FILE. This will allow remote user to notice that there's a prompt. In addition, on timeout, $GK_PROMPT_FILE will be read allowing remote user to answer prompt and hopefully to fix the problem and resume booting. To make this work, gk.prompt.timeout will be set to 30 seconds by default when SSH usage is enabled. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* linuxrc: Log initramfs output/commandsThomas Deutschmann2019-08-071-0/+16
| | | | | | | | | | | | | | | | | | By default, any {bad,good,warn}_msg output and external command calls will now be logged to /tmp/init.log in initramfs. This can be turned off via gk.log.disabled={1,yes} kernel command-line argument. This is especially helpful when working with remote servers when you can access initramfs system through SSH. In addition, initramfs' log file can be preserved, i.e. copied to real system just before switch_root call. This can be controlled via gk.log.keep kernel command-line argument: When just enabled, initramfs will copy log to $NEWROOT/genkernel-boot.log. Keep in my that the file path must be accessible for initramfs and by default, initramfs will only mount / as $NEWROOT and no additional mountpoints. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* manpage: Clarify that dosshd will start networkv4.0.0_beta10Thomas Deutschmann2019-07-291-2/+3
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Add --kernel-append-localversion optionThomas Deutschmann2019-07-291-0/+6
| | | | | | | | | | | | | | | | | | Now that we moved $ARCH value to kernel's LOCALVERSION setting, you cannot easily change LOCALVERSION anymore without losing $ARCH information. This can be annoying when you just want to build a new revision which should have its own kernel binary, initramfs and modules directory because you would have to remember to include default value. The new option will allow you to just append to genkernel's KERNEL_LOCALVERSION value. This way you can just call genkernel with --kernel-append-localversion=-rN option to build and test a new revision. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Change kernel and initramfs default filename in $BOOTDIRThomas Deutschmann2019-07-291-5/+16
| | | | | | | | | | | | | | | | | | This commit will change default kernel and initramfs filename: kernel-genkernel-%%ARCH%%-%%KV%% -> vmlinuz-%%KV%% System.map-genkernel--%%ARCH%%-%%KV%% -> System.map-%%KV%% initramfs-genkernel-%%ARCH%%-%%KV%% -> initramfs-%%KV%%.img The new naming will be consistent with kernel's "make install" and will allow to match files in /lib/modules with actual kernel. In addition, $ARCH value was moved to kernel's LOCALVERSION. This will ensure that this information is still present and when you do cross-compilation, that /lib/modules content don't get mixed. Bug: https://bugs.gentoo.org/390407 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Make initramfs and kernel filename customizableThomas Deutschmann2019-07-291-13/+77
| | | | | | | | | | | | | New options like --initramfs-filename or --kernel-filename will allow user to customize filenames used when installing initramfs or kernel into $BOOTDIR. Therefore --kernelname (KNAME) option was removed. Filename can contain placeholders like '%%ARCH%%' which will get replaced at runtime. Man page contains more information. Bug: https://bugs.gentoo.org/395095 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Update help text and man pageThomas Deutschmann2019-07-281-17/+30
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Add feature to check for free disk space early at genkernel startv4.0.0_beta9Thomas Deutschmann2019-07-231-0/+8
| | | | | | | | | | | | To avoid preventable errors like running out of disk space while building a new kernel, two new options, --check-free-disk-space-bootdir and --check-free-disk-space-kerneloutputdir, were added. When set, disabled by default, genkernel will check early before starting to build kernel/initramfs for specified amount of free disk space. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Rename --tempdir option to --tmpdir to match used variable namev4.0.0_beta8Thomas Deutschmann2019-07-211-1/+1
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* manpage: Add missing --utils-cflags optionThomas Deutschmann2019-07-211-0/+3
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Add --kernel-localversion optionThomas Deutschmann2019-07-211-0/+4
| | | | | | | This option will set/unset kernel option CONFIG_LOCALVERSION. Closes: https://bugs.gentoo.org/521774 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Add --no-sandbox optionThomas Deutschmann2019-07-211-0/+3
| | | | | | | This option is useful when you are calling genkernel within a sandboxed environment, i.e. when using genkernel within an ebuild. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* linuxrc: Load network modules only when neededv4.0.0_beta6Thomas Deutschmann2019-07-181-0/+3
| | | | | | | | | | | | To avoid problems related to drivers requiring special firmware which might be not available when loading the module because the user don't really need that module but it was added based on genkernel's module_load file, we will no longer load network modules on boot. Instead we will only load network modules when needed, for example when dosshd is set or NFS is used. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* manpage: Fix gk.net.dhcp.retries entryThomas Deutschmann2019-07-181-3/+3
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Add "--module-rebuild" parameterThomas Deutschmann2019-07-151-0/+6
| | | | | | | | | | | MODULEREBUILD option will be enabled by default. When enabled and we are building a non-static kernel for the same host (no cross-compile!), also building modules and install into into a non-custom location, we will now call `emerge @module-rebuild`. Closes: https://bugs.gentoo.org/453372 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* manpage: Add Gentoo developer "whissi" as authorThomas Deutschmann2019-07-141-0/+1
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Add bcache supportThomas Deutschmann2019-07-141-0/+4
| | | | | | | Kernel command-line argument only, adds "dobcache". Bug: https://bugs.gentoo.org/605094 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Add --xfsprogs supportThomas Deutschmann2019-07-141-0/+3
| | | | | Bug: https://bugs.gentoo.org/407999 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Rework --ssh supportThomas Deutschmann2019-07-141-3/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - To enable sshd in initramfs user MUST now set "dosshd" kernel command-line parameter. - "gk.sshd.wait" kernel command-line parameter was added to interrupt boot process for X seconds to allow for remote login (can be used like an remote rescue shell). - For remote unlock of LUKS-encrypted root or swap device, user can still send unencrypted keyfile via SSH like $ cat ~/root.unencrypted.key | ssh root@<remote-host> -C post root or user can now just SSH into the remote host and call "unlock-luks" like remote rescueshell ~ # unlock-luks root to get a cryptsetup prompt. NOTE: When manually unlocking the encrypted LUKS device, user must call "resume-boot" afterwards to resume booting. - "--ssh-authorized-keys-file" parameter added which can be used to specify a different file than default "/etc/dropbear/authorized_keys" file. - "--ssh-host-keys" parameter added to control if in initramfs embedded sshd should create its own pair of hosts keys (which will be stored in "/etc/dropbear for re-use, default), use host keys from host system or should generate host keys at runtime on each boot. - "ip" kernel command-line parameter will now default to DHCP usage but does also support addr/CIDR notation to specify a static address. - "gk.net.iface" kernel command-line parameter was added to use a different interface than "eth0". You can either use an interface name or use a MAC address. - "gk.net.gw" kernel command-line parameter was added which will allow user to set specific gateway when DHCP isn't used. - "gk.net.routes" kernel command-line parameter was added which will allow user to set additional routes when DHCP isn't used. Please read manpage for additional parameters and more details. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Rework cross-compile supportThomas Deutschmann2019-07-141-13/+5
| | | | | | | | | | | | | - Add new "--cross-compile" parameter which will accept a target triplet and replaces "--arch-override", "--utils-arch", "--utils-cross-compile" and "--kernel-cross-compile" parameter. - Add "--utils-cflags" to allow user to overwrite CFLAGS used for compiling programs for initramfs. - Add tc-* functions. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_package.sh: Refactor gen_modulespackage()Thomas Deutschmann2019-07-141-2/+3
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_package.sh: Refactor gen_minkernpackage()Thomas Deutschmann2019-07-141-3/+3
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_package.sh: Refactor gen_kerncache()Thomas Deutschmann2019-07-141-4/+4
| | | | | | | | | | - Make use of tar's auto-compress feature, i.e. use archive suffix to determine the compression program. - get_tar_cmd() function added which will try to return tar command utilizing pbzip2, pxz or pigz when possible. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* manpage: Sort contentThomas Deutschmann2019-07-141-6/+6
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* manpage: Add missing "--no-oldconfig" parameterThomas Deutschmann2019-07-141-3/+3
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* "--debug-cleanup" parameter renamed to "--cleanup"Thomas Deutschmann2019-07-141-1/+1
| | | | | | --cleanup or --no-cleanup should be clearer. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Add special value "default" for --kernel-config parameterThomas Deutschmann2019-03-291-1/+3
| | | | | | | | | | --kernel-config=default will make genkernel to ignoring all user kernel configurations so that genkernel will use default kernel configuration shipped with genkernel to build a kernel. Useful to start from scratch if needed or for debugging. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* documentation: remove notes regarding static buildsThomas Deutschmann2019-03-291-2/+2
| | | | | | | | | | - sys-fs/cryptsetup[static] is not required, follow up of commit b79bf458363f70195715111468f445144e96b7e0 - Since commit 265363f79df5a545dc47547dbee76972b387e9b7, we always build our own static sys-fs/lvm2 to help dmraid users. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* documentation: mark --[no-]compress-initrd as deprecatedThomas Deutschmann2019-03-291-1/+4
| | | | | | Let's move user to --[no-]compress-initramfs for more consistency. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>