LinuxQuestions.org
Visit Jeremy's Blog.
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 10-12-2004, 04:47 PM   #1
PennyroyalFrog
Member
 
Registered: Mar 2004
Location: Michigan
Distribution: Gentoo 2006.1
Posts: 107

Rep: Reputation: 15
system hanging on 'Saving random seed'


When I do a shutdown command my system hangs on 'Saving random seed... [ok]' when shutting down... it does not do this with a reboot command... i'm using gentoo. any ideas how to fix this?
 
Old 09-27-2005, 09:28 PM   #2
scotepi
LQ Newbie
 
Registered: Sep 2005
Posts: 5

Rep: Reputation: 0
same

im having the same problome and having it on 2 different gentoo computers. and solution for this would be nice
 
Old 09-30-2005, 10:22 PM   #3
scotepi
LQ Newbie
 
Registered: Sep 2005
Posts: 5

Rep: Reputation: 0
anyone know whats up?
 
Old 09-30-2005, 11:45 PM   #4
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
I don't use Gentoo, so you these instructions may require some footwork/translation on your part, but it shoudl be minimal.

First thing I would do is check out your startup/shutdown scripts. There's usually a single directory that holds all of them: /etc/rc.d/init.d (this may be one of those translation things). There should also be a series of directories labeled rcX.d in /etc/rc.d. X is a number going from 0 to 6. That number specifies a runlevel. When the system changes run levels, it executes the contents of the appropriate rcX.d directory. Those directories contain symbolic links back to /etc/rc.d/init.d. Confusing, I know, but hold on.

Shutting down the machine is a switch to runlevel 0. Rebooting the machine is a switch to runlevel 6. Look at the contents of the two directories for differences. Because you say the problem shows up only on a shutdown and not a reboot, it's likely that /etc/rc.d/rc0.d will have more links than /etc/rc.d/rc6.d.

Now, try to find out which script is responsible for saving the volume information. You can probably do that with this command:
Code:
grep -l "Saving random seed" /etc/rc.d/init.d/*
Look at the symbolic links in the rc0.d directory to find out which symbolic link points to that script. It's probably something like "K45random". Once you find it, look for the next "K" symbolic link. It may be "K46something", "K50something", or even "K99something". That next little bugger might be your problem. See if it has a corresponding entry in rc6.d. If not, that's a pretty strong indication it's why you see it on hatl and not reboot. You'll have to examine the script it points to and debug what it's doing and why it might cause the hang.

Can't be much more help than that without more info. Sorry.
 
Old 10-01-2005, 10:44 AM   #5
scotepi
LQ Newbie
 
Registered: Sep 2005
Posts: 5

Rep: Reputation: 0
i cant find the rc directories but i can list everything at different runlevels and if needed remove them. the only thing that looks like it could be it is urandom.

but when i ran the grep on /etc/init.d/ i also got urandom.
 
Old 10-01-2005, 10:59 AM   #6
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
That sounds like a reasonable name for the script. I assume urandom is an actual file in /etc/init.d and not a link?

You could try this command to find the symbolic links:
Code:
find /etc -type l -iname "*urandom"
Just to be thorough, that's a lower case 'L' and not a '1' after the type option.

If none of that gets you any closer, then go ahead and list out what happens during a switch to runlevel 0 and a switch to runlevel 6. There should be a difference. If anything, it should also give you a clue about the hanging script's name. The prime suspects are any scripts after urandom.

EDIT:
A quick search told me that Gentoo keeps some startup info in /etc/runlevels, but I'm not sure how it relates to /etc/init.d. I'm guessing they are the equivalent of the rcX.d directories.

Last edited by Dark_Helmet; 10-01-2005 at 11:06 AM.
 
Old 10-01-2005, 11:20 AM   #7
scotepi
LQ Newbie
 
Registered: Sep 2005
Posts: 5

Rep: Reputation: 0
k so it's a sym link to /etc/init.d and i checked on tohers and they were the same

Code:
lrwxrwxrwx  1 root root 35 Aug 13 08:38 /etc/runlevels/boot/urandom -> /tmp/stage1root//etc/init.d/urandom
 
Old 10-01-2005, 11:34 AM   #8
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
Ok, so how does Gentoo enforce ordering? There's got to be some organization or file somewhere that specifies what sequence the scripts run in. What scripts get executed in what order when shutting down? What about rebooting?
 
Old 10-01-2005, 11:41 AM   #9
scotepi
LQ Newbie
 
Registered: Sep 2005
Posts: 5

Rep: Reputation: 0
the init files have dependances in their config's and at boot it does calculating dependanceys. guessin thats how
 
Old 10-01-2005, 02:45 PM   #10
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
For the love of... I have one question for the Gentoo maintainers: "Why?!?!"

Alright my friend, here's the deal. I went to the Gentoo website to pull up their documentation. This is just my opinion, but they needlessly overcomplicated the booting process, and that's going to make it tough for you to figure out what exactly is going on.

I'm sure you already know this, but halting the system pulls its scripts from /etc/runlevels/shutdown. Rebooting pulls its scripts from /etc/runlevels/reboot. That's about as easy as it's going to get.

You'll need to pull out a pen and paper or open a text editor for the next part. The scripts in those directories will be executed in alphabetical order. As you saw though, each script can have dependencies. So what you need to do is map out the sequence of what gets called from start to finish for both halt and reboot. That's going to be a pain in the arse because dependencies may have dependencies, etc. If, for example, you looked at the script for sendmail, it might a dependency on the dhcp script. So the sequence would be dhcp->sendmail, but you'll have to examine dhcp to see if it has dependencies (like network). So the full sequence would be network->dhcp->sendmail.

Anyway, once you've contructed the list, compare the shutdown and reboot sequences. Look at the stop() portion of the scripts called after urandom in the halt sequence. Your problem is going to be there. You'll have to manually check each one. If there's a command to display text in one of them, you know the problem is happening between the end of urandom and the display attempt. Focus your attention there. If you look at the scripts and need some help, post them, and I'll do my best to help out.

EDIT:
I don't have a man page for rc-update, but it might help figure out the order. The documentation refers to using
Code:
rc-update show
to show all scripts and which runlevels execute them. There may be an option to specify what the sequence is for a specific runlevel. Check your man page to see.

Last edited by Dark_Helmet; 10-01-2005 at 02:51 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Kernel panic while saving random seed SAnton Linux - Software 1 09-27-2005 03:01 AM
system hanging trey31357 Slackware 3 06-24-2005 09:15 AM
Possibly not enough swap - system hanging larley Linux - Laptop and Netbook 5 02-15-2004 01:53 PM
using /dev/(u)random for seed ? PTBmilo Programming 2 04-15-2003 01:19 AM
system hanging on booting jmarsh Linux - Networking 1 04-07-2003 09:42 AM


All times are GMT -5. The time now is 12:11 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration