#initrd

Ubuntu 25.10 will use Dracut

While Ubuntu 25.04 is still ongoing development, there has been progress in switching from initramfs-tools to Dracut. Those tools both handle initrd generation for booting into the Linux kernel in preparation for the full system boot. The Ubuntu engineers are working hard to migrate such tool to Dracut to ensure better bootstrapping by reducing hard-coded logic as much as possible.

Initially, Ubuntu 25.04 would have used Dracut as the initrd generator, but the work wasn’t complete yet, so the Ubuntu engineers have delayed the migration to after Ubuntu 25.04 gets released so that the next version of Ubuntu uses Dracut completely.

However, you have an opportunity to try out Dracut in Ubuntu 25.04 when it gets released. This is so that you can provide feedback to the Ubuntu team about your experience with the Dracut integration.

Ubuntu 25.04 will be the last version that uses initramfs-tools as the default initrd generator, with the October release of Ubuntu being the first version that uses Dracut. This is going to be exciting news for the next year’s Ubuntu LTS release that will be out in the next April.

#2504 #2510 #Dracut #Initramfs #InitramfsTools #Initrd #news #Plucky #PluckyPuffin #Puffin #Tech #Technology #Ubuntu #Ubuntu2504 #Ubuntu2504Plucky #Ubuntu2504PluckyPuffin #Ubuntu2510 #update

Richard "RichiH" HartmannRichiH@chaos.social
2024-12-15

To share the results:

/etc/initramfs-tools/initramfs.conf (or a .d if you want)
MODULES=dep
COMPRESS=zstd
COMPRESSLEVEL=19

gets the #debian #initrd #boot image down to ~20 MiB

Main system still doesn't start a window manager; I might need to figure out how to rebuild #dkms -- or reinstall the kernel packages.

Edit: Uninstalling & reinstalling the non-most-current kernel & headers did the trick. If you uninstall the newest image, the headers pull in the unsigned kernel as dep. Same size, so..

🅴🆁🆄🅰 🇷🇺erua@hub.hubzilla.de
2024-11-03
Про #GRUB можно позабыть уже несколько лет как — явно находится под чьим-то влиянием и до сих пор отказывается реализовать поддержку #LUKS 2-й версии, в части использования #Argon2 / #Argon2id.

Важно это потому, что в мире полно ферм для майнинга криптовалют, так или иначе арестованных органами общественного правопорядка. Это изначально специализированные #ASIC для перебора значений hash-функций. В результате, стало возможным взламывать грубой силой почти все варианты дискового шифрования, если для хранения пароля используются обычные #PBKDF2 / #PBKDF, не адаптированные под противодействие крипто-майнинговым фермам. Примером, нормальной современной #PBKDF является тот же #Argon2 и его вариации.

Альтернатива в том, что позволяет тот же #systemd-boot. Например, для полнодискового шифрование через LUKS берётся SSD/NVMe разбитый через #GPT с выделением раздела EFI System Partition, на котором размещаются образы #initrd / #initramfs и бинарники загрузчика systemd-boot являющиеся EFI-приложением.

Всё содержимое EFI System Partition может проверяться Secure Boot'ом — быть заверены своим собственным сертификатом в дереве. Не только бинарники, но и текстовые *.conf файлы в /boot/loader/entries/ описывающие каждый вариант загрузки. Поскольку они содержат такие вещи как:
title    ... — как зовётся в меню загрузочном
linux    /vmlinuz-6.6-x86_64 — какое ядро ОС использовать
initrd    /intel-ucode.img — какой микрокод процессора грузить
initrd    /initramfs-6.6-x86_64.img — сам загрузочный образ
...
options quiet — могут быть и в одну строчку все сразу
options splash
options rd.udev.log_level=3
options systemd.show_status=auto
options sysrq_always_enabled=1
options intel_iommu=on
options iommu=pt
...

Т.е. файлы *.conf могут содержать всякие опции/параметры ядра, отвечающие за безопасность работы системы. Например, раздачей таких рекомендаций недавно развлекался #ФСТЭК (вот оригинал официальной публикации).

Про различия в вариантах #Argon2, почему собственно RFC 9106 рекомендует использовать #Argon2id
  • #Argon2d maximizes resistance to GPU cracking attacks. It accesses the memory array in a password dependent order, which reduces the possibility of time–memory trade-off (TMTO) attacks, but introduces possible side-channel attacks.
  • #Argon2i is optimized to resist side-channel attacks. It accesses the memory array in a password independent order.
  • #Argon2id is a hybrid version. It follows the #Argon2i approach for the first half pass over memory and the #Argon2d approach for subsequent passes.


#linux #crypto #lang_ru
2024-10-18

Погружаемся в initrd

Приветствую! Меня зовут Валерий, я инженер операционных систем в секторе клиентской и мобильной ОС. Сегодня хочу затронуть фундаментальные вопросы: - процесс загрузки операционной системы в автоматизированное рабочее место (АРМ), - распаковку начального образа оперативной памяти, - подробный разбор initrd, что это такое и с чем его едят. Этот материал поможет понять как природу загрузки ОС Astra Linux Special Edition в частности, так и загрузку GNU/Linux в целом.

habr.com/ru/companies/astralin

#initrd #grub #скрипт #udev #переменные_окружения #каталог #операционная_система #автоматизированное_рабочее_место #оперативная_память

2024-01-30

Ryan Does #NixOS - Part 7

I was able to generate the required files for
#iPXE booting a #flake (#kernel + #initrd w/ #squashfs + iPXE script file), but kept running into issues with the kernel "unable to mount root fs" or "initramfs unpacking failed: invalid magic at start of compressed archive". What is weird is that https://github.com/nix-community/nixos-images/ when booted through netboot.xyz works just fine, if I grab the underlying kernel + initrd + iPXE script on MULTIPLE #systems , it fails with the latter message.

This is really boggling my mind as I thought there was data corruption happening, but I am more likely to believe something is happening within NixOS's
#zstd compression, or with that building process.

Elias Probsteliasp
2024-01-16

@brokenix@emacs.ch it's been quite a while that isn't the default in ' anymore. See this commit for more details and the reasoning behind this decision:
github.com/NixOS/nixpkgs/commi

2023-09-20

Linux boot times speed-up at works! 🚀

"We aim to capitalize on the cryptographic checks already performed on the kernel and initrd images during the secure boot process.

As a result, we can significantly improve the boot speed without compromising system security." ~Alessandro Carminati (Red Hat)

=> lore.kernel.org/lkml/202309141

#Linux #kernel #boot #development #speed #RedHat #initrd

2023-09-17

Linux boot times speed-up at works! 🚀

"We aim to capitalize on the cryptographic checks already performed on the kernel and initrd images during the secure boot process.

As a result, we can significantly improve the boot speed without compromising system security." ~Alessandro Carminati (Red Hat)

=> lore.kernel.org/lkml/202309141

#Linux #kernel #boot #development #speed #RedHat #initrd

@dagaz In the end I am trying to make the IT world a bit better by trying to point out: that the place where you type in your #Linux #luks disk #passphrase is not safe and could be better protected if the #boot and upgrade process would be implemented slightly different with the ability to ship #distribution, #organization and device #signatures on #kernel and #initrd.
Then we can really start and demand signature editing in every firmware!

2022-03-11

Und heute suche ich einen fiesen Bug bei der Interface-Benennung, der nur im Live-System und nur auf echter Hardware auftritt, und zwar irgendwo in den Tiefen der #initrd.

Ich darf also nicht nur jedesmal die Initrd neubauen, wenn ich meine, einen Ansatz zu haben, nein, auch das Live-System. Und das muß dann der Hardware zum Booten bereitgestellt werden. Mit VMs ginge das irgendwie leichter …

2021-05-08

- use an #initrd to have an encrypted root fs,

2021-05-08

#initrd is a block device unpacked to be mounted by the kernel at booting, while ramfs is unpacked via cpio into memory.

2020-12-16

@neimi @promasu
Hab mir mal den Spaß gemacht , , und einige weitere Anwendungen in jeweils eigene zu stecken auf einem minimalistischem eigenen basierend aus , gebaut mit . War spaßig und hat durchaus funktioniert...

2018-10-05

@lars
Ja, Das bevorzuge ich auch. Ich habe auch schon mit gespielt oder einer selbst gebauten minimalen (busybox+docker) und ein Linux Desktop in Docker Containern gebaut. Aber alleine war mir das dann zu viel Arbeit weiter zu verfolgen.

2018-07-16

@uranther@cybre.space
I played with a custom minimal with (persistent storage mounted at /var/lib/docker) and separated containers for each part (xorg, fluxbox, chrome, ...). It was fun and yes... sometimes harder 😁

Alexey Skobkinskobkin@skobk.in
2015-01-04

Как известно, при работе с проприетарным драйвером nvidia-drivers , невозможно использовать фреймбуфер через nouveau  или доступный в ядре фреймбуфер для NVIDIA, так как они конфликтуют с драйвером, который используется в X-сервере. Добиться работы фреймбуфера в консоли без костылей типа выгрузки nouveau перед запуском X-сервера можно только используя uvesafb .

Однако, подавляющее большинство инструкций описывают настройку uvesafb в сочетании с initrd, что бесполезно, если ядро собрано без его поддержки.

Само собой, необходимо выполнить все инструкции, которые необходимы для работы драйверов от NVIDIA без конфликтов:

  • Включить поддержку модулей
    [*] Enable loadable module support --->
  • Включить MTRR
    Processor type and features --->    [*] MTRR (Memory Type Range Register) supportProcessor type and features --->    [*] MTRR (Memory Type Range Register) support
  • Отключить встроенные драйверы ядра для фреймбуфера на видеокартах NVIDIA
    Device Drivers --->    Graphics support --->        Frame buffer Devices --->             Support for frame buffer devices --->            < >   nVidia Framebuffer Support            < >   nVidia Riva support
  • Собрать DRM модулем или вовсе выключить его в ядре (NVIDIA использует свой DRM)
    Device drivers --->    Graphics support --->        < > Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)

    У меня при встроенном модуле DRM в dmesg  можно было наблюдать ошибки и конфликт с драйвером nvidia , но как ни странно, в итоге всё работало. Когда я убрал модуль, вместе с ним пропали и ошибки.

Здесь путь с обычной инструкцией расходится, так как мы не используем initrd при загрузке. В ядре нужно включить поддержку uvesafb в виде модуля:

Device Drivers  --->     Connector - unified userspace  kernelspace linker  --->    Graphics support  --->        [*] Support for frame buffer devices  --->            [*]   Enable firmware EDID               Userspace VESA VGA graphics support            [*]   Simple framebuffer support

И собрать нужные для uvesafb пакеты:

emerge -aq v86d

Теперь прописываем загрузку модуля uvesafb с параметрами:

# ...modules="uvesafb"# ...module_uvesafb_args="mode_option=1920x1080-24 mtrr=2 scroll=ywrap"

Альтернативой module_uvesafb_args  может быть создание конфига в /etc/modprobe.d/  c такими же параметрами:

options uvesafb mode_option=1920x1080-24 mtrr=2 scroll=ywrap

Здесь важно задать параметры, подходящие под вашу текущую конфигурацию системы:

  • mode_option — разрешение и глубина цвета (также можно указать частоту обновления в виде 1920×1080-24@60 , но лучше оставить автоматическое значение)
  • mtrr — доступный режим MTRR. Узнать, какие режимы доступны можно в файле /proc/mtrr. Таблица соответствия выглядит так:
    0 - Disabled (equivalent to nomtrr) (default)1 - Uncacheable2 - Write-back3 - Write-combining4 - Write-through
  • scroll — режим прокрутки. Типичное значение — ywrap. Посмотреть подробнее можно в документации.

Можно собирать ядро и устанавливать его. Если у вас используется отдельный раздел под /boot , то нужно сначала смонтировать его: mount /boot. Также, если были убраны какие-то модули, а версия ядра не менялась, не лишним может быть и удаление установленных в данный момент модулей из /lib64/modules/. Сделать это можно, например, так:

rm -rf /lib64/modules/`uname -r`

В /usr/src/linux выполняем:

make -j4 && make modules_install && make install

Теперь подправим конфиг GRUB2 (для GRUB первой версии настройки будут другими):

# ...GRUB_GFXMODE=1920x1080# ...GRUB_GFXPAYLOAD_LINUX=keep

Кстати, здесь мы заодно и в GRUB2 выставили высокое разрешение первым параметром. Остаётся сгенерировать новый конфиг для GRUB2:

grub2-mkconfig -o /boot/grub/grub.cfg

Не стоит забывать и о том, что не лишним будет пересобрать драйвера — особенно, если изменилась версия ядра:

emerge -aq nvidia-drivers

Отмонтируем /boot  и перезагружаемся, чтобы проверить.

Gentoo uvesafb

Удачи!

Полезная информация:

https://skobk.in/2015/01/gentoo-nvidia-drivers-uvesafb-framebuffer-without-initrd/

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst