LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-10-2011, 12:14 PM   #1
shariefbe
Member
 
Registered: Aug 2008
Location: Tiruchirappalli, India
Distribution: UBUNTU 11.04
Posts: 368

Rep: Reputation: 31
Need basics of booting process


Dear friends,

I want to know the basics linux booting process. I googled for this but i didn't find the detailed things anywhere. I want to know the boot process including the hardware work flow. Can anyone give me the detailed tutorial to learn about this.

Thank you
 
Old 07-10-2011, 12:18 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
This may be what you are looking for.
 
Old 07-10-2011, 12:25 PM   #3
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
Dou you nwant the basics or the details

http://www.thegeekstuff.com/2011/02/linux-boot-process/ gives the basics

What do you mean by hardware workflow?
 
Old 07-10-2011, 12:44 PM   #4
shariefbe
Member
 
Registered: Aug 2008
Location: Tiruchirappalli, India
Distribution: UBUNTU 11.04
Posts: 368

Original Poster
Rep: Reputation: 31
Thanks for your reply..

I mean whether all the hardwares will get active simultaneously or it will get active one by one while this boot process is going on.....
 
Old 07-10-2011, 01:37 PM   #5
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
The answer is "it depends". On your distro, and what it chooses, and how you choose.

There are:
- Traditional SysV init scripts

And competing alternatives, some of which are:
- Ubuntu's "Upstart"
- Systemd

... and probably others too.

I (personally) think that systemd is the way to go.

They all (mostly) work. Some are faster, some more resilient and robust.

There is no "right answer".

I suggest you experiment with them all and then choose whatever works best for you.
 
Old 07-10-2011, 01:55 PM   #6
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
What do you mean by the "hardware work flow?"

The boot process is, in outline, quite simple: A read-only, minimal, RAM-resident, Linux system is loaded for the kernel you're using. That system unpacks an "Inital RAM file system" (usually from a CPIO image file) that starts the system initialization script found in the CPIO archive. I suspect that the "work flow" you're interested is the stuff in that script, but it could be the modules loaded with the kernel.

If your system uses a zipped initrd CPIO archive with .img in it's name, here's a script you could use to "unpack" the archive.
Code:
$ cat Scripts/InitRD/DecompressInitRD 
#!/bin/bash
############################################################################################
#
# Decompress initial ram disk image files
#
# Arguments: [ directory [ output ]]
#
# Where directory is the location of the InitRD files (default: /boot)
# and   output    is the sub-directory of "directory" where
#                 the unpacked files should be stored.
#
# Note: Each image file will be unpacked into a sub-directory of "output" named with
#       the name of the image file being unpacked.
#
###########################################################################################
#
# Make sure we're running as root
if [ $(id -u) -ne 0 ]
then
  echo "FATAL: This program requires root access. Aborting." >2
  exit 1
fi
# Set the defaults
boot="/boot"            # Boot directory
dir="Initial_RAM_Disk"  # Subdirectory of $boot into which the scripts should be decompresed
# Are there any arguments?
if [ $# -gt 0 ]
then
  if [ -d "${1}" ]
  then
    boot="${1}"
  else
    echo \"$1\" is not a valid directory name.
    exit 1
  fi                                                                                           
fi                                                                                             
if [ x"$(pwd)" != x"$boot" ]
then
  echo cd ${boot}
  cd ${boot}
fi
# Is an output directory specified?
if [ $# -gt 1 ]
then
  if [ -d "${2}" ]
  then
    dir="${2}"
  else
    echo \"$2\" is not a valid directory name.
    exit 1
  fi
fi
# Create the output directory if it doesn't exist
[ -d "${dir}" ] || sudo mkdir "${dir}"
# Go to the output directory
cd "${dir}"
# Get the InitRD image file to be used
echo Enter the number corresponding to the image file you want expanded
select img in $(ls -1 ../*.img*) quit
do
  if [ ${img} == "quit" ]
  then
     break
  else
    out=$(basename ${img})
echo "out="${out}
echo "img="${img}
    mkdir -p "${out}"
    cd "${out}"
    gunzip -c "../${img}" | sudo cpio -idmv
    cd ../
  fi
done
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
booting process for AIX rcm AIX 1 05-03-2008 02:51 PM
booting process scc28y Linux - Newbie 1 03-25-2005 11:57 PM
skip a process when pc is booting totti10 Mandriva 4 11-15-2004 12:19 PM
Booting Process muthiahm Linux - Newbie 6 06-10-2004 03:54 AM
Mandrake 9.1 and booting process mykyl Linux - General 2 09-04-2003 09:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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