LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-19-2017, 07:36 AM   #1
HalfMadDad
Member
 
Registered: Jun 2010
Location: Canada
Distribution: Slackware, systemd-garbage
Posts: 143

Rep: Reputation: 9
How Linux works, is this a good approach ?


Hi Everyone

I have been using Linux full time since 2004. I feel I am a competent user but I don't really understand how it works very well. I think diving a little further in would make me a better programmer and user.

I know some people read and build linux-from-scratch. I was wondering about another approach.

If I read up more on the bootstrapping sequence and typed:

ps -aux


and I factored out things like the shell I had to run this in and bash but I studied each process that was started on a newly booted system, would I have a good idea of what is keeping it up and running, offering services? As a side note, I understand that several of the ps results are instances of the same program, for example getty.

Thanks for reading-Patrick
 
Old 03-19-2017, 07:43 AM   #2
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,573
Blog Entries: 19

Rep: Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452
The best way to find out what gets started at boot is probably to work through the init scripts (assuming you are using sysvinit). That's what I did when I started. Read the script in one console, have man pages showing in another and just work out what each script does.
 
1 members found this post helpful.
Old 03-19-2017, 07:58 AM   #3
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,307
Blog Entries: 3

Rep: Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721
Another thing to try would be to use different output layouts for ps, such as a tree:

Code:
ps -ejH | more
ps axjf | more
Then you can see what has started what.
 
1 members found this post helpful.
Old 03-19-2017, 08:08 AM   #4
HalfMadDad
Member
 
Registered: Jun 2010
Location: Canada
Distribution: Slackware, systemd-garbage
Posts: 143

Original Poster
Rep: Reputation: 9
Thanks Hazel and Thanks Turbcapitalist

two excellent ideas ! -Patrick
 
Old 03-21-2017, 03:45 PM   #5
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
Also notice that some of the threads (whose names always begin with "k") are kernel threads.

These "threads" are part of the kernel, and they execute in kernel space under a very special set of rules. This facility allows portions of the kernel to be independently dispatched, with all the advantages that "being a thread" offers, while still remaining "part of the kernel." For instance, a kernel thread can initiate an I/O operation and then wait for that operation to complete, much like a user-land thread can do.

Last edited by sundialsvcs; 03-21-2017 at 03:47 PM.
 
1 members found this post helpful.
Old 03-22-2017, 03:02 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
I'd say that one can learn a lot from LFS but that almost has nothing to do with bootstrap.

There used to be some info both on hardware side and you almost need to know that if you really want to get down to the real parts of booting.

Some places I learned a lot was from sites that deal with loading like peter anvin syslinux pages and grub pages as well as other loaders.

From hardware to loader then you can set up your booting of linux in some form.
 
Old 03-23-2017, 11:16 PM   #7
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 364Reputation: 364Reputation: 364Reputation: 364
My #1 favorite 'small' recent high-rated book, has your Thread title
http://amazon.com/How-Linux-Works-Su.../dp/1593275676

Best wishes; ENJOY studying! p.s. try a '3-piece 7MB' mll! VBoxes?

p.p.s. I ran across a SINGLE free sample chapter .pdf of a [RHCE] book I liked at my local library, on the boot process, GRUB, systemd here. Of course, there's tons 'on the net'; try adding 'wiki' to your web-searches, to get great tutorial articles!

Last edited by Jjanel; 03-24-2017 at 12:19 AM.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Home Backup Server - Is this a good approach? izomiac Linux - Server 10 04-02-2013 10:58 PM
LXer: Fedora @5: How a Community Approach Works LXer Syndicated Linux News 0 09-26-2008 07:41 PM
Need help finding a good laptop that works well with Linux/Gentoo Dralnu Linux - Laptop and Netbook 2 06-16-2006 12:11 AM
What's a good printer that works good with linux? badmofo666 Linux - Hardware 7 02-23-2006 10:10 AM
Good C++ tutorial which works for linux? shadow.blue Programming 7 03-15-2004 11:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:41 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