You are not logged in.
dear arch experts---I understand that I have an initrd stage that eventually invokes /sbin/init (which is systemd) on a switch_root. the initrd stage can echo various log information, too. so, now I am curious: how can the pre-systemd process log output be logged to journald? can the pre-systemd initrd write to an area of RAM that survives the switch_root and will then be picked up by journald as soon as journald becomes available?
sincerely, /iaw
Offline
Probably this:
In this page we attempt to roughly describe the interfaces that exist between the initrd and systemd. These interfaces are currently used by dracut and the ?ArchLinux initrds.
- The initrd should mount /run as a tmpfs and pass it pre-mounted when jumping into the main system when executing systemd. The mount options should be mode=755,nodev
http://www.freedesktop.org/wiki/Softwar … Interface/
Would have to re-check the mkinitcpio sources (bash scripts) to see how it "passes over".
There's even more information logged, before systemd actually starts, e.g. from Kernel. (http://0pointer.de/blog/projects/journalctl.html)
You can see that in your log, there's alot of information before:
[...] systemd[1]: systemd 217 running in system mode. (+PAM -AUDIT -SELINUX -IMA -APPARMOR [...]
Personal website: reboot.li
GitHub: github.com/rebootl
Offline
Offline
Thanks falconindy for this explanation.
Does the /run tmpfs remains "intact/usable" as well after the switch_root ?
I suppose/ask because rd.log=file writes to /run/initramfs/init.log and switch_root(8) only mentions /proc, /dev and /sys...
iaw4: Additionally, you can see the respective mkinitcpio source lines here: https://projects.archlinux.org/mkinitcp … tions#n380
Last edited by rebootl (2015-01-17 16:08:50)
Personal website: reboot.li
GitHub: github.com/rebootl
Offline
thanks to both of you. should I drop a note to jones, katz, and kak about the docs here?
Offline
Why not. Though, a bug/issue report would seem appropriate to me.
Maybe here: https://github.com/karelzak/util-linux
Regards
Personal website: reboot.li
GitHub: github.com/rebootl
Offline
done.
I also mentioned that some docs about rescuing info across the pivot would be nice.
PS: I couldn't help myself but to mention that I would love some basic sanity checks before deleting the old root. chances are that switch_root should not be used to pivot away from /dev/sda1 if it recursively deletes the old root directory. then again, maybe it already does this, and the documentation that talks about deleting the old root here is outdated, too.
Offline