Make-initrd development discussion
 help / color / mirror / Atom feed
From: Anton Midyukov <antohami@altlinux.org>
To: Alexey Gladkov <gladkov.alexey@gmail.com>,
	make-initrd@lists.altlinux.org
Subject: Re: [make-initrd] [RFC PATCH 0/7] New shutdown feature
Date: Sun, 8 Nov 2026 08:51:36 +0300
Message-ID: <0002f65b-3bdc-4560-9d86-92b3d5abb92c@altlinux.org> (raw)
In-Reply-To: <cover.1794063613.git.gladkov.alexey@gmail.com>

07.11.2026 18:17, Alexey Gladkov пишет:
> Я хочу сделать специальную фичу, которая бы позволяла правильно завершить
> систему перед перезагрузкой. Идея не оригинальная. Это уже реализовано в dracut
> и в systemd, который умеет делать exec в /run/initramfs.
> 
> Я пока не тестировал эти патчи. Нужно будет ещё всё проверить и написать тесты.
> 
> Антон, тебе возможно будет интересно. Замену /var/run и /var/lock на симлинки
> можно будет сделать одним из хуков.

Это очень нужная фича. Должна решить проблему размонтирования live, проблему размонтирования отдельного /var (на нём journal).
Буду пробовать. Спасибо!

> 
> 
> Alexey Gladkov (7):
>   shutdown: Add exitrd shutdown feature
>   shutdown: Add make-initrd-shutdown-restore utility 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
> 
>  .../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                   |  67 ++++
>  features/shutdown/config.mk                   |   5 +
>  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-restore       | 352 ++++++++++++++++++
>  .../system/make-initrd-shutdown.service       |  17 +
>  .../tests/ts0001-shutdown-basic/expect        |  14 +
>  .../shutdown/tests/ts0001-shutdown-basic/run  | 116 ++++++
>  .../lib/initrd/shutdown/shutdown.d/20-zfs.sh  |   9 +
>  .../lib/initrd/shutdown/umount.d/50-zfs.sh    |  20 +
>  18 files changed, 897 insertions(+)
>  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 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 100755 features/shutdown/system/make-initrd-shutdown-restore
>  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 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
> 


-- 
best regards, Anton Midyukov <antohami@altlinux.org>


  parent reply	other threads:[~2026-11-08  5:51 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-07 15:17 Alexey Gladkov
2026-11-07 15:17 ` [make-initrd] [RFC PATCH 1/7] shutdown: Add exitrd " Alexey Gladkov
2026-11-07 15:17 ` [make-initrd] [RFC PATCH 2/7] shutdown: Add make-initrd-shutdown-restore utility and systemd service Alexey Gladkov
2026-11-07 15:17 ` [make-initrd] [RFC PATCH 3/7] shutdown: Add basic unit test suite Alexey Gladkov
2026-11-07 15:17 ` [make-initrd] [RFC PATCH 4/7] devmapper: shutdown: Teardown device-mapper targets on exit Alexey Gladkov
2026-11-07 15:17 ` [make-initrd] [RFC PATCH 5/7] mdadm: shutdown: Stop MD arrays " Alexey Gladkov
2026-11-07 15:18 ` [make-initrd] [RFC PATCH 6/7] btrfs: shutdown: Sync filesystem before umount " Alexey Gladkov
2026-11-07 15:18 ` [make-initrd] [RFC PATCH 7/7] zfs: shutdown: Unmount filesystems and export zpools " Alexey Gladkov
2026-11-08  5:51 ` Anton Midyukov [this message]
2026-11-08 16:26   ` [make-initrd] [RFC PATCH 0/7] New shutdown feature Alexey Gladkov
2026-11-09 13:06 ` [make-initrd] [PATCH v1 00/10] " Alexey Gladkov
2026-11-09 13:06   ` [make-initrd] [PATCH v1 01/10] utils: Add PE header parsing to locate .initrd section Alexey Gladkov
2026-11-09 13:06   ` [make-initrd] [PATCH v1 02/10] shutdown: Add exitrd shutdown feature Alexey Gladkov
2026-11-09 13:07   ` [make-initrd] [PATCH v1 03/10] shutdown: Add make-initrd-shutdown-restore, initrd-find, and systemd service Alexey Gladkov
2026-11-09 17:10     ` [make-initrd] [PATCH v2 " Alexey Gladkov
2026-11-09 18:45       ` Anton Midyukov
2026-11-09 18:52         ` Leonid Krivoshein
2026-11-10  9:31         ` Alexey Gladkov
2026-11-09 13:07   ` [make-initrd] [PATCH v1 04/10] shutdown: Add basic unit test suite Alexey Gladkov
2026-11-09 13:07   ` [make-initrd] [PATCH v1 05/10] devmapper: shutdown: Teardown device-mapper targets on exit Alexey Gladkov
2026-11-09 13:07   ` [make-initrd] [PATCH v1 06/10] mdadm: shutdown: Stop MD arrays " Alexey Gladkov
2026-11-09 13:07   ` [make-initrd] [PATCH v1 07/10] btrfs: shutdown: Sync filesystem before umount " Alexey Gladkov
2026-11-09 13:07   ` [make-initrd] [PATCH v1 08/10] zfs: shutdown: Unmount filesystems and export zpools " Alexey Gladkov
2026-11-09 13:07   ` [make-initrd] [PATCH v1 09/10] testing: Add end-to-end test for shutdown feature Alexey Gladkov
2026-11-09 13:07   ` [make-initrd] [PATCH v1 10/10] docs: Add manpages and bash-completion for initrd-find and make-initrd-shutdown-restore Alexey Gladkov
2026-11-09 15:23   ` [make-initrd] [PATCH v1 00/10] New shutdown feature Антон Мидюков
2026-11-09 15:25   ` Anton Midyukov
2026-11-09 15:47     ` Alexey Gladkov
2026-11-09 15:57       ` Anton Midyukov
2026-11-09 16:14         ` Alexey Gladkov
2026-11-09 16:16           ` Anton Midyukov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0002f65b-3bdc-4560-9d86-92b3d5abb92c@altlinux.org \
    --to=antohami@altlinux.org \
    --cc=gladkov.alexey@gmail.com \
    --cc=make-initrd@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Make-initrd development discussion

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/make-initrd/0 make-initrd/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 make-initrd make-initrd/ http://lore.altlinux.org/make-initrd \
		make-initrd@lists.altlinux.org make-initrd@lists.altlinux.ru make-initrd@lists.altlinux.com
	public-inbox-index make-initrd

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.make-initrd


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git