Boot weirdness possibly involving unmenu


Recommended Posts

Let me preface this with the statement that I am fairly Linux illiterate.

 

I just plugged a monitor into my unraid box for the first time in a couple weeks and noticed something odd.  It is never dropping to a command prompt after booting.

The last line I get is "S30-start_unmenu[3431]: + /boot/unmenu/uu" and then a blinking cursor that just sits there.  Unmenu is starting and working fine.

 

I added a command after "fromdos < /boot/custom/etc/rc.d/rc.local_startup | sh" in my go script just to see if it got executed and it does not.  The go script just seems to stop after unmenu starts.

 

Any hints would be greatly appreciated.  I'm attaching a screen shot in case that helps.

 

Also, I don't know if it is somehow related (I don't see why it would be) but just above the unmenu stuff in the screen shot you will see where I am trying to schedule a parity check weekly.  It gets added to crontab but it never seems to run.  Can anyone see what I did wrong?

 

Thanks!

Steve

 

Link to comment

Others have reported this issue when using the "go-script" plug-in.  Are you using it? 

 

If so, I would not use it to start unmenu, as it seems to close the console output stream. (Or at least, don't use it until its author can figure out a fix)

 

Or, you can get additional console screen windows by typing Alt-F1 through Alt-F4 and switch between them.

 

Joe L.

Link to comment

Others have reported this issue when using the "go-script" plug-in.  Are you using it? 

 

My guess is that he is not using the go script manager...

 

The script to start unmenu in any version of the go script manager is never called S30-start_unmenu... even when using the rc.d structure as is indicated in his screenshot.  The .auto_goscript files under that setup are run from S10-custom_install_packages script.... and it is named start_unmenu-unmenu-goscript.conf.auto_goscript.

 

If so, I would not use it to start unmenu, as it seems to close the console output stream. (Or at least, don't use it until its author can figure out a fix)

The new boot script manager will use that filename, but the actual script it references I have re-written to accept the "start, stop, re-start, status, and help" arguments in terms of managing unmenu.

 

To the best of my abilities, I have not been able to definatively determine why this error was happening.  My best guess at this point is that it *might* be cause by a lack of an "exit" command at the end of the uu script.  But that is just a guess and because I could not reproduce the error myself no matter how hard I tried.

 

@porkpie5000

 

can you upload a copy of your 30-start_unmenu?

 

Cheers,

Matt

Link to comment

I think I may have a cobbled together startup process. 

 

My go script contains

#!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &

#Execute scripts in /boot/custom/etc/rc.d
fromdos < /boot/custom/etc/rc.d/rc.local_startup | sh

 

I have 4 files in /boot/custom/etc/rc.d.  They are:

rc.local_startup

S01-install_custom_packages

S21-weekly_parity_check

S30-start_unmenu         

 

I may have created S30-start_unmenu.  I honestly don't remember.  I contains one line.

/boot/unmenu/uu

 

I know I created the S21-weekly_parity_check file.  I copied the contents from another post.  As I said before, it mostly works.  The job shows up when I do a crontab -l but it never seems to actually run.  It contains

#!/bin/sh
crontab -l >/tmp/crontab
grep -q "/root/mdcmd check" /tmp/crontab 1>/dev/null 2>&1
if [ "$?" = "1" ]
then
    echo "# check parity on the wednesday morning at 2am:" >>/tmp/crontab
    echo "0 2 * * 2 /root/mdcmd check 1>/dev/null 2>&1" >>/tmp/crontab
    crontab /tmp/crontab
fi

 

I would happily change any or all of this if there is a better way to do it.  I was under the impression that I was mostly doing things the "standard" way but if that isn't true or there is a better way, I am all ears.

 

Thanks again for your help.  This is by far the most helpful user community I have ever come across.

 

Steve

Link to comment

I may have created S30-start_unmenu.  I honestly don't remember.  I contains one line.

/boot/unmenu/uu

 

Well the obvious thing that comes to mind is that S30-start_unmenu needs to have 2 lines..

The first line is /boot/unmenu/uu, the second line needs to be a blank line... (hit enter at the end of the first line)

 

If the last line is not a blank line, you can have trouble with getting the prompt to return.

 

Cheers,

Matt

Link to comment

One method I have used to make sure an invoked program does not hang up the boot process is to use a command like this:

 

echo "/boot/unmenu/uu" | at now +1 minute

 

It will start the unmenu process completely detached from the system console.  (Actually, it will schedule it to be started one minute in the future)

 

You might change the line in your S30-start_unmenu to the one above and see if that helps.

 

Joe L.

Link to comment

    echo "# check parity on the wednesday morning at 2am:" >>/tmp/crontab

    echo "0 2 * * 2 /root/mdcmd check 1>/dev/null 2>&1" >>/tmp/crontab

 

I wanted to point out... there is an error here... it says (in your comments) that you want it to happen every wednesday BUT your code says you want it scheduled on tuesday at 2am

 

0 2 * * 2 --- the last 2 is the day of the week and is set to Tuesdays (0=sun, 1=mon, 2=tues, 3=wed, 4=thurs, 5=fri, 6=sat)

 

Cheers,

Matt

 

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.