LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 04-15-2014, 12:25 AM   #31
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097

Can you post that init-net-rules.sh script please Stoat?

I might need to added a cat file creation command for it and add the hardware database initialization command to the hint.

Looks like version 0.0.5 is in the works now.
 
Old 04-15-2014, 09:33 AM   #32
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 628

Rep: Reputation: 185Reputation: 185
It still can be found in the udev-lfs-xxxxxx tarballs. This is the one in the wget-list file of the current development book.
http://anduin.linuxfromscratch.org/s...140408.tar.bz2
 
Old 04-15-2014, 01:57 PM   #33
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Thanks Stoat.
 
Old 04-15-2014, 02:26 PM   #34
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 628

Rep: Reputation: 185Reputation: 185
I built LFS SVN-140408 again incorporating Eudev-1.5.3 as we have been discussing here. I mostly used the latest version of ReaperX7's hint with a few modifications. I just wanted to post the commands I ran and report what happened, for the record only. I don't intend for anyone to do any of this.
Code:
tar xf eudev-1.5.3.tar.gz
cd eudev-1.5.3
sed -i '/struct ucred/i struct ucred;' src/libudev/util.h
sed -r -i 's|/usr(/bin/test)|\1|' test/udev-test.pl
BLKID_CFLAGS=-I/tools/include
BLKID_LIBS='-L/tools/lib -lblkid'
./configure --prefix=/usr                        \
            --libexecdir=/lib                    \
            --sysconfdir=/etc                    \
            --disable-static                     \
            --disable-introspection              \
            --disable-selinux                    \
            --disable-gudev                      \
            --disable-keymap                     \
            --disable-gtk-doc-html               \
            --enable-libkmod                     \
            --enable-rule_generator              \
            --with-rootprefix=""                 \
            --with-rootlibdir=/lib               \
            --with-firmware-path=/lib/firmware   &&
make
mkdir -pv /lib/firmware
mkdir -pv /lib/udev/{devices/pts,rules.d}
mkdir -pv /etc/udev/{hwdb.d,rules.d}
make install
/usr/bin/udevadm hwdb --update
tar -xvf ../eudev-1.5.3-manpages.tar.bz2 -C /usr/share

cat > /etc/udev/rules.d/55-lfs.rules << "EOF"
# /etc/udev/rules.d/55-lfs.rules: Rule definitions for LFS.

# Core kernel devices

# This causes the system clock to be set as soon as /dev/rtc becomes available.
SUBSYSTEM=="rtc", ACTION=="add", MODE="0644", RUN+="/etc/rc.d/init.d/setclock start"
KERNEL=="rtc", ACTION=="add", MODE="0644", RUN+="/etc/rc.d/init.d/setclock start"

# Comms devices

KERNEL=="ippp[0-9]*",       GROUP="dialout"
KERNEL=="isdn[0-9]*",       GROUP="dialout"
KERNEL=="isdnctrl[0-9]*",   GROUP="dialout"
KERNEL=="dcbri[0-9]*",      GROUP="dialout"
EOF
I also created the init-net-rules.sh script (but didn't need it this time) and deleted two of Eudev's rules (75-persistent-net-generator.rules and 75-cd-aliases-generator.rules). I honestly forgot why I delete those two rules or where I got that idea, but I've been doing it all along with my Eudev experiments. I might try to find out if it matters if I leave them.

Where everything went...
Code:
/etc
|-- udev
    |-- hwdb.bin
    |-- hwdb.d
    |   |-- 20-acpi-vendor.hwdb
    |   |-- 20-bluetooth-vendor-product.hwdb
    |   |-- 20-OUI.hwdb
    |   |-- 20-pci-classes.hwdb
    |   |-- 20-pci-vendor-model.hwdb
    |   |-- 20-sdio-classes.hwdb
    |   |-- 20-sdio-vendor-model.hwdb
    |   |-- 20-usb-classes.hwdb
    |   `-- 20-usb-vendor-model.hwdb
    |-- rules.d
    |   `-- 55-lfs.rules
    `-- udev.conf
 

/lib
|-- libudev.so.1 -> libudev.so.1.3.0
|-- libudev.so.1.3.0
|
|-- udev
    |-- accelerometer
    |-- ata_id
    |-- cdrom_id
    |-- collect
    |-- devices
    |   `-- pts
    |-- init-net-rules.sh
    |-- mtd_probe
    |-- rule_generator.functions
    |-- rules.d
    |   |-- 42-usb-hid-pm.rules
    |   |-- 50-firmware.rules
    |   |-- 50-udev-default.rules
    |   |-- 60-cdrom_id.rules
    |   |-- 60-drm.rules
    |   |-- 60-persistent-alsa.rules
    |   |-- 60-persistent-input.rules
    |   |-- 60-persistent-serial.rules
    |   |-- 60-persistent-storage.rules
    |   |-- 60-persistent-storage-tape.rules
    |   |-- 60-persistent-v4l.rules
    |   |-- 61-accelerometer.rules
    |   |-- 64-btrfs.rules
    |   |-- 75-net-description.rules
    |   |-- 75-probe_mtd.rules
    |   |-- 75-tty-description.rules
    |   |-- 78-sound-card.rules
    |   |-- 80-drivers.rules
    |   `-- 95-udev-late.rules
    |-- scsi_id
    |-- v4l_id
    |-- write_cd_rules
    `-- write_net_rules

/usr/lib
|-- libudev.la
|-- libudev.so -> ../../lib/libudev.so.1.3.0
|-- pkgconfig
|   |-- libudev.pc


/usr/bin
|-- udevadm
|


/usr/sbin/
|-- udevadm -> /usr/bin/udevadm
|-- udevd


/usr/include
|-- libudev.h
|-- udev.h


/usr/share/pkgconfig
|-- udev.pc
As before, I let Eudev put the executables in the default locations and fixed the udev and udev_retry initscripts for them.

Anyway, everything went smoothly and works normally. Again I had some console message spew for the first boot only. This time I have not had to run the init-net-rules.sh script. My ethernet card is named eth0 and is working fine without the 70-persistent-net-rules file that usually is created for me by running that script.


P.S.: A brief update... I built the whole system again. Two things to add here. One is that I installed Eudev before util-linux this time (I've been overlooking that). The other is that I did not delete those two rules mentioned above. There was no error message spew during the first boot this time, and leaving those rules installed harmed nothing that I can detect. I think I have this all worked out the way I want it now.

Last edited by stoat; 04-15-2014 at 07:06 PM.
 
Old 04-15-2014, 04:14 PM   #35
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Just a precaution Stoat, but using:

Code:
/usr/bin/udevadm hwdb --update
To initialize the hardware database might not be recommended on some file systems like JFS for example.

This can cause the /dev file system to not want to dismount properly and if by chance you lack the proper fsck.* utility for that specific file system, you may end up with a locked out disk saying the drive is corrupt due to an improper dismount.
 
Old 04-19-2014, 02:24 AM   #36
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Updated hint file is in the works for a more comprehensive eudev package.

I'm going to be away from Linux this upcoming week, but my hint will hopefully be updated soon. I'm also going to draft up a section for the udev init script to work with either eudev or systemd if Bruce hasn't edited it his end yet.

Just a side note, but I attempted to build the default systemd+sysvinit build from the book, and I've not been impressed by it. SysV is much easier to work with by far, and there's so much already available for sysvinit that I honestly can say, in my opinion systemd is irrelevant on many levels. Eudev is all you need honestly, and if you by chance need a service supervisor, there's at least 3 out there that are small, non-intrusive, and modular that work very well.
 
Old 04-20-2014, 07:57 AM   #37
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 628

Rep: Reputation: 185Reputation: 185
One more piece of Systemd residue that I found in the current LFS development version is the creation of groups for adm, messagebus, and systemd-journal; and the user messagebus. The D-Bus page of the current BLFS development version still attempts to create the messagebus group and user resulting in an error. Now, this isn't a big deal really. Easy to fix one way or the other. But for someone desiring to move on without Systemd, it is one more annoyance.
 
Old 04-20-2014, 01:21 PM   #38
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Good deal Stoat thanks for the find. The upcoming hint reversion will contain those fixes.

I'll add your work in and cite your effort.

I had some time so I redrafted it. New version 0.0.5 is up:
Attached Files
File Type: txt eudev-alt-hint.txt (14.4 KB, 33 views)

Last edited by ReaperX7; 04-20-2014 at 06:03 PM.
 
Old 04-23-2014, 03:30 PM   #39
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Rep: Reputation: 167Reputation: 167
Hey Reaper,

Just an FYI on your hint, and in the book. It's not entirely clear where the file "udev-lfs-20140408" comes from. I'm going to assume its in the bootscripts package. But it wasn't in the patch or package list at the book's beginning.

EDIT: Nevermind, found it now, needed to clear the page cache. It wasn't showing up in the list.

EDIT (again): Reaper, is there a /r/n in that file instead of a /n somewhere?

Quote:
root:/sources/udev-lfs-20140408# make -f Makefile.lfs install
mkdir: created directory '/usr/share/doc/udev-20140408'
mkdir: created directory '/usr/share/doc/udev-20140408/lfs'
cp: cannot stat 'udev-lfs-20140408/*.rules': No such file or directory.
Makefile.lfs:19: recipe for target 'install' failed

Last edited by Luridis; 04-23-2014 at 04:06 PM.
 
Old 04-23-2014, 09:14 PM   #40
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
udev-lfs-20140404.tar.bz2 was part of systemd-212, but all it does is extract the scripts it contains within that archive. You don't technically need it, but it's there for comprehensive coverage for udev to not have to auto-generate every last rule. Technically it's a stand-alone package and doesn't even require untaring into /systemd-212 as it used to. They just do it as part of the install process if you follow it normally.

All it does is install some generator scripts to /lib/udev and other places. You can actually allow udev to auto-build the rule sets, though it might not be as clean as the pre-generated ones.

Just run the commands as stated and it should be okay. I ran it fine without incident. If it's not working I'll have some time next week to do some extra testing to debug it.

Last edited by ReaperX7; 04-23-2014 at 09:16 PM.
 
Old 04-26-2014, 07:26 AM   #41
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,155

Rep: Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857
Thought I would give eudev a try but I've hit a snag it all compiles and installs OK but won't recognize my usb keyboard if I plug in an old ps2 keyboard it works fine, I don't even get any messages on the console when I plug a usb device in and out like I normally do, have I missed somwthing obvious?
 
Old 04-26-2014, 10:16 AM   #42
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Could be an old rule set by udev possibly, or a kernel module for HID keyboards. I'd double check your kernel first.
 
Old 04-26-2014, 11:01 AM   #43
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,155

Rep: Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857
I used the same kernel config and it's fine on my normal system, btw it was a clean build so shouldn;t have any old stuff hanging about.
 
Old 04-26-2014, 03:29 PM   #44
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Did you try powering down then plugging in the keyboard or did you switch while the system was running?
 
Old 04-26-2014, 05:06 PM   #45
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,155

Rep: Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857
rebooted with the keyboard plugged in ( works fine in GRUB ), runs up to the login prompt but then ignores the usb keyboard even if I unplug it and replug it in I also tried a different usb wireless keyboard but plugging in the dongle produced no output to the console , usually there is a few messages indicating that a usb device has been found, the ps2 keyboard works fine.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LFS flushes systemd-udev down the toilet, replaces with eudev ReaperX7 Linux From Scratch 6 03-25-2014 09:38 PM
LXer: Gentoo Team Isolates Udev from Systemd (eudev) LXer Syndicated Linux News 0 05-02-2013 07:12 AM
Slackware and eudev project jb.1234abcd Slackware 1 12-22-2012 07:14 PM
eudev fork aims to be system initialization and distribution neutral H_TeXMeX_H Slackware 1 12-17-2012 02:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 12:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration