LinuxQuestions.org
Review your favorite Linux distribution.
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 09-25-2015, 09:01 PM   #61
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

devd and udev are similar in functionality. Other than the fact udev was coded for Linux and devd for BSD, they share somewhat similar functionality, but their code is different on many levels.

devd, for a while, required hald as a step-in to serve as a hardware device manager as well as other functionalities it lacked at the time. However, devd has matured since FreeBSD 11.0 has been worked on, and it's very close to the same functionality as udev, however, it does not have the same interfaces at the API layer which is why desktops like Xfce and such still lack automounting of hotplugged USB drives. udev also provided gudev for gobject-introspection and usage of the Gnome Virtual File System for hotswapped USB drives. This means udisks can not be used to handle automounting and limits some functionality back to standard user based controls.

Last edited by ReaperX7; 09-25-2015 at 09:04 PM.
 
Old 09-27-2015, 12:16 AM   #62
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Rep: Reputation: 167Reputation: 167
Quote:
Originally Posted by ReaperX7 View Post
devd and udev are similar in functionality. Other than the fact udev was coded for Linux and devd for BSD, they share somewhat similar functionality, but their code is different on many levels.

devd, for a while, required hald as a step-in to serve as a hardware device manager as well as other functionalities it lacked at the time. However, devd has matured since FreeBSD 11.0 has been worked on, and it's very close to the same functionality as udev, however, it does not have the same interfaces at the API layer which is why desktops like Xfce and such still lack automounting of hotplugged USB drives. udev also provided gudev for gobject-introspection and usage of the Gnome Virtual File System for hotswapped USB drives. This means udisks can not be used to handle automounting and limits some functionality back to standard user based controls.
I figured... But, I am almost willing to try anything since udev is such a piece of crap. I've got a message right now I am trying to fix where the KERNEL consistently names a device and udev changes it, with no directive to do any such thing. Why on earth would anyone ever program a DEFAULT behavior like that? It's just nonsense to change a behavior that's worked for decades with no good reason.
 
Old 09-27-2015, 03:12 AM   #63
Mihail Zenkov
LQ Newbie
 
Registered: Sep 2015
Location: Belarus, Vitebsk
Distribution: LFS
Posts: 19

Rep: Reputation: Disabled
Quote:
Originally Posted by Luridis View Post
I figured... But, I am almost willing to try anything since udev is such a piece of crap. I've got a message right now I am trying to fix where the KERNEL consistently names a device and udev changes it, with no directive to do any such thing. Why on earth would anyone ever program a DEFAULT behavior like that? It's just nonsense to change a behavior that's worked for decades with no good reason.
You can try mdev from busybox + devtmpfs. I use it in my system last five years (desktop+notebook). It simple, fast and debug friendly.

Useful links:
http://git.busybox.net/busybox/plain/docs/mdev.txt
https://github.com/slashbeast/mdev-like-a-boss
 
Old 09-27-2015, 08:02 AM   #64
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
Mdev was experimented with by a few of us. It is harder to get working though. Mdev-like-a-boss helped greatly. You should try mdev with busybox-init.

Udev isn't totally bad. It works, but it requires a bit of taming.

Vdev is still being worked on and should be nearing its trial stages. When completed it should be able to replace udev outright.

Last edited by ReaperX7; 09-27-2015 at 08:12 AM.
 
Old 09-27-2015, 08:14 AM   #65
Mihail Zenkov
LQ Newbie
 
Registered: Sep 2015
Location: Belarus, Vitebsk
Distribution: LFS
Posts: 19

Rep: Reputation: Disabled
Quote:
Originally Posted by ReaperX7 View Post
It is harder to get working though.
Why?
 
Old 09-27-2015, 08:54 AM   #66
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
Mdev requires more configuration and often most devices have to be manually added to the system to work properly. Mdev isn't as automated as udev is.
 
Old 09-27-2015, 09:37 AM   #67
Mihail Zenkov
LQ Newbie
 
Registered: Sep 2015
Location: Belarus, Vitebsk
Distribution: LFS
Posts: 19

Rep: Reputation: Disabled
Quote:
Originally Posted by ReaperX7 View Post
Mdev requires more configuration and often most devices have to be manually added to the system to work properly. Mdev isn't as automated as udev is.
System (if we talk about LFS) should work properly without mdev or udev. Devtmpfs enough for this. We need mdev only if we want some hotplug reaction.
 
Old 09-27-2015, 09:51 AM   #68
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Rep: Reputation: 167Reputation: 167
I'm not saying that Linux plumbing doesn't need work either. I just think a lot of what's being done is of poor design. (Though, I can't speak for the packages you two mentioned.)

SysV is still fine for servers, but something for desktop, particularly mobile, is needed. At the same time the replacement need not be more than a process manager. Personally, with what we know today, I think a completely new way of doing it is in order that doesn't involve consolidation.

At the same time, some of the Unix philosophy guys are going a little too far too. Mainly in the area of interpretation of KISS and the idea that programs should do one thing only. If every program did only one thing, we'd have hundreds of thousands of executables in a single desktop. Which, to me, sounds just as complicated as one program that does two thousand things. Imagine a web browser that required a separate exec for images, sound, forms and double that for two tabs. The kernel does more than one thing, so does the CLI and there are commands that do multiple things that manage to do them all well.

When it comes to KISS, I prefer Einstein's idea, "Everything should be as simple as possible and no simpler." So, I tend to think of such things like a floating point number... How much do I need to carry and how much resolution is enough.
 
1 members found this post helpful.
Old 09-27-2015, 10:08 AM   #69
Mihail Zenkov
LQ Newbie
 
Registered: Sep 2015
Location: Belarus, Vitebsk
Distribution: LFS
Posts: 19

Rep: Reputation: Disabled
Quote:
Originally Posted by Luridis View Post
At the same time, some of the Unix philosophy guys are going a little too far too. Mainly in the area of interpretation of KISS and the idea that programs should do one thing only. If every program did only one thing, we'd have hundreds of thousands of executables in a single desktop. Which, to me, sounds just as complicated as one program that does two thousand things. Imagine a web browser that required a separate exec for images, sound, forms and double that for two tabs. The kernel does more than one thing, so does the CLI and there are commands that do multiple things that manage to do them all well.
You, right - but only if program still do one thing
For example: ffmpeg have many av format, av filters, etc, but it only work with media - it not file manager/database/text editor.
Kernel also work only with hardware.

Quote:
Originally Posted by Luridis View Post
When it comes to KISS, I prefer Einstein's idea, "Everything should be as simple as possible and no simpler." So, I tend to think of such things like a floating point number... How much do I need to carry and how much resolution is enough.
IMHO we already have good and simple stack for hardware:
kernel - work with hardware
devtmpfs - show devices to userspace software
proc/sysfs - control kernel and hardware
mdev/udev - control hotplug reaction
 
Old 09-27-2015, 10:34 AM   #70
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Rep: Reputation: 167Reputation: 167
I see where your coming from... Perhaps my understanding of "one thing" is too sharply focused.
 
Old 09-28-2015, 03:51 AM   #71
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
The purpose of writing programs that do one thing and does it well was the issue of quality software over quantity of software. If a program does only the job it's intended to do, fixing problems becomes trivial.

You can run LFS without udev or mdev, if you know how to use kmod's mknod utility proficiently.

BLFS has a section on how to set up device nodes in /dev and use the /etc/sysconfig/modules script to manually load drivers.

Last edited by ReaperX7; 09-28-2015 at 03:54 AM.
 
Old 09-28-2015, 04:22 AM   #72
Mihail Zenkov
LQ Newbie
 
Registered: Sep 2015
Location: Belarus, Vitebsk
Distribution: LFS
Posts: 19

Rep: Reputation: Disabled
Quote:
Originally Posted by ReaperX7 View Post
You can run LFS without udev or mdev, if you know how to use kmod's mknod utility proficiently.

BLFS has a section on how to set up device nodes in /dev and use the /etc/sysconfig/modules script to manually load drivers.
You right, but on modern kernel we can just set CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y.

Also, it quite easy to configure mdev for loading modules, just one line in mdev.conf:
Code:
$MODALIAS=.*    0:0 660 @ /sbin/modprobe "$MODALIAS"
 
Old 09-28-2015, 09:27 AM   #73
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
Not entirely certain, but I'm not certain if we ever crafted an mdev init bootscript that was useable by LFS.
 
Old 09-28-2015, 05:10 PM   #74
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Rep: Reputation: 167Reputation: 167
Quote:
Originally Posted by ReaperX7 View Post
The purpose of writing programs that do one thing and does it well was the issue of quality software over quantity of software. If a program does only the job it's intended to do, fixing problems becomes trivial.
The view of "simple" I mention is apparently based on other people's misunderstanding and misquoting the philosophy. Some people explain the "one thing" as if it means singular in activity. I think that's going too far. One domain, sure... Needing a separate executable for every menial task is too much though.
 
Old 09-29-2015, 09:57 AM   #75
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 628

Rep: Reputation: 185Reputation: 185
Mdev-like-a-boss has an mdev bootscript that I modified for LFS. It worked fine. Actually Busybox init and mdev both worked well for LFS. The troubles began with BLFS where packages exist that expect udev to be present. And I had to learn how to write in mdev.conf to get predictable handling of USB devices. Anyway, it all worked and was interesting, but I went back to Eudev (especially since the LFS book returned to it at about that time). I still use Busybox init and my own bootscripts though.
 
  


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:06 PM.

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