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

Alyssa Ross
2025-09-19T09:12:59Z

[-- Attachment #1: Type: text/plain, Size: 1228 bytes --]

Demi Marie Obenour <demiobenour@gmail.com> writes:

> 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'd prefer to use util_linux mount and switch_root, and Toybox
> mkfifo, head, kill, and rm. That said, Busybox can *work*.
> It's just annoying.

toybox has no awk, so we'd probably want to come up with some
replacement for /etc/getuuids. Aside from that, I'd be happy to be rid
of Busybox.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]