[arch-releng] HEADSUP: mkinitcpio and shutdown

Thomas Bächler thomas at archlinux.org
Mon Dec 16 04:44:22 EST 2013


Am 16.12.2013 03:25, schrieb Gerardo Exequiel Pozzi:
> On 12/15/2013 08:59 PM, Thomas Bächler wrote:
>> The new mkinitcpio 16 (yes, we bumped from 0.15 to 16) in testing
>> contains a new feature that automatically generates an "initramfs" on
>> shutdown. systemd will pivot to this image on shutdown. All it does is
>> re-run systemd-shutdown in a ramdisk, thus allowing a proper umount of /
>> and proper shutdown of ALL loop and device mapper devices.
>>
>> This feature is enabled automatically if
>> * /run/initramfs exists (will be created on your next boot by tmpfiles),
>> * /run/initramfs/shutdown doesn't exist or is not an executable,
>> * The user hasn't masked mkinitcpio-generate-shutdown-ramfs.service.
>>
>> This method should also be able to completely obsolete the custom
>> shutdown hook in archiso and the mkinitcpio shutdown hook (using any of
>> those will disable the new stuff).
>>
> 
> Nice, thanks for the work on making systemd working on
> initramfs/de-initramfs.
> 
> But by nature of the archiso mount structure (/ mounted from
> /run/archiso/...) of course this does not work, since systemd does not
> know about this (in other words it needs to mount move /run/archiso
> outside / before anything)
> 
> Remember that this is the first step, that I do on custom
> archiso_shutdown script:
> 
> # /oldroot depends on things inside /oldroot/run/archiso...
> mkdir /oldrun
> mount -n --move /oldroot/run /oldrun

pivot_root semantics are seriously weird. Wouldn't it help if we moved
/run/archiso to /run/initramfs/archiso before switching back to initrd?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.archlinux.org/pipermail/arch-releng/attachments/20131216/a294ee29/attachment.asc>


More information about the arch-releng mailing list