Re: [PATCH 1/3] host/initramfs: Use util-linux switch_root

Demi Marie Obenour
2025-09-18T19:41:16Z

[-- Attachment #1.1.1: Type: text/plain, Size: 989 bytes --]

On 9/17/25 07:44, Alyssa Ross wrote:
> Demi Marie Obenour <demiobenour@gmail.com> writes:
>
>> Busybox switch_root doesn't move /proc, /dev, and /sys mounts, whereas
>> the switch_root from util-linux does.
>>
>> Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
>> ---
>> host/initramfs/default.nix | 3 ++-
>> host/initramfs/etc/init | 4 ----
>> 2 files changed, 2 insertions(+), 5 deletions(-)
>
> So on the whole, I'm in favour of getting rid of Busybox wherever
> possible, because its implementations tend to be bad. In the case of
> initramfs though, the potential for unexpected circumstances is very
> constrained, and we need something to implement mkfifo, head, kill, and
> rm. So given we're using Busybox for that anyway, we might as well use
> Busybox's smaller implementation of switch_root, right?

I think so, unless we care about eliminating calls to /usr/bin/if and
/usr/bin/mount.
--
Sincerely,
Demi Marie Obenour (she/her/hers)

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 7253 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]