Page 3 of 3

Re: Outstanding problems

Posted: 25 Oct 2015, 12:59
by fanthom
"the problem is that it is failing to unmount aufs cleanly."
Not sure if its possible to do with systemd but in Porteus we have a function at the end of rc6 which does chroot back to the /mnt/live (our initrd) and then unmouts everything through the /mnt/live/cleanup script.
If cleanup script is used in Nemesis then please call the shell few times and check whats left mounted (try to unmount manually, if works then add to the cleanup script).

Please mind that you will be able to unmount aufs rw branch (changes) only when all modules are deactivated. You need to unmount rw branch properly to avoid 'fs was not unmounted cleanly' message during boot. If rw is placed on tmpfs then no need to worry about proper dissembling of the aufs.

Re: Outstanding problems

Posted: 25 Oct 2015, 13:09
by brokenman
Thanks Fanthom. I did this with another build that didn't use systemd. Will be looking into the unmount messages tonight.

Re: Outstanding problems

Posted: 28 Oct 2015, 23:39
by brokenman
It seems systemd can hand back to initrd during shutdown. Now I just need to figure out how to get it working. If anyone has already accomplished this please let me know.

Re: Outstanding problems

Posted: 29 Oct 2015, 02:19
by francois
Run systemd from initrd and handle shutdown:
https://github.com/scaleway/initrd/issues/31

Maybe Dracut package in aur:
http://www.freedesktop.org/wiki/Softwar ... Interface/
If the executable /run/initramfs/shutdown exists systemd will use it to jump back into the initrd on shutdown. /run/initramfs should be a usable initrd environment to which systemd will pivot back and the "shutdown" executable in it should be able to detach all complex storage that for example was needed to mount the root file system

http://www.pkill.info/linux/man/8-dracut-shutdown/
https://wiki.archlinux.org/index.php/Dracut

Re: Outstanding problems

Posted: 30 Oct 2015, 00:46
by brokenman
Thanks Francois. This is the technique I am using (/run/initramfs/shutdown) and it seems to work except systemd goes on killing spree trying to unmount everything before handing back to initrd. This means the ugly red messages are inevitable, although not serious. After it fails it will hand back to the cleanup script which will successfully unmount everything. I may need to restructure the initrd a little which sux.

Re: Outstanding problems

Posted: 31 Oct 2015, 15:51
by francois
1.0 initram issue, you had a look on this:
https://github.com/scaleway/initrd/comm ... 255b771c9b

2.0 For D-Bus connection error from journalctl:
Oct 27 00:24:35 nemesis kaccess[783]: QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.

But you do not have kde installed on your system, whereas I do.

Re: Outstanding problems

Posted: 01 Nov 2015, 20:34
by fanthom
Looks like systemd natively supports booting from initramfs and going back to it:
http://www.phoronix.com/forums/forum/ph ... post832403

Unfortunately i dont know any other details. Perhaps you could look how Fedora/Debian does it.

Re: Outstanding problems

Posted: 02 Nov 2015, 01:38
by brokenman
I have it sorted. systemd is handing back to initrd to unmount everything ok. Systemd tries to unmount the base modules first though, which results in a red message. All is working ok, but the error messages are ugly.

Re: Outstanding problems

Posted: 02 Nov 2015, 07:30
by fanthom
Can you tell systemd to skip mounts from specific location like /mnt/live/?

Re: Outstanding problems

Posted: 02 Nov 2015, 14:39
by brokenman
Looking into it now. It must be possible.