Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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!
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.
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.
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");
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.