How to install nosh init system on FreeBSD?

D

Deleted member 63539

Guest


mjollnir Linux does many tricks to help it boot time. FreeBSD is still more like a traditional server oriented OS. It detect and bring the network interface up during boot. Linux detect but do not bring the interface up until the user logged in, NetworkManager only now started to bring the interface up and network accessible. As I said, the major slowness is DHCP, without it, FreeBSD is not much slower than Linux. Another thing to mention, Linux loaded the video driver very early in the boot process and that saved much time for it. FreeBSD on the other hand loaded the drm-kmod module very latter in the boot process, just before DHCP. Yet another thing to consider is most Linux install to Ext4, it native FS. FreeBSD have to use a shim to be able to use ZFS. The kernel module opensolaris.ko and zfs.ko must be loaded. As I know, Linux doesn't have to load a kernel module for Ext4. Yes, it has to check the FS each boot but the fact it doesn't. Only when the FS is marked as dirty, the check would happen, if it's not, it's automatically skipped. After all we are comparing apple with orange here. It only fair to compare a FreeBSD Root On ZFS installation with a Linux Root On ZOL installation. But as I said, most Linux is installed on Ext4.

Please keep in mind, desktop Linux is heavily invested in. FreeBSD desktop, on the other hand, doesn't. Linux is now an advanced desktop system indeed, it could comparable to Windows and MacOS. FreeBSD desktop is just a server with a graphical user interface! And it will not change soon.

Please also keep in mind, each OS has very different boot procedure. The way FreeBSD probing it device now, it will always slower than Linux regardless of init system. If you think a parallel init system could make FreeBSD on par with Linux, please try GhostBSD and have your own conclusion if it's really on par with OpenRC based Linux or not. Don't compare GhostBSD with systemd based Linux, because it's not fair.
 

Jose

Well-Known Member

Reaction score: 227
Messages: 383

When I suggest FreeBSD to Linux users (ordinary, non-nerds), usually they come up with three topics...
So your purely anecdotal "many people believe this" is fine, but my purely anecdotal "no they don't" is clearly wrong?
 

Jose

Well-Known Member

Reaction score: 227
Messages: 383

Well as I qualify for this, then I apparently meet your demands for posting to this thread.

Thanks for allowing me to participate.
So do I. What a relief!

It was in figuring out how to write a unit file for my service that I discovered the documentation is spread across 5-10 huge man pages.
 

unitrunker

Well-Known Member

Reaction score: 194
Messages: 493

Another thing to mention, Linux loaded the video driver very early in the boot process and that saved much time for it. FreeBSD on the other hand loaded the drm-kmod module very latter in the boot process, just before DHCP.
This is relatively recent change in FreeBSD. Before it was loaded from loader.conf but now in rc.conf and I don't know why.
 

mjollnir

Daemon

Reaction score: 699
Messages: 1,154

So your purely anecdotal "many people believe this" is fine, but my purely anecdotal "no they don't" is clearly wrong?
Where did I write this? I can only speak of my experience & observations, and I do not deny your's. Neither of us did a representative survey among Linux desktop users. Please calm down & continue like e.g. gh_origin who supplied factual arguments. Unfortunately, it seems our comrade from Luxembourg is on vacation, or he's not interested to share his experience with runit. Also please keep in mind: I never wrote runit or OpenRC is better than the current BSD init, but I suggested to evaluate if either of them is good enough to be considered an enhancement.
 

Jose

Well-Known Member

Reaction score: 227
Messages: 383

From my observation, I'm 100% agree with you.
Agreed as well. You should be looking into Coreboot if you're worried about boot speeds. Chromeos, which is easily the most successful Linux desktop distro, uses Coreboot and Upstart.
 

mjollnir

Daemon

Reaction score: 699
Messages: 1,154

[...] You should be looking into Coreboot if you're worried about boot speeds. [...]
Well, you might agree that this bears some risks. In the worst case I can throw my laptop into the trash bin. I find race conditions numerous times as an argument throughout this discussion... Even if my model is supported by coreboot, maybe some of it's internal devices is not (e.g. G3 modem, although I'd assume that's very unlikely). Still then, what is under FreeBSD's control wouldn't be faster. Maybe the reasons gh_origin listed do account for most of that.
 

kpedersen

Daemon

Reaction score: 1,021
Messages: 2,020

Here is a suggestion: If you have never created a service from scratch (in source code) and installed it in a systemd-based system and in FreeBSD, maybe you shouldn't have such strong opinions? Or have done another interestingly complex task that involves other init systems compared to FreeBSD (and not just set up a system).
I think that is the problem. So many users today don't understand why systemd (or things like Wayland) have issues because they have not developed for them. They only see it from the users point of view of "Yeah, it works and is *NEW* so I like it". I suspect this is damaging Linux because casual users don't know what is correct.

And I don't believe anyone on these forums is a casual user. Most of this community is technical so has their views which sometimes conflict and that is great. But we do perhaps need to distance ourselves from ideas coming from communities where the majority aren't technical (Linux) and their technologies which again aren't based on technical merit but come from people that only know what color a background wallpaper should be.

Basically I am appalled that the most popular platforms like Windows and Gnome 3 has turned out so impossibly unusable and think we need to be much more careful in future haha!
 

hruodr

Aspiring Daemon

Reaction score: 115
Messages: 532

And I don't believe anyone on these forums is a casual user. Most of this community is technical so has their views which sometimes conflict and that is great. But we do perhaps need to distance ourselves from ideas coming from communities where the majority aren't technical (Linux) and their technologies which again aren't based on technical merit but come from people that only know what color a background wallpaper should be.
I have the impression in the OpenBSD mailing list that people there think everyone there is
a kernel developer. Well, I am a user. I like the computer technology, but I use a computer
as an instrument. People using computers have different levels of consciousness about how
a computer works. Some have ideas of hardware, other of dealing with operating system,
other of operating system design, other of programming, at machine level, other know how
a compiler works, other know more physical parts of the hardware, etc. I remember my
first encounter with computers: just as a FORTRAN programmable machine for doing some
calculations, little knowledge of hardware or operating systems. A low level of consciousness.
I dealt with many computers with different OS in that way. It had a positive side: no distraction
with computer technology. The Linux or Microsoft users you mention have also a low level of consciousness, and that is not necessarily bad. Microsoft must care for them, Linux developers,
as mjollnir for his desktop users :). But my experience is, that life is easier if one takes a
little of time to learn something more and get conscious of how the computer works.
 

vigole

Well-Known Member

Reaction score: 531
Messages: 450

After mjollnir was successfully portrayed as a systemd advocate, we've established that Desktop User is a code, referring to toothless wander on the street.
 

Jose

Well-Known Member

Reaction score: 227
Messages: 383

Well, you might agree that this bears some risks.
Yes, and I'll admit I'm being selfish. You're the only one who suffers if you brick your laptop in an ill-advised attempt to reduce your boot times. We all suffer if you manage to get Freebsd to adopt some screwy init system through your advocacy. Note that the latter is not a hypothetical, most Linuxes adopted systemd because of the advocacy of a few well connected members of the community, and not because it offered any significant tangible benefits.
 

hruodr

Aspiring Daemon

Reaction score: 115
Messages: 532

I start to see the motivation behind ralphbsz's post earlier in that thread.
This thread began with the question how to install nosh init and some answers to it.
Then it was told that nosh init has advantages like systemd, and it was commented
that systemd has no advantages. And then began the critics to FreeBSD init, it was even
called SysVinit, what is clearly not:

Well, I'd rather say it works than call it solid. FreeBSD is great, but that doesn't mean each & every part of it is great, too. The SysVinit we have is really old-fashioned, to put it politely.
Then the tema was a confusion between replacement or alternative to FreeBSD init, but
in any case insistent that FreeBSD init is deficient. I would take joses words seriously:

Note that the latter is not a hypothetical, most Linuxes adopted systemd because of the advocacy of a few well connected members of the community, and not because it offered any significant tangible benefits.
We have now Lua in the boot loader and it got problematic. Was the bootloader instable,
deficient? Did a lot of users need lua there? And yes, not each & every part of FreeBSD is
great, but was necessary to touch the boot loader and is necessary to touch the init?!

What is getting out of hands, Zirias? That few/one person insist that FreeBSD init is deficient,
insist seeing the cause of slow booting on it, that portray themselves as supported by
desktop users on their claims?

And by the way, I find interesting that FreeBSD init was called SysVinit: the classical BSD
critics to SysVinit is that it is unnecessarily complicated.
 

kpedersen

Daemon

Reaction score: 1,021
Messages: 2,020

Yes, this is really getting out of hands.
True, but for anyone who wants more of this, I invite them to check out some of the OPs other posts. Most of them involve questioning why Wayland or other Linux technology is not yet in FreeBSD. Some are valid questions but the discussion often tends to be rather long.
 

Lamia

Aspiring Daemon

Reaction score: 151
Messages: 612

This is relatively recent change in FreeBSD. Before it was loaded from loader.conf but now in rc.conf and I don't know why.
You can choose how you want drivers to load and that is powerful - load them as system boots up or after boot. Servers load faster when you load after boot. Desktop PCs too. Seriously, there is no room for arguments here.
Linux SystemD is borrowing leaf from SysVInit and others. An attack on SystemD internals has severly broken various Linux distros here several times And we needed to restore/reinstall them.We can now sleep well with distros without it.

There is not so much contributions to make to this debate. Choose what works for you.
 

mjollnir

Daemon

Reaction score: 699
Messages: 1,154

[...] We all suffer if you manage to get Freebsd to adopt some screwy init system through your advocacy. Note that the latter is not a hypothetical, most Linuxes adopted systemd because of the advocacy of a few well connected members of the community, and not because it offered any significant tangible benefits.
I'm neither a well-connected FreeBSD community member, nor did I advocated systemd... My objective was to evaluate runit & OpenRC, and IMHO a quick glance into http://smarden.org/runit/benefits.html let me assume it is not a "screwy" init system. I explicitely added: "Obviously these may be biased by the author's opinion,..."
Why do you keep blaming me that I want to destroy FreeBSD while all I did was to point at some topic where FreeBSD could/should be improved & make a proposal how that could be done (aka: constructive critics)?
[...] And then began the critics to FreeBSD init, it was even
called SysVinit, what is clearly not:
I did an incomplete, quick lookup about init systems and that's why I had this term in mind. I corrected that afterwards. Does this minor flaw invalidate substantial points of my critics? I rather interpret this as an attempt to cast a shadow on me, and I consider this as bad style.
Then the thema was a confusion between replacement or alternative to FreeBSD init, but
in any case insistent that FreeBSD init is deficient. [...]
Some technical issues were discussed above, some but not all related to service supervision & monitoring (optional in runit), and the author of runit claims to provide sound solutions (e.g. reliable PID handling and logging). Again, I do not say that this is all done in the right way, but it's worth looking at, right? Isn't it right to look for existing solutions before trying to re-invent the wheel?

hruodr, you wrote about your rather slow/old hardware & minimalistic system. So if you're using UFS, you may benefit by inserting an I/O scheduler with my geom_sched service script & stop suspecting me as your enemy. If you find a bug, drop me a note or fix it yourself and post it as reply. I'll update the script or link your fix in my post. Then you could see one deficiency of the current BSD rc/init yourself: if you want to make it user-friendly (e.g. support service geom_sched rcvar), it's getting ugly. Shell script syntax is commonly considered error-prone. And ~ 50% (?) of all service scripts are basically very similar, i.e. IMHO it would be better (less error-prone) to parameterize a default script and feed the service's configuration into it (No, I do not propose to allow or switch to LUA here). Of course, this is an issue of the current implementation or how it is used, respectively, and not a fundamental problem of BSD init itself.

Long story short: simply denying existent problems is cheap, and repeatedly offending s/o who critizises is bad style.
 

mjollnir

Daemon

Reaction score: 699
Messages: 1,154

PS: I measured boot times: from hibernate state back to GUI: ~30 sec., from FreeBSD boot screen to GUI login: ~30 sec., too. From power-off to boot screen would add ~10 sec., starting the GUI ~10 sec.?
I have 12GB RAM, that is the size of the hibernation partition on a SSD, too, and a 12/15W TDP CPU (dual core i7-5600U@2.6GHz). So yes, suspend/resume/hibernate is significantly faster than booting, but now & then the 3G modem does not initialize (it hangs, only reboot get's it back), and some network monitoring utilities get confused that the interface went down (I'm dialing in via WWAN, WLAN would have the same issue, I guess, i.e. if the access point closed the connection). The latter is not important to me, and obviously is a bug of these utilities. Nevertheless these are normal problems in an imperfect world, and a good reason to prefer a clean boot to suspend/resume/hibernate.
 

Zirias

Aspiring Daemon

Reaction score: 463
Messages: 961

Long story short: simply denying existent problems is cheap, and repeatedly offending s/o who critizises is bad style.
Although I still don't think there are "existent problems", I agree with your criticism how this "discussion" is conducted. Everyone has different preferences, and one of mine is that I want an init system with a classic /etc/rc, so I can do anything with shell scripting. And also, I think mewburn rc is (one of) the best in existence. It is far from the mess SysV-init with its runlevels and symlinks is. Still I see your points, but I think they might be better addressed with optional packages that don't replace init.
 

hruodr

Aspiring Daemon

Reaction score: 115
Messages: 532

I did an incomplete, quick lookup about init systems and that's why I had this term [SysVinit] in mind. I corrected that afterwards. Does this minor flaw invalidate substantial points of my critics?
Yes!

Yes, because init is one of the well known differences between BSD and SysV. One could say
essential difference. This is a very old and known issue. BSD people kept aware that there
is nothing to win, more to lose by inflating init. SysV inflated init with a lot of non sense
"run levels", while BSD init has in principle only two: the normal one and single user mode
for the case when rc fails. But SysV inflation was not enough to them, linux came with
systemd. And by the way, I do not like the inflated rc scripts structure of FreeBSD.

You did not know that? Perhaps because you are not originally a BSD user, perhaps a Linux
user. Why should every unix like system become linux like?! And inflating init means without
doubt going away from unix. If you like linux or Solaris (SysV), then use Linux or Solaris!
You want to expand the user basis of FreeBSD with linux configurated people? No thanks!

I do not consider you an enemy. And thanks for your offer, but I am happy with FreeBSD as
I use it. Exactly because I use it as desktop I do not start X11 or internet at boot time, but
manually when I need a GUI or internet connection.
 

Zirias

Aspiring Daemon

Reaction score: 463
Messages: 961

You did not know that? Perhaps because you are not originally a BSD user, perhaps a Linux
user.
In other news, the POTUS just complained that nobody liked him...
Exactly because I use it as desktop I do not start X11 or internet at boot time
Cause that's what desktops definitely shouldn't have by default nowadays -- a GUI or internet. Thanks for clarifying that.
 

teo

Aspiring Daemon

Reaction score: 29
Messages: 616

In other news, the POTUS just complained that nobody liked him...

Cause that's what desktops definitely shouldn't have by default nowadays -- a GUI or internet. Thanks for clarifying that.
What you have to read, nowadays everybody uses the desktop graphic interface whether it's a mobile phone or a computer, the only ones that don't need the desktop graphic interface are the servers that few users use, and that's why the BSD debility is about to disappear.
 

Jose

Well-Known Member

Reaction score: 227
Messages: 383

I'm neither a well-connected FreeBSD community member, nor did I advocated systemd...
The Freebsd community is much smaller, and therefore potentially easier to influence. I stayed out of the systemd thing because I was a Gentoo user and I didn't get wanna get involved. I'm not making that mistake again.

My objective was to evaluate runit & OpenRC, and IMHO a quick glance into http://smarden.org/runit/benefits.html let me assume it is not a "screwy" init system. I explicitely added: "Obviously these may be biased by the author's opinion,..."
And I already explained to you why my lengthy experience with Openrc makes it a non-starter for me. I haven't really used runit enough to have an informed opinion. My limited exposure to it as an init system was positive, but I still wonder if the same race conditions that effectively killed parallel startup in Openrc won't arise if I were to use runit in anger.

Why do you keep blaming me that I want to destroy FreeBSD while all I did was to point at some topic where FreeBSD could/should be improved & make a proposal how that could be done (aka: constructive critics)?
I don't think you're trying to destroy Freebsd, and I'm not blaming you for anything. I heartily agree with you on Poudriere vs Portmaster and I hope that further separation of the build system from the deploy system will come to Freebsd. However, I am going to strongly disagree with you and anyone else who thinks 30 seconds of boot time are worth royally screwing up system startup for everyone.
 

kpedersen

Daemon

Reaction score: 1,021
Messages: 2,020

everybody uses the desktop graphic interface whether it's a mobile phone or a computer
Don't be so sure about that. A large proportion of technical users (i.e most Linux / BSD userbase) use nothing else apart from a bunch of maximized terminal windows (i.e residing in dwm, sway, etc). Your view of a WIMP interface being what users want is considered old fashioned and stems from the old haydays of Windows 95.

Even consumer Windows is becoming "modern" with a proper terminal.
 

mark_j

Aspiring Daemon

Reaction score: 327
Messages: 641

PS: I measured boot times: from hibernate state back to GUI: ~30 sec., from FreeBSD boot screen to GUI login: ~30 sec., too. From power-off to boot screen would add ~10 sec., starting the GUI ~10 sec.?
I have 12GB RAM, that is the size of the hibernation partition on a SSD, too, and a 12/15W TDP CPU (dual core i7-5600U@2.6GHz). So yes, suspend/resume/hibernate is significantly faster than booting, but now & then the 3G modem does not initialize (it hangs, only reboot get's it back), and some network monitoring utilities get confused that the interface went down (I'm dialing in via WWAN, WLAN would have the same issue, I guess, i.e. if the access point closed the connection). The latter is not important to me, and obviously is a bug of these utilities. Nevertheless these are normal problems in an imperfect world, and a good reason to prefer a clean boot to suspend/resume/hibernate.
You can install runit from ports. Maybe give that a try and compare your suspend/restart times?
With the modem, does usbconfig reset help?

I think it's self evident that FreeBSD has a way to go with support for suspend on all devices. The thing is, I also find that FreeBSD's boot time is mainly spent enumerating devices and, if you have them, IO cards like SCSI/SAS etc.

I also think it's obvious that some things could benefit by starting simultaneously, such as syslog/cron/sendmail etc. Why these are not started in "the background" has always been contentious if you ask me. For example, the old UFS system always did "background checks" of the file system.

So could some services be backgrounded so you hit the login prompt quicker? For sure, so I suggest you join the freebsd-arch mailing list and pose the question (I think that's the right group?) and see what comes of it. I'm pretty sure no core people even browse these forums.

In summary, I'm not unsympathetic to your plight. I don't believe you're an advocate for that evil systemd 😡 and I don't think a change of the init system is warranted, but then my vote counts for nought also.
 
Top