On Mon, Jun 16, 2025 at 03:21:47AM +0800, Kang-Che Sung wrote: > > On Sun, Jun 15, 2025 at 03:35:17PM +0100, Harald van Dijk wrote: > >> util-linux's version of switch_root does the same ramfs/tmpfs check that > >> busybox does, but reacts to it differently: rather than exiting with an > >> error for other file systems, it simply prints a warning and carries on > >> without removing any files. Would doing that instead in busybox too be > >> enough to work for your use case? > > > > Yes, it will absolutely be better than a fatal error. I'm using > > switch_root in initramfs and of course I'd like to clean up root, but this > > way at least I can use switch_root from busybox. > > I'm +1 for util-linux's approach. It's simple and addresses Alexey's > overlayfs problem without being destructive.
But on other hand I guess I can drop all the changes in another way and in this case I don't have to delete the files necessarily. So yes, if the filesystem type check wouldn't be fatal, but would act as in util-linux it would help. -- Rgrds, legion _______________________________________________ busybox mailing list [email protected] https://lists.busybox.net/mailman/listinfo/busybox
