Solved

Needed files to boot Linux

Posted on 2013-10-31
4
560 Views
1 Endorsement
Last Modified: 2013-11-06
Good Day

Is somebody having a graphic with filenames, services and other stuff needed to boot Linux.
I need one to teach our junior System Engineers.

Thanks
1
Comment
Question by:awawada
  • 2
  • 2
4 Comments
 
LVL 20

Accepted Solution

by:
Daniel McAllister earned 250 total points
Comment Utility
"Linux" is actually only the kernel... all the other stuff you see (esp if you have a GUI login) is custom-built by a combination of the distro you've chosen and the user selections made during installation.

In general, the Linux boot process looks something like this (for RHEL and other SYS-V derivatives):
 - Boot loader (BIOS, UEFI, etc) determines hardware config
 - Boot loader loads secondary boot loader (GRUB, LILO, ntldr.dll, etc.)
    NOTE: Some boot loaders (like UEFI) can bypass the secondary boot loader... that's why its there!
 - Kernel detects hardware & loads drivers -- including filesystems
 - Kernel executes initialization scripts based on /etc/inittab

Once you reach this far, every system will be different... different distros yes, but even different installations!

I hope this helps!

Dan
IT4SOHO
0
 
LVL 39

Assisted Solution

by:noci
noci earned 250 total points
Comment Utility
One small addition...

If the kernel uses initramfs ( an initial ramdisk f.e. for auto detecting hardware, encrypted root fs. support  etc.)
Then grub loads the initramfs too, for lilo & (U)EFI support  the kernel needs to be built with a copy of that RAMFS built in.
0
 
LVL 20

Assisted Solution

by:Daniel McAllister
Daniel McAllister earned 250 total points
Comment Utility
noci,

The requirement for an initram filesystem has been deprecated since the early days of GRUB. The purpose was to provide or "auto-load" drivers for devices that were necessary for the system boot to continue.

However, using an initramfs can still be necessary if you have devices needed for booting (like RAID controller drivers, or other odd storage systems -- or a boot fs that is not standard) that are not in the compiled kernel.

Even so, a custom-built kernel can easily remove the need for the initramfs in modern Linux. (I haven't used one personally since the 2.6 kernel came out in RHEL 4).

While not a bad addition to the discussion, I was hesitant to include it because the question appears to apply (so far) only the "generic case" for booting Linux... and since we're talking all flavors of all distributions of Linux (perhaps even Android!), I thought it best to apply KISS and report most everything else as "distro specific" -- even though many have common elements.

Dan
IT4SOHO
0
 
LVL 39

Assisted Solution

by:noci
noci earned 250 total points
Comment Utility
@IT4SOHO,

I run all my laptops and some computer systems and one USB stick based linux with encrypted disks.
For those use cases an initramfs is needed to provide for the scripting needed to unlock the rootfs, that support cannot be easily built into the kernel. I agree that KISS is a sound principle, in the case of mobile systems imho encrypted disks are a requirement and the support of initramfs should be mentioned.
I agree that it does complicate things a little, especialy in the (U)EFI case.

Kind regards,
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now