LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 09-01-2016, 11:48 AM   #1
sjphares
LQ Newbie
 
Registered: Dec 2007
Posts: 19

Rep: Reputation: 0
boot - single step


Simple question, I thought...

Need to Single step/line-by-line through the CentOS-7.2-1511 boot process.

I did this way back in the RedHat 3/4/5 days but can't find my notes.

I understand searching before asking/posting :-)
I have, both here and elsewhere but most queries with the word
"single" come back 'boot single user mode' or 'boot root user'

As a tech I usually remove 'quiet' and 'rhgb' options from the vmlinuz line
in the grub.cfg file just to make sure I see what what is happpening
during the boot process.

This is a 'Power' Laptop booting CentOS-7.2-1511 and running WMware
WorkStation-12 to spin up Virt-Machines I need to work multiple
client environments.

Sometimes network connectivity can been 'spotty' at client sites.
Most times at most client sites
lines comeback [ Ok ]

but sometime at client sites during the 'network' portion
lines comebak [failed]

but blow by to fast to read...
and this is why I would like to single step through the process!


Any help/hint would be greatly appreciated
Thanks
 
Old 09-02-2016, 05:26 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
At one time you could single step loading services by pressing Ctrl-A? at the right time in the boot process if I remember correctly. I don't remember if there was another method... You can go back through the systemd journal to find the error.

https://fedoramagazine.org/systemd-using-journal/
https://wiki.archlinux.org/index.php/systemd
 
Old 09-02-2016, 05:33 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Another example of xyproblem.
To save ploughing through the journal try "systemctl --state=failed"
 
Old 09-02-2016, 11:18 AM   #4
sjphares
LQ Newbie
 
Registered: Dec 2007
Posts: 19

Original Poster
Rep: Reputation: 0
Dear,
syg00

Pleases don't scold me.
You are not good enough to do so...

As stated in my opening remarks
I ALWAYS practice 'due diligence'.

Look back at my post...
"...understand searching before asking/posting..."

[mod remove content] Mod comment; Do not post in this manner since you will be and are violating LQ Rules

Last edited by onebuck; 09-02-2016 at 12:43 PM. Reason: LQ Rule violation - remove poor content.
 
Old 09-02-2016, 12:04 PM   #5
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Quote:
Originally Posted by sjphares View Post
You sit there in your under-ware, living in your moms
basement, jacking to porn and all day and wait for someone
to post a real question so you can try to FLAME them...
So ... reported.

My suggestion is not how to run single step (minus a debugger that is) but instead to modify the boot code to have printk() statements to aid in debugging it, however I didn't think it would be useful to you.

While syg00 was sarcastic, they were offering a different alternative. Still, being sarcastic was a bit harsh.

Reacting worse about it is definitely a lot harsh.
 
Old 09-02-2016, 12:47 PM   #6
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Moderator response

Quote:
Originally Posted by sjphares View Post
Dear,
syg00

Pleases don't scold me.
You are not good enough to do so...

As stated in my opening remarks
I ALWAYS practice 'due diligence'.

Look back at my post...
"...understand searching before asking/posting..."

[mod remove content] Mod comment; Do not post in this manner since you will be and are violating LQ Rules
I am not scolding you but I know your original content violates LQ Rules. I suggest that you re-read LQ Rules and the following; http://www.linuxquestions.org/questi...#faq_lqwelcome So that you are aware of proper posting and not violating the LQ Rules.
 
Old 09-02-2016, 01:46 PM   #7
sjphares
LQ Newbie
 
Registered: Dec 2007
Posts: 19

Original Poster
Rep: Reputation: 0
My apologies to the community and syg00 all for my
language/attitude...

This was a Network Down Emergency. (Three time zones)
and the the Bat-Phone was ringing off the hook!


FYI...
While still not single step...
you can also trap boot messages to a file as follows
in two ways.


Append/Re-compile the Kernel
#####################################################
int main{
int newFile= open(desiredFilePath, O_WRONLY)
if ((fork())==0){
dup2(newFile,stdout) // Explained below
close newFile
Set stdout as CLOSE_ON_EXEC false
exec the user program
}else{
wait for child
}
return 0
}

##### And/Or #####



#include <stdio.h>
#include <unistd.h>

int main (int argc, char *argv[]) {
if (isatty (fileno (stdout)))
fprintf (stderr, "output goes to terminal\n");
else
fprintf (stderr, "output goes to file\n");

return 0;
}
 
  


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
LXer: Dual-Boot Ubuntu 15.04/14.10 And Windows 10/8.1/8: Step By Step Tutorial With Screenshots LXer Syndicated Linux News 0 07-15-2015 12:42 AM
Missed one step step in install now gentoo wont boot 62chevy Gentoo 5 06-16-2009 06:50 AM
Dual Boot Fedora 8 and XP Not Working Need Step by Step Help kingzappa Linux - Newbie 9 01-19-2009 05:08 PM
Need a step by step instruction to dual boot knoppix and XP on the 1 hdd Andrewt84 Linux - Newbie 2 10-11-2005 06:41 AM
Step by step procedure in replacing Red Hat 9.0 by Ubuntu in my dual boot XP/linux charliemerleau Linux - Software 1 10-04-2005 01:12 AM

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

All times are GMT -5. The time now is 08:34 PM.

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