Conversation
schaefi
left a comment
There was a problem hiding this comment.
Thanks, a good idea 👍 Please see my comments
| } | ||
|
|
||
| function plymouth_msg { | ||
| if command -v plymouth >/dev/null 2>&1; then |
There was a problem hiding this comment.
can we change this to
if command -v plymouth &>/dev/null; then
:
fior
if type plymouth &>/dev/null; then
:
fias you prefer. Thanks
| return | ||
| fi | ||
|
|
||
| plymouth_msg "Expanding disk..." |
There was a problem hiding this comment.
I like that you want to expose the messages also to the framebuffer if plymouth is enabled. However, I believe we should not duplicate different messages depending on where they are displayed.
In the kiwi dracut code I'm using the dracut provided messaging system. You can see this when looking for
warn "..."
info "..."
kind a like messages. I believe it would be good if we check if dracut itself is not already capable to show this as plymouth message and if not I would propose that we create our own warn , info functions which wraps the dracut provided ones and also calls your code to display the same message also through plymouth.
This way we still have the same messages but just stream them to different channels.
Thoughts ?
There was a problem hiding this comment.
You find the implementation of the messaging system in dracut at ./99base/dracut-lib.sh
Changes proposed in this pull request:
plymouth_msgto kiwi-repartThis is mostly a minimal proof of concept; it can be merged as is but I expect you might want to move
plymouth_msgto the library and then use it in other places too.The core idea is that I noticed on large disks the first-boot repartitioning could take long enough that people might wonder what's going on, especially on systems running plymouth. This adds a simple message that displays on plymouth to let people know what it's doing (and implicitly that subsequent boots should be faster).
One caveat is that at least on current versions of OpenSUSE (tested in 15.6 but at time of writing it hasn't been fixed in later versions) there's a bug in
plymouth-dracutwhich means thatlabel-pango.sois not installed to the initrd and thus no text will display. This can either be fixed by patching/usr/lib/plymouth/plymouth-populate-initrdto installlabel-pango.soinstead oflabel.so, or by adding an equivalent entry to any dracut module, e.g.install_optional_items+=" /usr/lib64/plymouth/label-pango.so ".