[arch-releng] HEADSUP: mkinitcpio and shutdown

Gerardo Exequiel Pozzi vmlinuz386 at yahoo.com.ar
Mon Dec 16 11:20:49 EST 2013


On 12/16/2013 06:44 AM, Thomas Bächler wrote:
> 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?
> 
> 

/run/archiso is not a mountpoint, can not be moved.

Anyway from point of view of "de-initramfs", /oldroot depends on things
from /oldroot/run.

What I try is from archiso hook modify all paths
"s|run/archiso|run/initramfs/archiso|" but is the same scenario.
(/oldroot depends on things from /oldroot/run/initramfs/archiso instead).




-- 
Gerardo Exequiel Pozzi
\cos^2\alpha + \sin^2\alpha = 1

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


More information about the arch-releng mailing list