From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa.local.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RP_MATCHES_RCVD autolearn=ham autolearn_force=no version=3.4.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1794239272; bh=1at2igSDw+WFuJsOWfgioPDC9WXA8Vm1//sHNiCieOw=; h=Date:From:To:Subject:References:In-Reply-To; b=bYmTQgoypIWRgI7viQYlMe7DYQ4tmVUaU2o810R8YIBtoUHiSU5L3XuD1+c7pND2W p5wNgb+jYIB5/sTc8PXfzmGD+fzO/zsDI7IhNj6co2lbM6okGDk4t0lBz6hb/P0CQN i4rSUwgTR4dI93TbLfs1XjbmDy2Lu3bFiqXszI+g1oGrZ2TDRffJA17lNIrgCFmQwh uj3Jm0tmZbUkmeUyDcXuF6FX3LmdqVqnPEjark2H6zQc8NDrWHmUannUBvOReCJ3P2 xqIQs3BLjN4CPO1B9hxL/Yd3WZiTlx9L3gGy/NxQfJqts77l28DrWZNHyCyJYX5HpN 3l2ftdf+eZdOw== Date: Mon, 9 Nov 2026 16:47:47 +0100 From: Alexey Gladkov To: make-initrd@lists.altlinux.org Message-ID: References: <8bdc6c39-c97d-4e5b-b47f-bb257f9a7aeb@altlinux.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8bdc6c39-c97d-4e5b-b47f-bb257f9a7aeb@altlinux.org> Subject: Re: [make-initrd] [PATCH v1 00/10] New shutdown feature X-BeenThere: make-initrd@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: make-initrd@lists.altlinux.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Nov 2026 15:47:56 -0000 Archived-At: List-Archive: On Mon, Nov 09, 2026 at 06:25:59PM +0300, Anton Midyukov wrote: > 09.11.2026 16:06, Alexey Gladkov пишет: > > Привет! > > > > Вот теперь я более менее уверен, что код работает. End-to-end тест проходит на > > всех дистрибутивах. > > > > Патчсет добавляет фичу shutdown, которая позволяет размонтировать систему перед > > перезагрузкой. Реализация механизма предложена разработчиками systemd [1]. Такое > > же поведение можно реализовать и в других реализациях init. > > > > В фиче есть guess, который проверяет предыдущий initrd и если он содержит > > shutdown, то в новый образ фича будет добавлена. > > > > Как сайд эффект были добавлены несколько улучшений. > > > > 1. initrd-find пытается искать initrd (и это часто получается), который был > > использован для загрузки. > > > > 2. Во все утилиты (initrd-ls, initrd-extract) добавлена поддержка нативная UKI. > > Это позволяет просматривать и извлекать initrd даже из UKI без objcopy. > > > > Я не хочу допихивать дополнительные хуки в тот же бранч [2]. Если эта фича > > работает в целом, я её смерджу в master и уже далее буду дорабатывать хуки для > > других фичей, что-то ещё. > > > > В live у меня не находит initrd: > make-initrd-shutdown-restore[3248]: make-initrd-shutdown-restore: no initramfs found for kernel 6.18.62-6.18-alt1 > > Что естественно, initrd c ядром лежит в /image/boot/ > Можно ли как-то путь для поиска подсказать? у initrd-find есть опция --boot-dir=DIR, но эта утилита вызывается из make-initrd-shutdown-restore, который в свою очередь из сервиса вызывается. То есть env не вариант. я подумаю, как это можно решить, но если у тебя появятся идеи, то накидывай сюда. > (прошу админов моё предыдущее письмо, попавшее на премодерацию, не пускать, не с того почтового ящика отправил случайно) Упс. Поздно. > > [1] https://systemd.io/INITRD_INTERFACE/ > > [2] https://github.com/osboot/make-initrd/tree/features-shutdown-v1 > > > > > > Alexey Gladkov (10): > > utils: Add PE header parsing to locate .initrd section > > shutdown: Add exitrd shutdown feature > > shutdown: Add make-initrd-shutdown-restore, initrd-find, and systemd > > service > > shutdown: Add basic unit test suite > > devmapper: shutdown: Teardown device-mapper targets on exit > > mdadm: shutdown: Stop MD arrays on exit > > btrfs: shutdown: Sync filesystem before umount on exit > > zfs: shutdown: Unmount filesystems and export zpools on exit > > testing: Add end-to-end test for shutdown feature > > docs: Add manpages and bash-completion for initrd-find and > > make-initrd-shutdown-restore > > > > .github/workflows/ci.yml | 2 +- > > .github/workflows/testcases.yml | 1 + > > Documentation/manpages/initrd-find.1.md | 94 ++++ > > .../make-initrd-shutdown-restore.1.md | 72 ++++ > > Makefile.in | 6 + > > contrib/bash-completion/initrd-find | 38 ++ > > .../lib/initrd/shutdown/umount.d/50-btrfs.sh | 13 + > > .../initrd/shutdown/post-umount.d/50-dm.sh | 21 + > > .../initrd/shutdown/post-umount.d/60-md.sh | 34 ++ > > features/shutdown/README.md | 81 ++++ > > features/shutdown/config.mk | 5 + > > features/shutdown/guess/common | 32 ++ > > features/shutdown/rules.mk | 7 + > > .../initrd/shutdown/post-umount.d/.gitignore | 1 + > > .../initrd/shutdown/post-umount.d/10-loop.sh | 21 + > > .../initrd/shutdown/pre-umount.d/.gitignore | 1 + > > .../lib/initrd/shutdown/shutdown.d/.gitignore | 2 + > > .../lib/initrd/shutdown/umount.d/.gitignore | 1 + > > features/shutdown/shutdown/shutdown | 196 +++++++++ > > .../system/make-initrd-shutdown.service | 20 + > > .../tests/ts0001-shutdown-basic/expect | 17 + > > .../shutdown/tests/ts0001-shutdown-basic/run | 145 +++++++ > > .../ts0002-guess-common-with-shutdown/expect | 3 + > > .../ts0002-guess-common-with-shutdown/run | 32 ++ > > .../expect | 1 + > > .../ts0003-guess-common-without-shutdown/run | 27 ++ > > .../ts0004-guess-common-no-initrd/expect | 1 + > > .../tests/ts0004-guess-common-no-initrd/run | 16 + > > .../lib/initrd/shutdown/shutdown.d/20-zfs.sh | 9 + > > .../lib/initrd/shutdown/umount.d/50-zfs.sh | 20 + > > testing/test-root-shutdown.cfg | 147 +++++++ > > utils/initrd-extract/tests/ts0005/expect | 3 + > > utils/initrd-extract/tests/ts0005/run | 62 +++ > > utils/initrd-find/Makefile.mk | 6 + > > utils/initrd-find/initrd-find.in | 401 ++++++++++++++++++ > > .../tests/ts0001-initrd-find-basic/expect | 10 + > > .../tests/ts0001-initrd-find-basic/run | 108 +++++ > > utils/initrd-ls/tests/ts0008/expect | 2 +- > > utils/initrd-ls/tests/ts0017/expect | 2 +- > > utils/initrd-ls/tests/ts0025/expect | 2 +- > > utils/initrd-ls/tests/ts0033/expect | 2 +- > > utils/initrd-ls/tests/ts0034/expect | 2 +- > > utils/initrd-ls/tests/ts0035/expect | 2 +- > > utils/initrd-ls/tests/ts0036/expect | 2 +- > > utils/initrd-ls/tests/ts0037/expect | 2 +- > > utils/initrd-ls/tests/ts0038/expect | 2 +- > > utils/initrd-ls/tests/ts0039/expect | 2 +- > > utils/initrd-ls/tests/ts0041/expect | 2 +- > > utils/initrd-ls/tests/ts0045/expect | 7 + > > utils/initrd-ls/tests/ts0045/run | 83 ++++ > > utils/initrd-parse.c | 81 +++- > > .../make-initrd-shutdown-restore/Makefile.mk | 6 + > > .../make-initrd-shutdown-restore.in | 147 +++++++ > > 53 files changed, 1980 insertions(+), 22 deletions(-) > > create mode 100644 Documentation/manpages/initrd-find.1.md > > create mode 100644 Documentation/manpages/make-initrd-shutdown-restore.1.md > > create mode 100644 contrib/bash-completion/initrd-find > > create mode 100755 features/btrfs/shutdown/lib/initrd/shutdown/umount.d/50-btrfs.sh > > create mode 100755 features/devmapper/shutdown/lib/initrd/shutdown/post-umount.d/50-dm.sh > > create mode 100755 features/mdadm/shutdown/lib/initrd/shutdown/post-umount.d/60-md.sh > > create mode 100644 features/shutdown/README.md > > create mode 100644 features/shutdown/config.mk > > create mode 100755 features/shutdown/guess/common > > create mode 100644 features/shutdown/rules.mk > > create mode 100644 features/shutdown/shutdown/lib/initrd/shutdown/post-umount.d/.gitignore > > create mode 100755 features/shutdown/shutdown/lib/initrd/shutdown/post-umount.d/10-loop.sh > > create mode 100644 features/shutdown/shutdown/lib/initrd/shutdown/pre-umount.d/.gitignore > > create mode 100644 features/shutdown/shutdown/lib/initrd/shutdown/shutdown.d/.gitignore > > create mode 100644 features/shutdown/shutdown/lib/initrd/shutdown/umount.d/.gitignore > > create mode 100755 features/shutdown/shutdown/shutdown > > create mode 100644 features/shutdown/system/make-initrd-shutdown.service > > create mode 100644 features/shutdown/tests/ts0001-shutdown-basic/expect > > create mode 100755 features/shutdown/tests/ts0001-shutdown-basic/run > > create mode 100644 features/shutdown/tests/ts0002-guess-common-with-shutdown/expect > > create mode 100755 features/shutdown/tests/ts0002-guess-common-with-shutdown/run > > create mode 100644 features/shutdown/tests/ts0003-guess-common-without-shutdown/expect > > create mode 100755 features/shutdown/tests/ts0003-guess-common-without-shutdown/run > > create mode 100644 features/shutdown/tests/ts0004-guess-common-no-initrd/expect > > create mode 100755 features/shutdown/tests/ts0004-guess-common-no-initrd/run > > create mode 100755 features/zfs/shutdown/lib/initrd/shutdown/shutdown.d/20-zfs.sh > > create mode 100755 features/zfs/shutdown/lib/initrd/shutdown/umount.d/50-zfs.sh > > create mode 100644 testing/test-root-shutdown.cfg > > create mode 100644 utils/initrd-extract/tests/ts0005/expect > > create mode 100755 utils/initrd-extract/tests/ts0005/run > > create mode 100644 utils/initrd-find/Makefile.mk > > create mode 100755 utils/initrd-find/initrd-find.in > > create mode 100644 utils/initrd-find/tests/ts0001-initrd-find-basic/expect > > create mode 100755 utils/initrd-find/tests/ts0001-initrd-find-basic/run > > create mode 100644 utils/initrd-ls/tests/ts0045/expect > > create mode 100755 utils/initrd-ls/tests/ts0045/run > > create mode 100644 utils/make-initrd-shutdown-restore/Makefile.mk > > create mode 100755 utils/make-initrd-shutdown-restore/make-initrd-shutdown-restore.in > > > > -- > best regards, Anton Midyukov > > _______________________________________________ > Make-initrd mailing list > Make-initrd@lists.altlinux.org > https://lists.altlinux.org/mailman/listinfo/make-initrd -- Rgrds, legion