2023-08-22T01:30:36,619 Created temporary directory: /tmp/pip-build-tracker-v9cjistv 2023-08-22T01:30:36,622 Initialized build tracking at /tmp/pip-build-tracker-v9cjistv 2023-08-22T01:30:36,623 Created build tracker: /tmp/pip-build-tracker-v9cjistv 2023-08-22T01:30:36,623 Entered build tracker: /tmp/pip-build-tracker-v9cjistv 2023-08-22T01:30:36,624 Created temporary directory: /tmp/pip-wheel-yb3qlomf 2023-08-22T01:30:36,634 Created temporary directory: /tmp/pip-ephem-wheel-cache-cdyozwik 2023-08-22T01:30:36,691 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple 2023-08-22T01:30:36,700 2 location(s) to search for versions of funtoo-ramdisk: 2023-08-22T01:30:36,700 * https://pypi.org/simple/funtoo-ramdisk/ 2023-08-22T01:30:36,700 * https://www.piwheels.org/simple/funtoo-ramdisk/ 2023-08-22T01:30:36,701 Fetching project page and analyzing links: https://pypi.org/simple/funtoo-ramdisk/ 2023-08-22T01:30:36,702 Getting page https://pypi.org/simple/funtoo-ramdisk/ 2023-08-22T01:30:36,706 Found index url https://pypi.org/simple/ 2023-08-22T01:30:37,002 Fetched page https://pypi.org/simple/funtoo-ramdisk/ as application/vnd.pypi.simple.v1+json 2023-08-22T01:30:37,008 Found link https://files.pythonhosted.org/packages/d3/2f/2d92b7aef92983cdfbe7e0809b00e5ffa9ff699c73ad53e501b93dfd5e7f/funtoo-ramdisk-1.0.0.tar.gz (from https://pypi.org/simple/funtoo-ramdisk/) (requires-python:>=3.7), version: 1.0.0 2023-08-22T01:30:37,010 Found link https://files.pythonhosted.org/packages/f7/ce/2b2669f5181ad3da55bdb4c0b7e78f1a1f02a52cf6f4d26da363b98b0ff6/funtoo-ramdisk-1.0.1.tar.gz (from https://pypi.org/simple/funtoo-ramdisk/) (requires-python:>=3.7), version: 1.0.1 2023-08-22T01:30:37,012 Found link https://files.pythonhosted.org/packages/f9/fa/646343cf9f6313cf3808fc13d1f0e047a0f044afbdd7c60d76613a4da543/funtoo-ramdisk-1.0.2.tar.gz (from https://pypi.org/simple/funtoo-ramdisk/) (requires-python:>=3.7), version: 1.0.2 2023-08-22T01:30:37,013 Found link https://files.pythonhosted.org/packages/33/8b/67d6030fe5aca53d240d6f4fb5cc6319918ed0c9310866a074c27ceebdf7/funtoo-ramdisk-1.0.3.tar.gz (from https://pypi.org/simple/funtoo-ramdisk/) (requires-python:>=3.7), version: 1.0.3 2023-08-22T01:30:37,015 Found link https://files.pythonhosted.org/packages/3f/13/0c6d2f9e8ae74fe6fc8a290bfbb7b389818e7a7b82d158ff20e9251e5c89/funtoo-ramdisk-1.0.4.tar.gz (from https://pypi.org/simple/funtoo-ramdisk/) (requires-python:>=3.7), version: 1.0.4 2023-08-22T01:30:37,016 Found link https://files.pythonhosted.org/packages/b2/7e/d3590830418ed3e696c6e922ead5a50daee4c8c2136b315153fcee0377a2/funtoo-ramdisk-1.0.5.tar.gz (from https://pypi.org/simple/funtoo-ramdisk/) (requires-python:>=3.7), version: 1.0.5 2023-08-22T01:30:37,017 Fetching project page and analyzing links: https://www.piwheels.org/simple/funtoo-ramdisk/ 2023-08-22T01:30:37,018 Getting page https://www.piwheels.org/simple/funtoo-ramdisk/ 2023-08-22T01:30:37,020 Found index url https://www.piwheels.org/simple/ 2023-08-22T01:30:37,253 Fetched page https://www.piwheels.org/simple/funtoo-ramdisk/ as text/html 2023-08-22T01:30:37,259 Skipping link: No binaries permitted for funtoo-ramdisk: https://www.piwheels.org/simple/funtoo-ramdisk/funtoo_ramdisk-1.0.4-py3-none-any.whl#sha256=54c976a5a708a542266aa1f9c2584634ecaa529c6564bbef4c66d65012ced852 (from https://www.piwheels.org/simple/funtoo-ramdisk/) (requires-python:>=3.7) 2023-08-22T01:30:37,260 Skipping link: No binaries permitted for funtoo-ramdisk: https://www.piwheels.org/simple/funtoo-ramdisk/funtoo_ramdisk-1.0.3-py3-none-any.whl#sha256=cde4241106db6ca7c0bd04d0f1817c5f352fc45c46e5b75df9b1cf0dcd977234 (from https://www.piwheels.org/simple/funtoo-ramdisk/) (requires-python:>=3.7) 2023-08-22T01:30:37,260 Skipping link: No binaries permitted for funtoo-ramdisk: https://www.piwheels.org/simple/funtoo-ramdisk/funtoo_ramdisk-1.0.2-py3-none-any.whl#sha256=6e70627cb0da3859494b41255b0ba8bf164c16221b5779924cc3b5fd12a0a928 (from https://www.piwheels.org/simple/funtoo-ramdisk/) (requires-python:>=3.7) 2023-08-22T01:30:37,261 Skipping link: No binaries permitted for funtoo-ramdisk: https://www.piwheels.org/simple/funtoo-ramdisk/funtoo_ramdisk-1.0.1-py3-none-any.whl#sha256=232a400779c3abd15ac70e995c47347a69f669d1ce4d4e4ced81b43b3a6b6c30 (from https://www.piwheels.org/simple/funtoo-ramdisk/) (requires-python:>=3.7) 2023-08-22T01:30:37,261 Skipping link: No binaries permitted for funtoo-ramdisk: https://www.piwheels.org/simple/funtoo-ramdisk/funtoo_ramdisk-1.0.0-py3-none-any.whl#sha256=cb61659ae06f4e370b5de5a9a3e3041eeaaa193ec1b45e1a0948b75d7ca922f2 (from https://www.piwheels.org/simple/funtoo-ramdisk/) (requires-python:>=3.7) 2023-08-22T01:30:37,262 Skipping link: not a file: https://www.piwheels.org/simple/funtoo-ramdisk/ 2023-08-22T01:30:37,262 Skipping link: not a file: https://pypi.org/simple/funtoo-ramdisk/ 2023-08-22T01:30:37,297 Given no hashes to check 1 links for project 'funtoo-ramdisk': discarding no candidates 2023-08-22T01:30:37,332 Collecting funtoo-ramdisk==1.0.5 2023-08-22T01:30:37,336 Created temporary directory: /tmp/pip-unpack-wrkxtunh 2023-08-22T01:30:37,641 Downloading funtoo-ramdisk-1.0.5.tar.gz (22 kB) 2023-08-22T01:30:37,782 Added funtoo-ramdisk==1.0.5 from https://files.pythonhosted.org/packages/b2/7e/d3590830418ed3e696c6e922ead5a50daee4c8c2136b315153fcee0377a2/funtoo-ramdisk-1.0.5.tar.gz to build tracker '/tmp/pip-build-tracker-v9cjistv' 2023-08-22T01:30:37,785 Running setup.py (path:/tmp/pip-wheel-yb3qlomf/funtoo-ramdisk_93bede81fe1145fb8b8b01c16a3d05f2/setup.py) egg_info for package funtoo-ramdisk 2023-08-22T01:30:37,787 Created temporary directory: /tmp/pip-pip-egg-info-kdx_c0tn 2023-08-22T01:30:37,787 Preparing metadata (setup.py): started 2023-08-22T01:30:37,789 Running command python setup.py egg_info 2023-08-22T01:30:39,439 ************** 2023-08-22T01:30:39,440 Funtoo Ramdisk 2023-08-22T01:30:39,441 ************** 2023-08-22T01:30:39,441 Copyright 2023 Daniel Robbins, Funtoo Solutions, Inc. 2023-08-22T01:30:39,442 Licensed under the Apache License, Version 2.0 (the "License"); 2023-08-22T01:30:39,442 you may not use this file except in compliance with the License. 2023-08-22T01:30:39,443 You may obtain a copy of the License at 2023-08-22T01:30:39,443 http://www.apache.org/licenses/LICENSE-2.0 2023-08-22T01:30:39,444 Unless required by applicable law or agreed to in writing, software 2023-08-22T01:30:39,444 distributed under the License is distributed on an "AS IS" BASIS, 2023-08-22T01:30:39,445 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2023-08-22T01:30:39,445 See the License for the specific language governing permissions and 2023-08-22T01:30:39,445 limitations under the License. 2023-08-22T01:30:39,446 Introduction 2023-08-22T01:30:39,446 ============ 2023-08-22T01:30:39,447 The Funtoo ramdisk tool, called ``ramdisk`` is a stand-alone tool to create an 2023-08-22T01:30:39,447 initial RAM disk filesystem (initramfs) for booting your Linux system. 2023-08-22T01:30:39,448 The internal initramfs logic is based on the logic found in Gentoo Linux's 2023-08-22T01:30:39,448 genkernel tool, but has been rewritten to be simpler and more efficient. 2023-08-22T01:30:39,449 You can use this tool to create an initramfs to boot to a Funtoo Linux root 2023-08-22T01:30:39,449 ext4 or XFS filesystem, which is what we support in our official installation 2023-08-22T01:30:39,450 documentation at https://www.funtoo.org/Install -- but that's about it. 2023-08-22T01:30:39,450 What's Not Included 2023-08-22T01:30:39,451 =================== 2023-08-22T01:30:39,452 Nearly all "extra" genkernel features are intentionally not yet implemented. 2023-08-22T01:30:39,452 This tool doesn't build your kernel or modules. 2023-08-22T01:30:39,453 It also currently doesn't support dmraid, zfs, btrfs, encrypted root, or LiveCD 2023-08-22T01:30:39,453 or LiveUSB booting. 2023-08-22T01:30:39,454 Why not? Because one of the main design goals of this project is to create a 2023-08-22T01:30:39,454 very elegant and easy-to-understand initramfs whose core logic is not cluttered 2023-08-22T01:30:39,454 with tons of complicated features. To start from a clean slate, we are starting 2023-08-22T01:30:39,455 from very minimal functionality and then will very carefully add back various 2023-08-22T01:30:39,455 features while keeping the code clean, simple, elegant and effective. 2023-08-22T01:30:39,456 What's Included 2023-08-22T01:30:39,456 =============== 2023-08-22T01:30:39,457 So, what *does* Funtoo's ramdisk tool actually offer? Here's a list: 2023-08-22T01:30:39,457 * genkernel-style initramfs without the cruft. In comparison to genkernel's 2023-08-22T01:30:39,458 initramfs, the shell code is about 10x simpler and a lot cleaner, but does 2023-08-22T01:30:39,458 the same thing and has been modernized. About 100 lines of shell script, 2023-08-22T01:30:39,458 with another 215 lines of functions in a support file. 2023-08-22T01:30:39,459 * Rootless operation. You do not need enhanced privileges to create the 2023-08-22T01:30:39,459 initramfs. 2023-08-22T01:30:39,460 * You can read the ``linuxrc`` script and actually understand what it does. 2023-08-22T01:30:39,460 It is written to be easy to understand and adapt. So it's not just short, 2023-08-22T01:30:39,461 but easy to grasp. 2023-08-22T01:30:39,461 * Enhanced module loading engine on the initramfs which is significantly 2023-08-22T01:30:39,462 faster than genkernel. This effectively eliminates the "watching the 2023-08-22T01:30:39,462 stream of useless modules being loaded" issue with genkernel. Modern 2023-08-22T01:30:39,462 systems with NVMe drives will load just a handful of modules to boot 2023-08-22T01:30:39,463 -- all without requiring any special action from the user. 2023-08-22T01:30:39,463 * If you are still able to find some modules that got loaded that you 2023-08-22T01:30:39,463 don't want loaded, you can use the "magic modules" feature to specify 2023-08-22T01:30:39,464 just the modules you want to load. Specify ``magic=mod1,mod2,mod3`` 2023-08-22T01:30:39,464 as a kernel argument and just these modules will be loaded. 2023-08-22T01:30:39,465 * Effective Python-based command to actually build the ramdisk, which is 2023-08-22T01:30:39,465 called: ``ramdisk``. This gives us an extensible platform for the future. 2023-08-22T01:30:39,466 * Enhanced ini-style system for selecting modules to include on your initramfs. 2023-08-22T01:30:39,466 * Enhanced ini-style system for selecting module groups to autoload on the initramfs. 2023-08-22T01:30:39,466 * Support for xz and zstd compression. 2023-08-22T01:30:39,467 How To Use It 2023-08-22T01:30:39,467 ============= 2023-08-22T01:30:39,468 First, install the package, via ``emerge ramdisk`` on Funtoo Linux, or alternatively 2023-08-22T01:30:39,468 ``pip3 install --user funtoo-ramdisk``. You will then have a ``ramdisk`` command 2023-08-22T01:30:39,469 in your path, which can be used to build a ramdisk. 2023-08-22T01:30:39,469 Then, as a regular user, you can run:: 2023-08-22T01:30:39,470 ramdisk /var/tmp/my-new-initramfs 2023-08-22T01:30:39,470 sudo cp /var/tmp/my-new-initramfs /boot 2023-08-22T01:30:39,471 By default, ``ramdisk`` will use your ``/usr/src/linux`` symlink to determine which 2023-08-22T01:30:39,471 kernel to use to build a ramdisk for. It will parse ``/usr/src/linux/Makefile``, 2023-08-22T01:30:39,472 extract kernel version information, and then find the appropriate directory in 2023-08-22T01:30:39,472 ``/lib/modules/`` for copying modules. 2023-08-22T01:30:39,473 Since this is brand-new software, it is highly recommended that you DO NOT OVERWRITE 2023-08-22T01:30:39,473 YOUR EXISTING, WORKING INITRAMFS THAT YOU CURRENTLY USE TO BOOT YOUR SYSTEM. 2023-08-22T01:30:39,474 Instead -- create a NEW BOOT ENTRY to test your initramfs. In GRUB, you can also 2023-08-22T01:30:39,474 press 'e' to edit an entry and type in the name of the new initramfs to give it a try. 2023-08-22T01:30:39,475 Enjoy -- and let me know how it works for you! Please report issues and feature 2023-08-22T01:30:39,475 requests to https://bugs.funtoo.org. 2023-08-22T01:30:39,476 ChangeLog 2023-08-22T01:30:39,476 ========= 2023-08-22T01:30:39,477 funtoo-ramdisk 1.0.5 2023-08-22T01:30:39,477 -------------------- 2023-08-22T01:30:39,478 Released on August 21, 2023. 2023-08-22T01:30:39,478 This is a features/maintenance/bug fix release. 2023-08-22T01:30:39,479 In addition to a bunch of minor fixes and clean-ups, which you can 2023-08-22T01:30:39,479 view in the git history, the following significant changes were 2023-08-22T01:30:39,480 made: 2023-08-22T01:30:39,480 * Use kmod ``/sbin/modprobe`` instead of busybox's modprobe. Busybox's modprobe 2023-08-22T01:30:39,481 may be fine, but for it to work, we must use busybox's ``depmod`` -- and we're 2023-08-22T01:30:39,481 not. We're using ``kmod``'s. So for now, let's just copy the right modprobe 2023-08-22T01:30:39,481 over. This fixes an issue where we get invalid symbols when loading modules 2023-08-22T01:30:39,482 using busybox ``modprobe``. ``modprobe`` is now resolving deps properly! :) 2023-08-22T01:30:39,483 At some point, we could make a "toggle" to select kmod/busybox mode. The 2023-08-22T01:30:39,483 best time to run ``depmod`` for busybox is probably once the ramdisk first 2023-08-22T01:30:39,483 boots, since it doesn't have a "root" option, making it hard to call from our 2023-08-22T01:30:39,483 ramdisk script. 2023-08-22T01:30:39,484 * Remove unused control character definitions in ``initrd.defaults``. 2023-08-22T01:30:39,485 * Mitigate an issue where ``ash`` shell could start before all USB keyboards 2023-08-22T01:30:39,485 have been detected, resulting in lack of input. We now wait 5 seconds 2023-08-22T01:30:39,485 before starting a rescue shell, to give the kernel time to enumerate 2023-08-22T01:30:39,486 devices on the USB2/3 bus. This isn't a full fix, but should resolve 2023-08-22T01:30:39,486 the problem of ``ash`` starting and not having any way to type, because 2023-08-22T01:30:39,486 it didn't connect to your main keyboard. 2023-08-22T01:30:39,487 Try to work around issues related to ATA/SCSI disk enumeration which could 2023-08-22T01:30:39,487 prevent the root filesystem from being mounted (see FL-11532). 2023-08-22T01:30:39,488 * Detect when a user has a ``/dev/sd*`` root block device and warn them that 2023-08-22T01:30:39,488 this is not a good idea, and can cause problems if you have multiple 2023-08-22T01:30:39,489 disks. Show them how to fix the problem by switching to UUID. 2023-08-22T01:30:39,489 * Remove scsi_debug module which is evil and if we force-load it, will create 2023-08-22T01:30:39,490 a new SCSI device 8MB in size and trigger the problem above for anyone 2023-08-22T01:30:39,490 with a SATA disk. 2023-08-22T01:30:39,491 * To implement above feature, added a feature to allow masking of modules in 2023-08-22T01:30:39,491 ``modules.copy`` via "-mod_shortname" in a specific section. Also added a 2023-08-22T01:30:39,491 lot of sanity checking and warnings. If you happen to mask a module in the 2023-08-22T01:30:39,492 wrong section, so it still gets included on the initramfs due to other 2023-08-22T01:30:39,492 section(s), we will warn you. 2023-08-22T01:30:39,493 funtoo-ramdisk 1.0.4 2023-08-22T01:30:39,493 -------------------- 2023-08-22T01:30:39,494 Released on August 18, 2023. 2023-08-22T01:30:39,494 This is a maintenance/bug fix release. 2023-08-22T01:30:39,495 * Fix ability to run from the git repo. This wasn't working. 2023-08-22T01:30:39,496 * Fix issue found by grouche, where if a module is built-in to the 2023-08-22T01:30:39,496 kernel but listed in ``modules.autoload``, ``ramdisk`` would throw 2023-08-22T01:30:39,496 an error because it would think it's not copied to the initramfs. 2023-08-22T01:30:39,497 We now read in the ``modules.builtin`` file and use this in the 2023-08-22T01:30:39,497 internal logic -- if a module is built-in to the kernel, we can 2023-08-22T01:30:39,497 not worry if it is our ``modules.autoload`` list. We still have it. 2023-08-22T01:30:39,498 We will also not worry about trying to load it at boot. 2023-08-22T01:30:39,498 * Add a debug output whenever a module is referenced that is actually 2023-08-22T01:30:39,499 a built-in. This helps to audit the behavior of the above 2023-08-22T01:30:39,499 functionality and could be useful to users of the tool as well. 2023-08-22T01:30:39,500 * Announce we are in debug mode with ``log.info()`` instead of a 2023-08-22T01:30:39,500 warning. Looks a bit nicer. 2023-08-22T01:30:39,501 running egg_info 2023-08-22T01:30:39,501 creating /tmp/pip-pip-egg-info-kdx_c0tn/funtoo_ramdisk.egg-info 2023-08-22T01:30:39,534 writing /tmp/pip-pip-egg-info-kdx_c0tn/funtoo_ramdisk.egg-info/PKG-INFO 2023-08-22T01:30:39,539 writing dependency_links to /tmp/pip-pip-egg-info-kdx_c0tn/funtoo_ramdisk.egg-info/dependency_links.txt 2023-08-22T01:30:39,543 writing requirements to /tmp/pip-pip-egg-info-kdx_c0tn/funtoo_ramdisk.egg-info/requires.txt 2023-08-22T01:30:39,545 writing top-level names to /tmp/pip-pip-egg-info-kdx_c0tn/funtoo_ramdisk.egg-info/top_level.txt 2023-08-22T01:30:39,548 writing manifest file '/tmp/pip-pip-egg-info-kdx_c0tn/funtoo_ramdisk.egg-info/SOURCES.txt' 2023-08-22T01:30:39,912 reading manifest file '/tmp/pip-pip-egg-info-kdx_c0tn/funtoo_ramdisk.egg-info/SOURCES.txt' 2023-08-22T01:30:39,916 reading manifest template 'MANIFEST.in' 2023-08-22T01:30:39,932 writing manifest file '/tmp/pip-pip-egg-info-kdx_c0tn/funtoo_ramdisk.egg-info/SOURCES.txt' 2023-08-22T01:30:40,054 Preparing metadata (setup.py): finished with status 'done' 2023-08-22T01:30:40,068 Source in /tmp/pip-wheel-yb3qlomf/funtoo-ramdisk_93bede81fe1145fb8b8b01c16a3d05f2 has version 1.0.5, which satisfies requirement funtoo-ramdisk==1.0.5 from https://files.pythonhosted.org/packages/b2/7e/d3590830418ed3e696c6e922ead5a50daee4c8c2136b315153fcee0377a2/funtoo-ramdisk-1.0.5.tar.gz 2023-08-22T01:30:40,070 Removed funtoo-ramdisk==1.0.5 from https://files.pythonhosted.org/packages/b2/7e/d3590830418ed3e696c6e922ead5a50daee4c8c2136b315153fcee0377a2/funtoo-ramdisk-1.0.5.tar.gz from build tracker '/tmp/pip-build-tracker-v9cjistv' 2023-08-22T01:30:40,086 Created temporary directory: /tmp/pip-unpack-dn25uk0i 2023-08-22T01:30:40,087 Building wheels for collected packages: funtoo-ramdisk 2023-08-22T01:30:40,096 Created temporary directory: /tmp/pip-wheel-y_6_pl5g 2023-08-22T01:30:40,097 Building wheel for funtoo-ramdisk (setup.py): started 2023-08-22T01:30:40,099 Destination directory: /tmp/pip-wheel-y_6_pl5g 2023-08-22T01:30:40,099 Running command python setup.py bdist_wheel 2023-08-22T01:30:41,176 ************** 2023-08-22T01:30:41,178 Funtoo Ramdisk 2023-08-22T01:30:41,178 ************** 2023-08-22T01:30:41,179 Copyright 2023 Daniel Robbins, Funtoo Solutions, Inc. 2023-08-22T01:30:41,179 Licensed under the Apache License, Version 2.0 (the "License"); 2023-08-22T01:30:41,180 you may not use this file except in compliance with the License. 2023-08-22T01:30:41,180 You may obtain a copy of the License at 2023-08-22T01:30:41,181 http://www.apache.org/licenses/LICENSE-2.0 2023-08-22T01:30:41,182 Unless required by applicable law or agreed to in writing, software 2023-08-22T01:30:41,182 distributed under the License is distributed on an "AS IS" BASIS, 2023-08-22T01:30:41,182 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2023-08-22T01:30:41,183 See the License for the specific language governing permissions and 2023-08-22T01:30:41,183 limitations under the License. 2023-08-22T01:30:41,184 Introduction 2023-08-22T01:30:41,184 ============ 2023-08-22T01:30:41,185 The Funtoo ramdisk tool, called ``ramdisk`` is a stand-alone tool to create an 2023-08-22T01:30:41,185 initial RAM disk filesystem (initramfs) for booting your Linux system. 2023-08-22T01:30:41,186 The internal initramfs logic is based on the logic found in Gentoo Linux's 2023-08-22T01:30:41,186 genkernel tool, but has been rewritten to be simpler and more efficient. 2023-08-22T01:30:41,187 You can use this tool to create an initramfs to boot to a Funtoo Linux root 2023-08-22T01:30:41,187 ext4 or XFS filesystem, which is what we support in our official installation 2023-08-22T01:30:41,187 documentation at https://www.funtoo.org/Install -- but that's about it. 2023-08-22T01:30:41,188 What's Not Included 2023-08-22T01:30:41,188 =================== 2023-08-22T01:30:41,189 Nearly all "extra" genkernel features are intentionally not yet implemented. 2023-08-22T01:30:41,189 This tool doesn't build your kernel or modules. 2023-08-22T01:30:41,190 It also currently doesn't support dmraid, zfs, btrfs, encrypted root, or LiveCD 2023-08-22T01:30:41,190 or LiveUSB booting. 2023-08-22T01:30:41,191 Why not? Because one of the main design goals of this project is to create a 2023-08-22T01:30:41,191 very elegant and easy-to-understand initramfs whose core logic is not cluttered 2023-08-22T01:30:41,192 with tons of complicated features. To start from a clean slate, we are starting 2023-08-22T01:30:41,192 from very minimal functionality and then will very carefully add back various 2023-08-22T01:30:41,192 features while keeping the code clean, simple, elegant and effective. 2023-08-22T01:30:41,193 What's Included 2023-08-22T01:30:41,193 =============== 2023-08-22T01:30:41,194 So, what *does* Funtoo's ramdisk tool actually offer? Here's a list: 2023-08-22T01:30:41,195 * genkernel-style initramfs without the cruft. In comparison to genkernel's 2023-08-22T01:30:41,195 initramfs, the shell code is about 10x simpler and a lot cleaner, but does 2023-08-22T01:30:41,195 the same thing and has been modernized. About 100 lines of shell script, 2023-08-22T01:30:41,196 with another 215 lines of functions in a support file. 2023-08-22T01:30:41,196 * Rootless operation. You do not need enhanced privileges to create the 2023-08-22T01:30:41,197 initramfs. 2023-08-22T01:30:41,197 * You can read the ``linuxrc`` script and actually understand what it does. 2023-08-22T01:30:41,198 It is written to be easy to understand and adapt. So it's not just short, 2023-08-22T01:30:41,198 but easy to grasp. 2023-08-22T01:30:41,199 * Enhanced module loading engine on the initramfs which is significantly 2023-08-22T01:30:41,199 faster than genkernel. This effectively eliminates the "watching the 2023-08-22T01:30:41,199 stream of useless modules being loaded" issue with genkernel. Modern 2023-08-22T01:30:41,200 systems with NVMe drives will load just a handful of modules to boot 2023-08-22T01:30:41,200 -- all without requiring any special action from the user. 2023-08-22T01:30:41,201 * If you are still able to find some modules that got loaded that you 2023-08-22T01:30:41,201 don't want loaded, you can use the "magic modules" feature to specify 2023-08-22T01:30:41,201 just the modules you want to load. Specify ``magic=mod1,mod2,mod3`` 2023-08-22T01:30:41,202 as a kernel argument and just these modules will be loaded. 2023-08-22T01:30:41,202 * Effective Python-based command to actually build the ramdisk, which is 2023-08-22T01:30:41,203 called: ``ramdisk``. This gives us an extensible platform for the future. 2023-08-22T01:30:41,203 * Enhanced ini-style system for selecting modules to include on your initramfs. 2023-08-22T01:30:41,204 * Enhanced ini-style system for selecting module groups to autoload on the initramfs. 2023-08-22T01:30:41,204 * Support for xz and zstd compression. 2023-08-22T01:30:41,205 How To Use It 2023-08-22T01:30:41,205 ============= 2023-08-22T01:30:41,206 First, install the package, via ``emerge ramdisk`` on Funtoo Linux, or alternatively 2023-08-22T01:30:41,206 ``pip3 install --user funtoo-ramdisk``. You will then have a ``ramdisk`` command 2023-08-22T01:30:41,206 in your path, which can be used to build a ramdisk. 2023-08-22T01:30:41,207 Then, as a regular user, you can run:: 2023-08-22T01:30:41,208 ramdisk /var/tmp/my-new-initramfs 2023-08-22T01:30:41,208 sudo cp /var/tmp/my-new-initramfs /boot 2023-08-22T01:30:41,209 By default, ``ramdisk`` will use your ``/usr/src/linux`` symlink to determine which 2023-08-22T01:30:41,209 kernel to use to build a ramdisk for. It will parse ``/usr/src/linux/Makefile``, 2023-08-22T01:30:41,209 extract kernel version information, and then find the appropriate directory in 2023-08-22T01:30:41,210 ``/lib/modules/`` for copying modules. 2023-08-22T01:30:41,210 Since this is brand-new software, it is highly recommended that you DO NOT OVERWRITE 2023-08-22T01:30:41,211 YOUR EXISTING, WORKING INITRAMFS THAT YOU CURRENTLY USE TO BOOT YOUR SYSTEM. 2023-08-22T01:30:41,211 Instead -- create a NEW BOOT ENTRY to test your initramfs. In GRUB, you can also 2023-08-22T01:30:41,211 press 'e' to edit an entry and type in the name of the new initramfs to give it a try. 2023-08-22T01:30:41,212 Enjoy -- and let me know how it works for you! Please report issues and feature 2023-08-22T01:30:41,212 requests to https://bugs.funtoo.org. 2023-08-22T01:30:41,213 ChangeLog 2023-08-22T01:30:41,214 ========= 2023-08-22T01:30:41,214 funtoo-ramdisk 1.0.5 2023-08-22T01:30:41,215 -------------------- 2023-08-22T01:30:41,215 Released on August 21, 2023. 2023-08-22T01:30:41,216 This is a features/maintenance/bug fix release. 2023-08-22T01:30:41,217 In addition to a bunch of minor fixes and clean-ups, which you can 2023-08-22T01:30:41,217 view in the git history, the following significant changes were 2023-08-22T01:30:41,217 made: 2023-08-22T01:30:41,218 * Use kmod ``/sbin/modprobe`` instead of busybox's modprobe. Busybox's modprobe 2023-08-22T01:30:41,218 may be fine, but for it to work, we must use busybox's ``depmod`` -- and we're 2023-08-22T01:30:41,218 not. We're using ``kmod``'s. So for now, let's just copy the right modprobe 2023-08-22T01:30:41,219 over. This fixes an issue where we get invalid symbols when loading modules 2023-08-22T01:30:41,219 using busybox ``modprobe``. ``modprobe`` is now resolving deps properly! :) 2023-08-22T01:30:41,220 At some point, we could make a "toggle" to select kmod/busybox mode. The 2023-08-22T01:30:41,220 best time to run ``depmod`` for busybox is probably once the ramdisk first 2023-08-22T01:30:41,220 boots, since it doesn't have a "root" option, making it hard to call from our 2023-08-22T01:30:41,221 ramdisk script. 2023-08-22T01:30:41,221 * Remove unused control character definitions in ``initrd.defaults``. 2023-08-22T01:30:41,222 * Mitigate an issue where ``ash`` shell could start before all USB keyboards 2023-08-22T01:30:41,222 have been detected, resulting in lack of input. We now wait 5 seconds 2023-08-22T01:30:41,223 before starting a rescue shell, to give the kernel time to enumerate 2023-08-22T01:30:41,223 devices on the USB2/3 bus. This isn't a full fix, but should resolve 2023-08-22T01:30:41,223 the problem of ``ash`` starting and not having any way to type, because 2023-08-22T01:30:41,224 it didn't connect to your main keyboard. 2023-08-22T01:30:41,224 Try to work around issues related to ATA/SCSI disk enumeration which could 2023-08-22T01:30:41,225 prevent the root filesystem from being mounted (see FL-11532). 2023-08-22T01:30:41,225 * Detect when a user has a ``/dev/sd*`` root block device and warn them that 2023-08-22T01:30:41,225 this is not a good idea, and can cause problems if you have multiple 2023-08-22T01:30:41,226 disks. Show them how to fix the problem by switching to UUID. 2023-08-22T01:30:41,226 * Remove scsi_debug module which is evil and if we force-load it, will create 2023-08-22T01:30:41,227 a new SCSI device 8MB in size and trigger the problem above for anyone 2023-08-22T01:30:41,227 with a SATA disk. 2023-08-22T01:30:41,228 * To implement above feature, added a feature to allow masking of modules in 2023-08-22T01:30:41,228 ``modules.copy`` via "-mod_shortname" in a specific section. Also added a 2023-08-22T01:30:41,228 lot of sanity checking and warnings. If you happen to mask a module in the 2023-08-22T01:30:41,229 wrong section, so it still gets included on the initramfs due to other 2023-08-22T01:30:41,229 section(s), we will warn you. 2023-08-22T01:30:41,230 funtoo-ramdisk 1.0.4 2023-08-22T01:30:41,231 -------------------- 2023-08-22T01:30:41,231 Released on August 18, 2023. 2023-08-22T01:30:41,232 This is a maintenance/bug fix release. 2023-08-22T01:30:41,232 * Fix ability to run from the git repo. This wasn't working. 2023-08-22T01:30:41,233 * Fix issue found by grouche, where if a module is built-in to the 2023-08-22T01:30:41,233 kernel but listed in ``modules.autoload``, ``ramdisk`` would throw 2023-08-22T01:30:41,234 an error because it would think it's not copied to the initramfs. 2023-08-22T01:30:41,234 We now read in the ``modules.builtin`` file and use this in the 2023-08-22T01:30:41,234 internal logic -- if a module is built-in to the kernel, we can 2023-08-22T01:30:41,234 not worry if it is our ``modules.autoload`` list. We still have it. 2023-08-22T01:30:41,235 We will also not worry about trying to load it at boot. 2023-08-22T01:30:41,235 * Add a debug output whenever a module is referenced that is actually 2023-08-22T01:30:41,236 a built-in. This helps to audit the behavior of the above 2023-08-22T01:30:41,236 functionality and could be useful to users of the tool as well. 2023-08-22T01:30:41,237 * Announce we are in debug mode with ``log.info()`` instead of a 2023-08-22T01:30:41,237 warning. Looks a bit nicer. 2023-08-22T01:30:41,776 running bdist_wheel 2023-08-22T01:30:42,571 running build 2023-08-22T01:30:42,572 running build_py 2023-08-22T01:30:42,667 creating build 2023-08-22T01:30:42,668 creating build/lib 2023-08-22T01:30:42,670 creating build/lib/funtoo_ramdisk 2023-08-22T01:30:42,672 copying funtoo_ramdisk/initramfs.py -> build/lib/funtoo_ramdisk 2023-08-22T01:30:42,677 copying funtoo_ramdisk/version.py -> build/lib/funtoo_ramdisk 2023-08-22T01:30:42,680 copying funtoo_ramdisk/__init__.py -> build/lib/funtoo_ramdisk 2023-08-22T01:30:42,683 copying funtoo_ramdisk/modules.py -> build/lib/funtoo_ramdisk 2023-08-22T01:30:42,688 copying funtoo_ramdisk/config_files.py -> build/lib/funtoo_ramdisk 2023-08-22T01:30:42,693 creating build/lib/funtoo_ramdisk/support 2023-08-22T01:30:42,694 copying funtoo_ramdisk/support/__init__.py -> build/lib/funtoo_ramdisk/support 2023-08-22T01:30:42,697 running egg_info 2023-08-22T01:30:42,889 writing funtoo_ramdisk.egg-info/PKG-INFO 2023-08-22T01:30:42,893 writing dependency_links to funtoo_ramdisk.egg-info/dependency_links.txt 2023-08-22T01:30:42,897 writing requirements to funtoo_ramdisk.egg-info/requires.txt 2023-08-22T01:30:42,900 writing top-level names to funtoo_ramdisk.egg-info/top_level.txt 2023-08-22T01:30:42,992 reading manifest file 'funtoo_ramdisk.egg-info/SOURCES.txt' 2023-08-22T01:30:42,998 reading manifest template 'MANIFEST.in' 2023-08-22T01:30:43,014 writing manifest file 'funtoo_ramdisk.egg-info/SOURCES.txt' 2023-08-22T01:30:43,019 /home/piwheels/.local/lib/python3.7/site-packages/setuptools/command/build_py.py:201: _Warning: Package 'funtoo_ramdisk.support.etc' is absent from the `packages` configuration. 2023-08-22T01:30:43,020 !! 2023-08-22T01:30:43,020 ******************************************************************************** 2023-08-22T01:30:43,021 ############################ 2023-08-22T01:30:43,021 # Package would be ignored # 2023-08-22T01:30:43,021 ############################ 2023-08-22T01:30:43,022 Python recognizes 'funtoo_ramdisk.support.etc' as an importable package[^1], 2023-08-22T01:30:43,022 but it is absent from setuptools' `packages` configuration. 2023-08-22T01:30:43,023 This leads to an ambiguous overall configuration. If you want to distribute this 2023-08-22T01:30:43,023 package, please make sure that 'funtoo_ramdisk.support.etc' is explicitly added 2023-08-22T01:30:43,023 to the `packages` configuration field. 2023-08-22T01:30:43,024 Alternatively, you can also rely on setuptools' discovery methods 2023-08-22T01:30:43,025 (for example by using `find_namespace_packages(...)`/`find_namespace:` 2023-08-22T01:30:43,025 instead of `find_packages(...)`/`find:`). 2023-08-22T01:30:43,026 You can read more about "package discovery" on setuptools documentation page: 2023-08-22T01:30:43,026 - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html 2023-08-22T01:30:43,027 If you don't want 'funtoo_ramdisk.support.etc' to be distributed and are 2023-08-22T01:30:43,028 already explicitly excluding 'funtoo_ramdisk.support.etc' via 2023-08-22T01:30:43,028 `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`, 2023-08-22T01:30:43,028 you can try to use `exclude_package_data`, or `include-package-data=False` in 2023-08-22T01:30:43,029 combination with a more fine grained `package-data` configuration. 2023-08-22T01:30:43,030 You can read more about "package data files" on setuptools documentation page: 2023-08-22T01:30:43,031 - https://setuptools.pypa.io/en/latest/userguide/datafiles.html 2023-08-22T01:30:43,032 [^1]: For Python, any directory (with suitable naming) can be imported, 2023-08-22T01:30:43,032 even if it does not contain any `.py` files. 2023-08-22T01:30:43,033 On the other hand, currently there is no concept of package data 2023-08-22T01:30:43,033 directory, all directories are treated like packages. 2023-08-22T01:30:43,033 ******************************************************************************** 2023-08-22T01:30:43,034 !! 2023-08-22T01:30:43,034 check.warn(importable) 2023-08-22T01:30:43,035 copying funtoo_ramdisk/support/initramfs.cpio -> build/lib/funtoo_ramdisk/support 2023-08-22T01:30:43,035 copying funtoo_ramdisk/support/linuxrc -> build/lib/funtoo_ramdisk/support 2023-08-22T01:30:43,036 copying funtoo_ramdisk/support/modules.autoload -> build/lib/funtoo_ramdisk/support 2023-08-22T01:30:43,036 copying funtoo_ramdisk/support/modules.copy -> build/lib/funtoo_ramdisk/support 2023-08-22T01:30:43,039 creating build/lib/funtoo_ramdisk/support/etc 2023-08-22T01:30:43,041 copying funtoo_ramdisk/support/etc/initrd.defaults -> build/lib/funtoo_ramdisk/support/etc 2023-08-22T01:30:43,045 copying funtoo_ramdisk/support/etc/initrd.scripts -> build/lib/funtoo_ramdisk/support/etc 2023-08-22T01:30:43,051 running build_scripts 2023-08-22T01:30:43,052 creating build/scripts-3.7 2023-08-22T01:30:43,054 copying and adjusting bin/ramdisk -> build/scripts-3.7 2023-08-22T01:30:43,058 changing mode of build/scripts-3.7/ramdisk from 644 to 755 2023-08-22T01:30:43,151 /home/piwheels/.local/lib/python3.7/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated. 2023-08-22T01:30:43,151 !! 2023-08-22T01:30:43,152 ******************************************************************************** 2023-08-22T01:30:43,152 Please avoid running ``setup.py`` directly. 2023-08-22T01:30:43,153 Instead, use pypa/build, pypa/installer, pypa/build or 2023-08-22T01:30:43,153 other standards-based tools. 2023-08-22T01:30:43,154 See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details. 2023-08-22T01:30:43,154 ******************************************************************************** 2023-08-22T01:30:43,155 !! 2023-08-22T01:30:43,155 self.initialize_options() 2023-08-22T01:30:43,238 installing to build/bdist.linux-armv7l/wheel 2023-08-22T01:30:43,239 running install 2023-08-22T01:30:43,301 running install_lib 2023-08-22T01:30:43,390 creating build/bdist.linux-armv7l 2023-08-22T01:30:43,391 creating build/bdist.linux-armv7l/wheel 2023-08-22T01:30:43,395 creating build/bdist.linux-armv7l/wheel/funtoo_ramdisk 2023-08-22T01:30:43,397 copying build/lib/funtoo_ramdisk/initramfs.py -> build/bdist.linux-armv7l/wheel/funtoo_ramdisk 2023-08-22T01:30:43,401 copying build/lib/funtoo_ramdisk/version.py -> build/bdist.linux-armv7l/wheel/funtoo_ramdisk 2023-08-22T01:30:43,405 copying build/lib/funtoo_ramdisk/__init__.py -> build/bdist.linux-armv7l/wheel/funtoo_ramdisk 2023-08-22T01:30:43,407 copying build/lib/funtoo_ramdisk/modules.py -> build/bdist.linux-armv7l/wheel/funtoo_ramdisk 2023-08-22T01:30:43,413 creating build/bdist.linux-armv7l/wheel/funtoo_ramdisk/support 2023-08-22T01:30:43,415 copying build/lib/funtoo_ramdisk/support/initramfs.cpio -> build/bdist.linux-armv7l/wheel/funtoo_ramdisk/support 2023-08-22T01:30:43,419 copying build/lib/funtoo_ramdisk/support/__init__.py -> build/bdist.linux-armv7l/wheel/funtoo_ramdisk/support 2023-08-22T01:30:43,422 copying build/lib/funtoo_ramdisk/support/linuxrc -> build/bdist.linux-armv7l/wheel/funtoo_ramdisk/support 2023-08-22T01:30:43,426 copying build/lib/funtoo_ramdisk/support/modules.copy -> build/bdist.linux-armv7l/wheel/funtoo_ramdisk/support 2023-08-22T01:30:43,430 creating build/bdist.linux-armv7l/wheel/funtoo_ramdisk/support/etc 2023-08-22T01:30:43,432 copying build/lib/funtoo_ramdisk/support/etc/initrd.scripts -> build/bdist.linux-armv7l/wheel/funtoo_ramdisk/support/etc 2023-08-22T01:30:43,436 copying build/lib/funtoo_ramdisk/support/etc/initrd.defaults -> build/bdist.linux-armv7l/wheel/funtoo_ramdisk/support/etc 2023-08-22T01:30:43,441 copying build/lib/funtoo_ramdisk/support/modules.autoload -> build/bdist.linux-armv7l/wheel/funtoo_ramdisk/support 2023-08-22T01:30:43,445 copying build/lib/funtoo_ramdisk/config_files.py -> build/bdist.linux-armv7l/wheel/funtoo_ramdisk 2023-08-22T01:30:43,448 running install_egg_info 2023-08-22T01:30:43,547 Copying funtoo_ramdisk.egg-info to build/bdist.linux-armv7l/wheel/funtoo_ramdisk-1.0.5-py3.7.egg-info 2023-08-22T01:30:43,568 running install_scripts 2023-08-22T01:30:43,571 creating build/bdist.linux-armv7l/wheel/funtoo_ramdisk-1.0.5.data 2023-08-22T01:30:43,573 creating build/bdist.linux-armv7l/wheel/funtoo_ramdisk-1.0.5.data/scripts 2023-08-22T01:30:43,576 copying build/scripts-3.7/ramdisk -> build/bdist.linux-armv7l/wheel/funtoo_ramdisk-1.0.5.data/scripts 2023-08-22T01:30:43,580 changing mode of build/bdist.linux-armv7l/wheel/funtoo_ramdisk-1.0.5.data/scripts/ramdisk to 755 2023-08-22T01:30:43,609 creating build/bdist.linux-armv7l/wheel/funtoo_ramdisk-1.0.5.dist-info/WHEEL 2023-08-22T01:30:43,614 creating '/tmp/pip-wheel-y_6_pl5g/funtoo_ramdisk-1.0.5-py3-none-any.whl' and adding 'build/bdist.linux-armv7l/wheel' to it 2023-08-22T01:30:43,619 adding 'funtoo_ramdisk/__init__.py' 2023-08-22T01:30:43,621 adding 'funtoo_ramdisk/config_files.py' 2023-08-22T01:30:43,625 adding 'funtoo_ramdisk/initramfs.py' 2023-08-22T01:30:43,631 adding 'funtoo_ramdisk/modules.py' 2023-08-22T01:30:43,633 adding 'funtoo_ramdisk/version.py' 2023-08-22T01:30:43,637 adding 'funtoo_ramdisk/support/__init__.py' 2023-08-22T01:30:43,639 adding 'funtoo_ramdisk/support/initramfs.cpio' 2023-08-22T01:30:43,642 adding 'funtoo_ramdisk/support/linuxrc' 2023-08-22T01:30:43,645 adding 'funtoo_ramdisk/support/modules.autoload' 2023-08-22T01:30:43,648 adding 'funtoo_ramdisk/support/modules.copy' 2023-08-22T01:30:43,651 adding 'funtoo_ramdisk/support/etc/initrd.defaults' 2023-08-22T01:30:43,655 adding 'funtoo_ramdisk/support/etc/initrd.scripts' 2023-08-22T01:30:43,660 adding 'funtoo_ramdisk-1.0.5.data/scripts/ramdisk' 2023-08-22T01:30:43,666 adding 'funtoo_ramdisk-1.0.5.dist-info/METADATA' 2023-08-22T01:30:43,668 adding 'funtoo_ramdisk-1.0.5.dist-info/WHEEL' 2023-08-22T01:30:43,670 adding 'funtoo_ramdisk-1.0.5.dist-info/top_level.txt' 2023-08-22T01:30:43,672 adding 'funtoo_ramdisk-1.0.5.dist-info/RECORD' 2023-08-22T01:30:43,675 removing build/bdist.linux-armv7l/wheel 2023-08-22T01:30:43,845 Building wheel for funtoo-ramdisk (setup.py): finished with status 'done' 2023-08-22T01:30:43,852 Created wheel for funtoo-ramdisk: filename=funtoo_ramdisk-1.0.5-py3-none-any.whl size=21855 sha256=3451404b0e9f527100407bfd4f343cfe9197b5f6f9bab7e5f6494ce9ea2bafff 2023-08-22T01:30:43,854 Stored in directory: /tmp/pip-ephem-wheel-cache-cdyozwik/wheels/f9/c2/b4/12fc6331cff7d1cd522397039bd5ef405b9801968a93479911 2023-08-22T01:30:43,883 Successfully built funtoo-ramdisk 2023-08-22T01:30:43,892 Removed build tracker: '/tmp/pip-build-tracker-v9cjistv'