Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
against the current
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
axl
l33t
l33t


Joined: 11 Oct 2002
Posts: 637
Location: Romania

PostPosted: Sat May 14, 2016 10:14 pm    Post subject: against the current Reply with quote

based on the recent discussion on systemd, I started thinking about my youth. back when i was playing with slackware 6/7. before gentoo. back when i fiddled with the init scripts.

apparently i went as far as udev. still not clear to me, what i am missing. i bet it's something terribly simple.


so the story goes like this. at first I was so very pro systemd. i thought, it had a place in the world. now, as time progresses, i am thinking more and more it has a place in the world, but not my system.

so here in this thread (https://forums.gentoo.org/viewtopic-t-1031982-postdays-0-postorder-asc-start-225.html) at some point, NeddySeagoon suggests https://wiki.gentoo.org/wiki/Old_Fashioned_Gentoo_Install this page (which he wrote himself) to get rid of some bloatware.

amazing pointers. like i said. systemd is a wonderful thing for tablets and things that need them, but not my system.

but i've run into trouble. i can get rid of systemd & co. can boot with openrc. have some bugs to iron out but am booted right now and everything started up right.

IT's just udev i can't get rid off. am sure it's something obvious and simple i'm missing. i'm too tired now to try to figure it out. which includes rc.local > somelog. not even the keyboard is working. i'm suspecting the /etc/init.d/modules or /dev.

maybe the kernel.

i know there was one point when you didn't have to have a static dev. and that is NOT when udev got started. but am fuzzy where are the edges.

right now, i have udev on, last remnant, and "Maintain a devtmpfs filesystem to mount at /dev" set to yes. I am thinking, i dont want static dev. nor udev. can't i just let the kernel figure crap shit out? it used to do that ... :(
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7188
Location: almost Mile High in the USA

PostPosted: Sat May 14, 2016 10:32 pm    Post subject: Reply with quote

There was a completely "in-kernel udev" at one point where the kernel would automatically populate a directory which is used as /dev. However that got deprecated (and subsequently removed) for udev because udev can be programmed to change owners and modes of the /dev/ files which isn't cleanly handled in kernel space.

You can use eudev or mdev (busybox) to do what udev does (which is part of the systemd package) if you simply do not want to emerge the udev-systemd package.

Indeed having a dynamic /dev is absolutely unnecessary. It's simply a nicety of modern systems as it keeps /dev clean and if you reboot your system often, blackhats hiding crap in /dev becomes very difficult (it was a very common practice in the past for hackers to hide files in /dev as people tend to gloss over thousands of fake /dev entries for rootkit files.) But as long as you have a static system, a static, minimal /dev works just fine. I'm not sure how people handle /dev/pts, I suppose that's the exception to the rule for static /dev... I'm glad that old /dev/tty[pqrstuvwxyzAB][0-9a-f] mess is gone with this, and the first Un*x I had was Xenix which was implemented just like that.

Alas systemd and udev and all these "modern" things are niceties specific for dynamic systems that don't stay put - tablets, laptops, and the such that keep on changing their configuration whether a network changed, a disk gets changed, power supply gets changed, or even someday a display gets changed.

If your keyboard isn't working, you have your kernel compiled with keyboard/HID/... support? and have kmod started if it's a module?
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43546
Location: 56N 3W

PostPosted: Sat May 14, 2016 10:42 pm    Post subject: Reply with quote

axl,

Once upon a time :) there was static /dev. Its all there was but it was cluttered.
Then along came devfs, which was a first attempt at a dynamic /dev. In the early 2.4 kernels it ran side by side with udev.
Early udev was quite different than today. It did all of the /dev management in its youth, now its more of a whipper in, looking after symlinks and permissions.
The hard work is done by DEVTMPFS in the kernel.

If you throw away udev, DEVTMPFS will still make your /dev nodes but the permissions on some will be incorrect.

There is a gentoo fork of udev, called eudev, which does all the same things, installs the same libraries and for the moment at least, tracks udev.
It has its own code repository. so there is no need to build all of systemd then extract the udev binary before throwing the rest away.
For new installs eudev is the default. Switching to eudev is
Code:
emerge -C udev && emerge -1 eudev
being careful to not reboot in the middle.
Follow the on screen instructions to restart the udev service.

Then there is mdev, which does things its own way.

How far back do you want to go?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
axl
l33t
l33t


Joined: 11 Oct 2002
Posts: 637
Location: Romania

PostPosted: Sun May 15, 2016 10:07 am    Post subject: Reply with quote

thanks for the replies.

well atm, I am having my coffee and try to reassess the situation. i already liberated most of the machines i wanted to liberate of the stuff i wanted to liberate it from.

Not sure on udev though. some of the machines will need some sort of xdev to manage permissions on connected/disconnected devices. static dev wont work. on others, i want to try it.

what i can't figure out, is one particular machine. has udev (now)... keyboard still wont work. i think i messed the kernel up. that's why i need coffee first, work later.

i think this issue needs a little more consideration. I am thinking of a lot of unpleasant things that could happen in a static dev environment. surely a good sysadmin can go around them... but i dont know if i want to make my life this difficult.

I think first thing I am going to try is to disable udev flag, but KEEP CONFIG_DEVTMPFS and CONFIG_DEVTMPFS_MOUNT. then migrate slowly towards static dev on those machines that dont have stuff that connects/disconnects/users and eudev/mdev/udev on those that do.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43546
Location: 56N 3W

PostPosted: Sun May 15, 2016 10:59 am    Post subject: Reply with quote

axl,

Without something to fix permissions and so on in /dev, you may find that things break for ordinary users.
Static /dev gets around that as things are well, static.
With DEVTMPFS, you can still make manual changes to /dev but its all in tmpfs, so changes drop out at reboot.

You shouldn't need DEVTMPFS_MOUNT unless your initrd depends on it. Openrc mounts it as part of the boot process.
That's a can of worms too. You will need to tell openrc not to mount /dev once you go static, or it will mount an empty tmpfs on /dev over the top of your static /dev.
That's a bad thing.

A few keyboards need odd kernel modules. Keyboard not working is unlikely a xdev thing.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1753

PostPosted: Sun May 15, 2016 11:14 am    Post subject: Reply with quote

What is your problem with /dev actually?

Code:
# grep '/dev[[:space:]]' /etc/fstab
devtmpfs      /dev      devtmpfs   defaults      0 0
# grep 'pts[[:space:]]' /etc/fstab
devpts         /dev/pts   devpts      noauto      0 0

You have to mkdir /dev/pts after mounting devtmpfs before you can mount devpts. That directory is not provided by default.
By default all nodes belong to root. For embedded system it seems to be fine (just run your stuff as root, there is not much to damage beside of your application anyway).
In many cases you may want to change the permissions though, with more or less subtle way. mdev can do that for you. You can do that with a script made by yourself (e.g. only change permissions on devices your application should be allowed direct access)

Note: some devices (particularly USB devices) come with a flip-flop switch. They will present themselves as a device A when you plug them, and as a device B (the one you actually want) after you send a command to switch. Udev has a nice database of those devices and commands that trigger switch. I don't know how to make use of this without udev itself. Never needed is so far, but I might need once you want to plug GSM modem into an ARM board.


Last edited by szatox on Sun May 15, 2016 11:22 am; edited 1 time in total
Back to top
View user's profile Send private message
axl
l33t
l33t


Joined: 11 Oct 2002
Posts: 637
Location: Romania

PostPosted: Sun May 15, 2016 11:21 am    Post subject: Reply with quote

NeddySeagoon wrote:
axl,

Without something to fix permissions and so on in /dev, you may find that things break for ordinary users.
Static /dev gets around that as things are well, static.
With DEVTMPFS, you can still make manual changes to /dev but its all in tmpfs, so changes drop out at reboot.


after consideration, i thought the same thing. i will only need to fix perms on systems that well... have users. root doesn't have this problem. and if those users actually use ... devices. again, more consideration is required on my part. but at least now i figured it out :)

Quote:
You shouldn't need DEVTMPFS_MOUNT unless your initrd depends on it. Openrc mounts it as part of the boot process.


thanks. didn't know that.

Quote:
That's a can of worms too. You will need to tell openrc not to mount /dev once you go static, or it will mount an empty tmpfs on /dev over the top of your static /dev.
That's a bad thing.


another good point.

Quote:
A few keyboards need odd kernel modules. Keyboard not working is unlikely a xdev thing.


I know. I mentioned I think it's the the kernel. usb modules to be exact. Think that machine used to have a PS2 keyboard and now I am using a USB one.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43546
Location: 56N 3W

PostPosted: Sun May 15, 2016 11:22 am    Post subject: Reply with quote

szatox,

Yes, that works. Maybe I would have done that if I had thought about it at the time.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1753

PostPosted: Sun May 15, 2016 11:25 am    Post subject: Reply with quote

Quote:
Think that machine used to have a PS2 keyboard and now I am using a USB one.

Any chance you're missing HID drivers?
Code:
zcat /proc/config.gz | grep _HID_
Back to top
View user's profile Send private message
axl
l33t
l33t


Joined: 11 Oct 2002
Posts: 637
Location: Romania

PostPosted: Sun May 15, 2016 11:25 am    Post subject: Reply with quote

szatox wrote:
What is your problem with /dev actually?

Code:
# grep '/dev[[:space:]]' /etc/fstab
devtmpfs      /dev      devtmpfs   defaults      0 0
# grep 'pts[[:space:]]' /etc/fstab
devpts         /dev/pts   devpts      noauto      0 0

You have to mkdir /dev/pts after mounting devtmpfs before you can mount devpts. That directory is not provided by default.
By default all nodes belong to root. For embedded system it seems to be fine (just run your stuff as root, there is not much to damage beside of your application anyway).
In many cases you may want to change the permissions though, with more or less subtle way. mdev can do that for you. You can do that with a script made by yourself (e.g. only change permissions on devices your application should be allowed direct access)

Note: some devices (particularly USB devices) come with a flip-flop switch. They will present themselves as a device A when you plug them, and as a device B (the one you actually want) after you send a command to switch. Udev has a nice database of those devices and commands that trigger switch. I don't know how to make use of this without udev itself. Never needed is so far, but I might need once you want to plug GSM modem into an ARM board.


Thanks for this as well. I know that's another can of worms I have to look at. I'll get to it. Just didn't get around to it yet.
Back to top
View user's profile Send private message
axl
l33t
l33t


Joined: 11 Oct 2002
Posts: 637
Location: Romania

PostPosted: Sun May 15, 2016 11:30 am    Post subject: Reply with quote

szatox wrote:
Quote:
Think that machine used to have a PS2 keyboard and now I am using a USB one.

Any chance you're missing HID drivers?
Code:
zcat /proc/config.gz | grep _HID_


Yup. kernel recompiling now.
Back to top
View user's profile Send private message
axl
l33t
l33t


Joined: 11 Oct 2002
Posts: 637
Location: Romania

PostPosted: Sun May 15, 2016 12:31 pm    Post subject: Reply with quote

how to shoot yourself in the foot.

when you encounter that "runscript is deprecated, use openrc-run instead" go and batch modify all files in /etc/init.d/ with:

for a in `ls`; do cat $a | sed -e 's/#!\/sbin\/runscript/#!\/sbin\/openrc-run/' > tmp; mv tmp $a; done

but ofc forget to chmod a+x *. your system will boot REALLY fast but do nothing :D
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43546
Location: 56N 3W

PostPosted: Sun May 15, 2016 3:54 pm    Post subject: Reply with quote

axl,

If you have done a little programming you may appreciate How to Shoot Yourself In the Foot. It gets bigger every time I look it up.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3148
Location: Illinois, USA

PostPosted: Sun May 15, 2016 4:49 pm    Post subject: Reply with quote

NeddySeagoon wrote:
axl,

If you have done a little programming you may appreciate How to Shoot Yourself In the Foot. It gets bigger every time I look it up.


Thank You! I particularly enjoyed the Java and Perl. Was confused by the Unix then came the revelation.
Back to top
View user's profile Send private message
axl
l33t
l33t


Joined: 11 Oct 2002
Posts: 637
Location: Romania

PostPosted: Sun May 15, 2016 7:56 pm    Post subject: Reply with quote

evening. so today i tried out a desktop machine. I'm almost done.

still need to compile chromium. w3m is weird. :) figure out a replacement for evolution (which i assume wont work without systemd - haven't tried yet) - but i guess i could settle with alpine for now, or just my phone.

I'm very happy i found the perfect replacement for gnome-3. i loved evolution back 15 years ago... i still love it. does exactly what gnome-3 does... but better, faster and with fewer resources.

i dont really like eterm though. uhm. there is some appeal to it... but dont know i'll settle with it in the end.
Back to top
View user's profile Send private message
axl
l33t
l33t


Joined: 11 Oct 2002
Posts: 637
Location: Romania

PostPosted: Sun May 15, 2016 9:32 pm    Post subject: Reply with quote

on some level, this feels very weird. i'm running 15 year old code. am sure some parts of it are modern (like chromium) but still... it feels very weird.

brings up many memories. the bluesteel theme. teh colors, teh menus. not necessarily conscious memories. just stuff u already know, but dont know from where.

the screen is bigger. the text moves along a lot faster... but the rest... there's a creepy familiarity to it that makes me want to boot osx and hug it for a while. even windows. damn this feels weird.

i know ITS GOOD. i'm not an idiot. just feels weird.


PS fonts also look different. maybe even better. smaller, but as i find where to make them bigger... i also notice they look better. really like the e compositor. it's wonderful. but still feels so weird. why is that?
Back to top
View user's profile Send private message
axl
l33t
l33t


Joined: 11 Oct 2002
Posts: 637
Location: Romania

PostPosted: Sun May 15, 2016 11:48 pm    Post subject: Reply with quote

about old things... still to this day i assume gd flag has nothing to do with gd library and glibc. not really sure why that flag carried on for so many years. just as the gtk flag in gcc.

there's another thread in the forums about interpreting flags. gd in glibc and gtk in gcc puzzle me for 15 years. why?
Back to top
View user's profile Send private message
axl
l33t
l33t


Joined: 11 Oct 2002
Posts: 637
Location: Romania

PostPosted: Mon May 16, 2016 12:16 am    Post subject: Reply with quote

https://forums.gentoo.org/viewtopic-t-1022050-highlight-overlay+gnome+systemd.html

tomorrow ima try that.
Back to top
View user's profile Send private message
axl
l33t
l33t


Joined: 11 Oct 2002
Posts: 637
Location: Romania

PostPosted: Mon May 16, 2016 12:17 am    Post subject: Reply with quote

also people talking about the pastafarian faith, reminded me of patrick volkerding. he's one of those people...
Back to top
View user's profile Send private message
axl
l33t
l33t


Joined: 11 Oct 2002
Posts: 637
Location: Romania

PostPosted: Tue May 17, 2016 7:48 pm    Post subject: Reply with quote

axl wrote:
also people talking about the pastafarian faith, reminded me of patrick volkerding. he's one of those people...


on my haswell desktops (that need nvidia-drivers - STILL - with 4.6) i felt it was a bad move to try to fight systemd. well... felt is the wrong word. i tried.

it basically makes the rig retarded. i was especially bothered when i had no sound. i do remember the days when you had to bother with emu10k1. alsa. back then oss was the standard. people were pushing alsa.

it caught eventually. just like xfs. xfs is a wonderful fs. it might not be the best at this, that or the other, but it is the all around ... winner of it all. at least in my opinion. i remember when you had to patch your kernel to use xfs. back in 2.2/2.4 days.

openrc and no systemd and stuff is wonderful on a raspberry pi. or a very occult server. but on a modern platform...

u want gnome. i loved enlightenment for a very long time. i expected the best from e17. but it's gnome 3 that delivered it. it is what it is.

i wonder about zfs. but ... that is one type of systemd i will avoid. also wonder about phantom os.


enlightenment gnome sure. no kde. never. not even once.

well ofc i tried them all. not my style.

xfce is like trying windows 95.

gnome has that "je ne sais quoi". i can't. i just can't part with it. that's on top of osx/windows. gnome... is my way.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43546
Location: 56N 3W

PostPosted: Tue May 17, 2016 8:07 pm    Post subject: Reply with quote

axl,

You don't have to use systemd to have Gnome.
Finding the HOWTO is left as an exercise for the reader.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3148
Location: Illinois, USA

PostPosted: Wed May 18, 2016 12:05 am    Post subject: Reply with quote

axl wrote:
... i expected the best from e17. but it's gnome 3 that delivered it. it is what it is.
...
xfce is like trying windows 95.


Gnome was OK until it turned into Windows 8. And what was wrong with the Win95 interface? (ignore the ugliness below the interface, I'm ignoring the ugliness below Gnome)
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Wed May 18, 2016 11:02 am    Post subject: Reply with quote

What is this, a blog? ;p
Back to top
View user's profile Send private message
axl
l33t
l33t


Joined: 11 Oct 2002
Posts: 637
Location: Romania

PostPosted: Wed May 18, 2016 10:24 pm    Post subject: Reply with quote

steveL wrote:
What is this, a blog? ;p


i think this remark is fair. but why can't it be?

once you know what a topic is about, you could just go around it if you ... especially dont like me. i can see how some people might not like me. even i dont like me. :)
Back to top
View user's profile Send private message
axl
l33t
l33t


Joined: 11 Oct 2002
Posts: 637
Location: Romania

PostPosted: Wed May 18, 2016 10:35 pm    Post subject: Reply with quote

Tony0945 wrote:
axl wrote:
... i expected the best from e17. but it's gnome 3 that delivered it. it is what it is.
...
xfce is like trying windows 95.


Gnome was OK until it turned into Windows 8. And what was wrong with the Win95 interface? (ignore the ugliness below the interface, I'm ignoring the ugliness below Gnome)



from my point of view, it's just a matter of preference. i expect some people actually love win95 feel & look. the gnome-2 look&feel. not saying it's something wrong with that.

but i'm ignorant in this regard. i never liked 95.

i simply don't find it efficient in the way i run my stuff. i was an enlightenment man until gnome 3 hit. and i really like gnome 3. beyond politics and systemd, i really really like gnome-3. makes me feel comfortable. the upper left corner thingie, move between desktops with alt+fx. various key combos and things. the beautiful evolution. i really love evolution. just as much as (al)pine. and ofc, the terminal.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum