WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: How do I get rid of udev messages during boot?  (Read 2153 times)

Offline nurbles

  • Newbie
  • *
  • Posts: 43
How do I get rid of udev messages during boot?
« on: July 28, 2023, 09:39:52 AM »
I've got just about everything working on my fresh new TinyCorePure64-14.0 system. I've noticed some unexpected messages during boot. The first messages flash up and disappear too fast to capture in between the BIOS messages and the screen that starts with the TinyCore version number, but I think they are some sort of failure -- clearly non-fatal, but that type of messages doesn't look good to customers.   :)

I took a photo of the first page of the longer set of messages.  They appear between 'loading modules...' and the GUI starting up.  There is at least a screenful of these, perhaps more.  They're only visible for a second or two, so not a real problem, except again for customer optics:  Apparent(?) Warning/Error messages never look good to customers.   :(  Here's what I see (transcribed by hand from a photo because the POST button stopped working after the preview showed that I'd added the photo correctly):

Loading extensions...udevd[164]: IMPORT{builtin}: 'hwdb --subsystem:input '--loo
kup-prefix=libwacom:name:$attr{name}:'' unknown /etc/udev/rules.d/65-libuacon.ru
les:18

udevd[164]: IMPORT{builtin): 'hwdb --subsystem:input '--lookup-prefix:libwacon:n
ame:$ATTR{name}:'' unknown /etc/udev/rules.d/65-libuacon.rules:18

udevd[164]: IMPORT{builtin): 'hwdb --subsystem:input '--lookup-prefix:libwacon:n
ame:$ATTR{name}:'' unknown /etc/udev/rules.d/65-libuacon.rules:18

udevd[164]: IMPORT{builtin): 'hwdb --subsystem:input '--lookup-prefix:libwacon:n
ame:$ATTR{name}:'' unknown /etc/udev/rules.d/65-libuacon.rules:18

udevd[164]: IMPORT{builtin): 'hwdb --subsystem:input '--lookup-prefix:libwacon:n
ame:$ATTR{name}:'' unknown /etc/udev/rules.d/65-libuacon.rules:18

Whatever all these messages mean, they don't appear to be affecting anything that we care about, if they are affecting anything at all.

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 933
Re: How do I get rid of udev messages during boot?
« Reply #1 on: July 28, 2023, 12:42:44 PM »
Hi nurbles,

You may turn the system log on, adding for example "syslog loglevel=3" bootcodes to Your bootloader config. If I am not mistaken You installed TC with the help of official installer?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11220
Re: How do I get rid of udev messages during boot?
« Reply #2 on: July 28, 2023, 01:02:12 PM »
Hi nurbles
It has something to do with  hwdb:
https://forum.tinycorelinux.net/index.php/topic,25577.0.html

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10962
Re: How do I get rid of udev messages during boot?
« Reply #3 on: July 28, 2023, 11:23:40 PM »
The first messages are from your bootloader, just reporting it loaded the kernel and so on. How to remove those depends on your bootloader.
The only barriers that can stop you are the ones you create yourself.

Offline nurbles

  • Newbie
  • *
  • Posts: 43
Re: How do I get rid of udev messages during boot?
« Reply #4 on: July 31, 2023, 04:43:15 AM »
@jazzbiker:  Thanks!  Adding the syslog settings you provided moved the messages from the boot screen to /var/log/messages where I can now report that the ERROR occurs 18 times in a row (I included a couple lines before and after the messages for context in case someone familiar with the TC boot process looks at this):
Code: [Select]
Jul 31 07:21:08 box authpriv.notice sudo:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/chown -R root.staff /usr/local/tce.installed
Jul 31 07:21:08 box authpriv.notice sudo:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/chmod -R 775 /usr/local/tce.installed
Jul 31 07:21:08 box daemon.err udevd[164]: IMPORT{builtin}: 'hwdb --subsystem=input '--lookup-prefix=libwacom:name:$attr{name}:'' unknown /etc/udev/rules.d/65-libwacom.rules:18
Jul 31 07:21:08 box daemon.err udevd[164]: IMPORT{builtin}: 'hwdb --subsystem=input '--lookup-prefix=libwacom:name:$attr{name}:'' unknown /etc/udev/rules.d/65-libwacom.rules:18
Jul 31 07:21:08 box daemon.err udevd[164]: IMPORT{builtin}: 'hwdb --subsystem=input '--lookup-prefix=libwacom:name:$attr{name}:'' unknown /etc/udev/rules.d/65-libwacom.rules:18
Jul 31 07:21:08 box daemon.err udevd[164]: IMPORT{builtin}: 'hwdb --subsystem=input '--lookup-prefix=libwacom:name:$attr{name}:'' unknown /etc/udev/rules.d/65-libwacom.rules:18
Jul 31 07:21:10 box daemon.err udevd[164]: IMPORT{builtin}: 'hwdb --subsystem=input '--lookup-prefix=libwacom:name:$attr{name}:'' unknown /etc/udev/rules.d/65-libwacom.rules:18
Jul 31 07:21:10 box daemon.err udevd[164]: IMPORT{builtin}: 'hwdb --subsystem=input '--lookup-prefix=libwacom:name:$attr{name}:'' unknown /etc/udev/rules.d/65-libwacom.rules:18
Jul 31 07:21:10 box daemon.err udevd[164]: IMPORT{builtin}: 'hwdb --subsystem=input '--lookup-prefix=libwacom:name:$attr{name}:'' unknown /etc/udev/rules.d/65-libwacom.rules:18
Jul 31 07:21:10 box daemon.err udevd[164]: IMPORT{builtin}: 'hwdb --subsystem=input '--lookup-prefix=libwacom:name:$attr{name}:'' unknown /etc/udev/rules.d/65-libwacom.rules:18
Jul 31 07:21:10 box daemon.err udevd[164]: IMPORT{builtin}: 'hwdb --subsystem=input '--lookup-prefix=libwacom:name:$attr{name}:'' unknown /etc/udev/rules.d/65-libwacom.rules:18
Jul 31 07:21:19 box daemon.err udevd[164]: IMPORT{builtin}: 'hwdb --subsystem=input '--lookup-prefix=libwacom:name:$attr{name}:'' unknown /etc/udev/rules.d/65-libwacom.rules:18
Jul 31 07:21:19 box daemon.err udevd[164]: IMPORT{builtin}: 'hwdb --subsystem=input '--lookup-prefix=libwacom:name:$attr{name}:'' unknown /etc/udev/rules.d/65-libwacom.rules:18
Jul 31 07:21:19 box daemon.err udevd[164]: IMPORT{builtin}: 'hwdb --subsystem=input '--lookup-prefix=libwacom:name:$attr{name}:'' unknown /etc/udev/rules.d/65-libwacom.rules:18
Jul 31 07:21:19 box daemon.err udevd[164]: IMPORT{builtin}: 'hwdb --subsystem=input '--lookup-prefix=libwacom:name:$attr{name}:'' unknown /etc/udev/rules.d/65-libwacom.rules:18
Jul 31 07:21:19 box daemon.err udevd[164]: IMPORT{builtin}: 'hwdb --subsystem=input '--lookup-prefix=libwacom:name:$attr{name}:'' unknown /etc/udev/rules.d/65-libwacom.rules:18
Jul 31 07:21:19 box daemon.err udevd[164]: IMPORT{builtin}: 'hwdb --subsystem=input '--lookup-prefix=libwacom:name:$attr{name}:'' unknown /etc/udev/rules.d/65-libwacom.rules:18
Jul 31 07:21:19 box daemon.err udevd[164]: IMPORT{builtin}: 'hwdb --subsystem=input '--lookup-prefix=libwacom:name:$attr{name}:'' unknown /etc/udev/rules.d/65-libwacom.rules:18
Jul 31 07:21:19 box daemon.err udevd[164]: IMPORT{builtin}: 'hwdb --subsystem=input '--lookup-prefix=libwacom:name:$attr{name}:'' unknown /etc/udev/rules.d/65-libwacom.rules:18
Jul 31 07:21:19 box daemon.err udevd[164]: IMPORT{builtin}: 'hwdb --subsystem=input '--lookup-prefix=libwacom:name:$attr{name}:'' unknown /etc/udev/rules.d/65-libwacom.rules:18
Jul 31 07:21:19 box daemon.err udevd[164]: IMPORT{builtin}: 'hwdb --subsystem=input '--lookup-prefix=libwacom:name:$attr{name}:'' unknown /etc/udev/rules.d/65-libwacom.rules:18
Jul 31 07:21:19 box daemon.err udevd[164]: IMPORT{builtin}: 'hwdb --subsystem=input '--lookup-prefix=libwacom:name:$attr{name}:'' unknown /etc/udev/rules.d/65-libwacom.rules:18
Jul 31 07:21:19 box daemon.err udevd[164]: IMPORT{builtin}: 'hwdb --subsystem=input '--lookup-prefix=libwacom:name:$attr{name}:'' unknown /etc/udev/rules.d/65-libwacom.rules:18
Jul 31 07:21:19 box daemon.err udevd[164]: IMPORT{builtin}: 'hwdb --subsystem=input '--lookup-prefix=libwacom:name:$attr{name}:'' unknown /etc/udev/rules.d/65-libwacom.rules:18
Jul 31 07:21:19 box daemon.err udevd[164]: IMPORT{builtin}: 'hwdb --subsystem=input '--lookup-prefix=libwacom:name:$attr{name}:'' unknown /etc/udev/rules.d/65-libwacom.rules:18
Jul 31 07:21:19 box daemon.err udevd[164]: IMPORT{builtin}: 'hwdb --subsystem=input '--lookup-prefix=libwacom:name:$attr{name}:'' unknown /etc/udev/rules.d/65-libwacom.rules:18
Jul 31 07:21:20 box authpriv.notice sudo:     root : TTY=console ; PWD=/ ; USER=root ; COMMAND=/bin/tar -C / -zxf /mnt/sda1/tce/mydata.tgz
Jul 31 07:21:20 box daemon.info init: starting pid 6053, tty '/dev/tty1': '/sbin/getty -nl /sbin/autologin 38400 tty1'

All errors are referring to the uncommented line (from /etc/udev/rules.d/65-libwacom.rules) that starts with KERNELS:
Code: [Select]
# use the /sys/class/input/eventXXX/device/modalias as lookup key, prefixed
# by libwacom:<device name>:
# This lookup key is a contract between the udev rules and the hwdb entries.
# It is not considered public API and may change.
KERNELS=="input*", IMPORT{builtin}="hwdb --subsystem=input '--lookup-prefix=libwacom:name:$attr{name}:'"

It makes me wonder if the comment is correct and whatever this is doing has changed, making this line no longer correct?

So, the messages are now hidden from the boot screen, but are now clearly listed as 18 ERRORS in /var/log/messages.  Overall, this is a big improvement, but I would prefer messages that are informational or warnings at the worst when my embedded system boots.  The developers may know for certain that these errors are "innocuous" for John Q. Customer almost certainly WILL NOT.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10962
Re: How do I get rid of udev messages during boot?
« Reply #5 on: July 31, 2023, 08:44:42 AM »
You can remove that file (65-libwacom.rules) entirely if you don't have any wacom hardware. Some customization is often expected in deployments.
The only barriers that can stop you are the ones you create yourself.

Offline nurbles

  • Newbie
  • *
  • Posts: 43
Re: How do I get rid of udev messages during boot?
« Reply #6 on: July 31, 2023, 10:35:43 AM »
(smiling)  Well, you might be able to "just delete the file" but the only copy I can find is on a RAM drive that is restored during a boot, long before I would have any way to delete it.

I assume that you're suggesting that there is a way for me to get into the image used to construct the RAM drive and remove the file from that.  At the moment, that is beyond my knowledge and ability.  I also seem to have a knack for choosing the wrong keywords to search for on these forums or google (like "how to remove files from TinyCore images", I also tried with "delete" instead of "remove" and many variations.)

So, an explanation or a link to where the instructions to do this are documented would be a huge help!

Offline GNUser

  • Hero Member
  • *****
  • Posts: 1345
Re: How do I get rid of udev messages during boot?
« Reply #7 on: July 31, 2023, 11:53:32 AM »
Hi nurbles. Keyword is remaster. Here are my notes on how to do it:

 
Code: [Select]
  # mkdir $HOME/temp
  # cd $HOME/temp
  # gunzip -c /path/to/core.gz | cpio -i
  -> change things inside $HOME/temp and its subdirs as desired, then return to $HOME/temp
  # pwd
  /home/tc/temp
  # find . | cpio -H newc -o | gzip -9 > ../core-mod.gz

  -> Optional step for maximum compression (approx. equivalent to gzip -11):
  # advdef -z4 core-mod.gz
« Last Edit: July 31, 2023, 11:57:38 AM by GNUser »

Offline nurbles

  • Newbie
  • *
  • Posts: 43
Re: How do I get rid of udev messages during boot?
« Reply #8 on: July 31, 2023, 12:12:10 PM »
@GNUser thank you very much for the clear and easy to follow instructions!  But I have one concern before I proceed beyond the gunzip command:

When I unzip corepure64.gz, I see pages of errors from the gunzip|cpio command stating things like:
Code: [Select]
cpio: can't create node /dev/tty5: Operation not permitted
Is it safe to assume that none of those things will be needed in the remastered file (or that they will be magically created by the later steps in your sequence)?

Luckily, I knew about gunzip -k so my original file wasn't deleted!   ;)
« Last Edit: July 31, 2023, 12:16:21 PM by nurbles »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11220
Re: How do I get rid of udev messages during boot?
« Reply #9 on: July 31, 2023, 12:36:21 PM »
Hi nurbles
These are the commands I've typically used.
Pack/unpack core.gz:
Code: [Select]
# To unpack
mkdir $HOME/temp
cd $HOME/temp
zcat /path/to/existing/core.gz | sudo cpio -i

# Make your changes.

# To repack
cd $HOME/temp
sudo find . | sudo cpio -o -H newc | gzip > /path/to/new/core-mod.gz

Offline GNUser

  • Hero Member
  • *****
  • Posts: 1345
Re: How do I get rid of udev messages during boot?
« Reply #10 on: July 31, 2023, 01:10:19 PM »
When I unzip corepure64.gz, I see pages of errors from the gunzip|cpio command stating things like:
Code: [Select]
cpio: can't create node /dev/tty5: Operation not permitted
Hi nurbles. I haven't seen these errors before. I run the remaster (unpack/repack) commands as root to avoid problems.

Try remastering as root. If you still encounter errors, I'll defer to someone smarter and more experienced than me to help you further.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10962
Re: How do I get rid of udev messages during boot?
« Reply #11 on: July 31, 2023, 11:56:55 PM »
The wacom rule file is probably in an extension, not in the base (libwacom or xf86-input-wacom probably). Check where with "ls -l". Extensions can be edited with squashfs-tools.

Code: [Select]
rm -rf squashfs-root # just making sure
unsquashfs foo.tcz
# edit the squashfs-root tree
mksquashfs squashfs-root foo.tcz -noappend
« Last Edit: July 31, 2023, 11:58:46 PM by curaga »
The only barriers that can stop you are the ones you create yourself.

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 673
Re: How do I get rid of udev messages during boot?
« Reply #12 on: August 01, 2023, 12:14:29 AM »
You don't need to unsquash, to list files, you just do this to list the files within.

unsquashfs -lls foo.tcz

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11220
Re: How do I get rid of udev messages during boot?
« Reply #13 on: August 01, 2023, 01:28:59 PM »
Hi nurbles
It has something to do with  hwdb:
https://forum.tinycorelinux.net/index.php/topic,25577.0.html
Our version of udev doesn't include the hwdb builtin:
Code: [Select]
tc@E310:~$ udevadm test-builtin --help

Usage: udevadm builtin [--help] <command> <syspath>
  path_id      compose persistent device path
  usb_id       usb device properties
  input_id     input device properties

tc@E310:~$
Found here:
https://unix.stackexchange.com/a/493797

The wacom rule file is probably in an extension, not in the base (libwacom or xf86-input-wacom probably). ...
It's part of  libwacom.tcz  and gets pulled in by  libinput.tcz.

Offline nurbles

  • Newbie
  • *
  • Posts: 43
Re: How do I get rid of udev messages during boot?
« Reply #14 on: August 02, 2023, 05:17:40 AM »
Thanks Rich!  I will look for that file and try to remove the rules that should never have been included (since the hwdb builtin is not included, rules that require it shouldn't be include either, should they?)