[klibc] [PATCH 6/8] switch_root: Fix single file mounts
H. Peter Anvin
hpa at zytor.com
Thu Jul 28 13:31:04 PDT 2011
On 07/28/2011 12:26 AM, Michal Suchanek wrote:
>
>> as you can read in the following post mikew also opted for the
>> strict error http://www.zytor.com/pipermail/klibc/2011-July/003002.html
>> handling as it is currently done in run-init.
>>
>> the util-linux switch_root is in contrary very lax, but that
>> way dev errors can't be catched.
>
> The errors in nuke_initramfs are a failure to adhere to initramfs layout
> nuke_initramfs expects which is not documented.
The filesystem layout is very simple... all filesystem mounts are
expected under the new root.
> Failure to remove a file
> from a filesystem later not accessible is not necessarily a boot error.
Why shouldn't it be? Be aware that any lack of error checking is an
invitation to a wholesale destruction of a filesystem in the event of a
problem.
> AFAICT nuke_initramfs cannot work if any mount is present as /some/mount
> because it will then fail to remove /some and the system will fail to
> boot without giving any reason.
Correct, by design. More explicit error messages would be useful, agreed.
-hpa
More information about the klibc
mailing list