LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-20-2016, 09:09 AM   #1
Mitt Green
Member
 
Registered: May 2014
Location: Europe
Posts: 199

Rep: Reputation: 106Reputation: 106
BSD-style and sysv init systems


Hi,

I have a few questions regarding sysvinit and BSD-style init:
  • Are they made from the same source code?
  • Where can I download BSD-init if their source codes are different?
  • What is the difference between Slackware's init and, let's say, NetBSD's?
    Slackware names the package sysvinit but uses BSD-style.
  • Is there a way to switch from sysvinit to BSD-style?

Thanks a lot
 
Old 01-20-2016, 02:33 PM   #2
Rinndalir
Member
 
Registered: Sep 2015
Posts: 733

Rep: Reputation: Disabled
You will get better answers posting this in the slackware forum.

I would download the source for both and compare myself but you might find someone that will do the work for you if you ask nicely.
 
Old 01-20-2016, 05:56 PM   #3
jayjwa
Member
 
Registered: Jul 2003
Location: NY
Distribution: Slackware64, LFS
Posts: 312

Rep: Reputation: 53
1. sysvinit is likely sysvinit-2.88dsf, the last version I know of, http://savannah.nongnu.org/projects/sysvinit. BSD-style is a type or style of system startup which is simplier than others, along the lines of simpleinit that used to come with util-linux, but no longer does, because the new util-linux maintainer has been on a rampage ripping out utilities he personally doesn't use. BSD-style seems to base everything off of /etc/rc with few boot scripts, such as https://www.freebsd.org/cgi/man.cgi?init%288%29

2. See #3

3. AFAIK, Slackware uses sysvinit from #1 above, with boot scripts created/edited for that distro. http://www.slackware.com/config/init.php. NetBSD does this: https://www.netbsd.org/docs/guide/en/chap-rc.html

4. Creating a simple boot system using something based on sysvinit-2.88dsf seems like it would be, in fact, in the style of BSD-init. Maybe you could check out these scripts http://www.safe-mbox.com/~rgooch/linux/boot-scripts/ , modify Slackware's, or write your own using the sysvinit-2.88dsf tools. That last page probably describes the differences better than I did here.
 
Old 01-21-2016, 02:39 PM   #4
Rinndalir
Member
 
Registered: Sep 2015
Posts: 733

Rep: Reputation: Disabled
Also Rob Landley is a bit of a historian on issues like this I think. But he may give more than you need to know. But he may already have info on this at his blog.
 
Old 01-21-2016, 07:16 PM   #5
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 13,710
Blog Entries: 22

Rep: Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604
The FreeBSD Handbook has an excellent description of FreeBSD's init system.

This is a good place to start: https://www.freebsd.org/cgi/man.cgi?query=rc&sektion=8
 
Old 01-22-2016, 11:23 AM   #6
Mitt Green
Member
 
Registered: May 2014
Location: Europe
Posts: 199

Original Poster
Rep: Reputation: 106Reputation: 106
Mates, I am not asking about the difference between both, as I have a lot of expierence in managing them (yours truly is a part-time NetBSD user and has sysvinit on Debian/Devuan). I simply can't find sources for BSD-init to compare them. And maybe try compile it for myself for the sake of experimenting. But thanks for the answers.
 
Old 01-22-2016, 01:38 PM   #7
Rinndalir
Member
 
Registered: Sep 2015
Posts: 733

Rep: Reputation: Disabled
Quote:
Originally Posted by Mitt Green View Post
I simply can't find sources for BSD-init to compare them. And maybe try compile it for myself for the sake of experimenting.
That might require some sleuthing. But not sure. Check gnu maybe and/or look for usenet archives if you haven't already. Post what you find out, now I'm a little curious.
 
Old 01-22-2016, 02:24 PM   #8
Mitt Green
Member
 
Registered: May 2014
Location: Europe
Posts: 199

Original Poster
Rep: Reputation: 106Reputation: 106
Quote:
Originally Posted by Rinndalir View Post
That might require some sleuthing. But not sure. Check gnu maybe and/or look for usenet archives if you haven't already. Post what you find out, now I'm a little curious.
NetBSD sources are hosted via CVS, so I had to look there. Slackware uses absolutely the same init.c as Debian, which is sysvinit. NetBSD uses a different one,
which is 1k lines shorter (1849 vs 2899). paths.c or pathnames.c are the same on Slackware and Debian using the first name, and the second on NetBSD. NetBSD's one is much shorter and simpler.

After browsing a bit sources of Debian's and Slack's, I've found that they use the same sources. I couldn't find init sources for NetBSD in one archive, as they include init, reboot etc. binaries in base.tgz.
 
Old 01-22-2016, 02:35 PM   #9
Rinndalir
Member
 
Registered: Sep 2015
Posts: 733

Rep: Reputation: Disabled
Quote:
Originally Posted by Mitt Green View Post
I couldn't find init sources for NetBSD in one archive, as they include [
Didn't openbsd inherit from netbsd? Have you checked openbsd's tree?
 
Old 01-22-2016, 02:48 PM   #10
Mitt Green
Member
 
Registered: May 2014
Location: Europe
Posts: 199

Original Poster
Rep: Reputation: 106Reputation: 106
Quote:
Originally Posted by Rinndalir View Post
Didn't openbsd inherit from netbsd? Have you checked openbsd's tree?
Well, OpenBSD's one is even shorter by about 400 lines. I am only a beginner in programming, particularly C , you may better compare the code by yourself:
NetBSD's init
OpenBSD's one
sysvinit

All these are init.c.
 
Old 01-24-2016, 11:42 AM   #11
jmccue
Member
 
Registered: Nov 2008
Location: US
Distribution: slackware
Posts: 277

Rep: Reputation: 131Reputation: 131
Quote:
Originally Posted by Mitt Green View Post
Hi,
I have a few questions regarding sysvinit and BSD-style init:
Are they made from the same source code?
Maybe 30+ years ago, but I doubt there is any resemblances now

Quote:
Where can I download BSD-init if their source codes are different?
From one of the *BSD sites

Quote:
What is the difference between Slackware's init and, let's say, NetBSD's? Slackware names the package sysvinit but uses BSD-style.
One big difference, Slackware uses run levels, *BSD has 2 run levels (single/multi)

Quote:
Is there a way to switch from sysvinit to BSD-style?
Probably, but that is a lot of work. Gentoo (and maybe a few others) uses OpenRC which I think is fairly close to Net/FreeBSD init.

John
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
SysV versuses BSD-Style Artimus Linux - General 18 03-02-2016 04:16 AM
PostgreSQL SysV-style init for boot - password? maw269 Linux - Software 0 07-19-2013 06:45 PM
LFS 6.7 - Problem, populating /dev with a BSD-style init jimmy_page_89 Linux From Scratch 3 09-26-2010 02:52 AM
How to use the BSD style init scripts in /etc/rc.d jmbrink26 Slackware 8 09-06-2006 09:32 AM
SysV vs BSD-like gui10 Linux - General 0 12-29-2001 12:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:43 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration