(SOLVED) Server issues sbin init missing execute permissions


Recommended Posts

hi,

 

I am experiencing several issues after a restart of tower.

 

Server is starting, i can login with root via console, but nothing else is accessible/starting (web interface, vm's or dockers).

 

As I logged in to terminal via console, i could see this email notification:

root : unable to stat /etc/sudoers : Permission denied ; TTY=unknown ; PWD=/ ; USER=root ;

 

I tried chkdsk in windows on flash drive, no issues found.

After plugging back the flash drive and started server again, issue with the sudoers disappeared.

 

However any command i run (e.g. shutdown) i get error like /sbin/init cannot execute

ls -ld /sbin/init tells me that the file is missing execute permissions (compared to my other tower, should have 755)

-rw------- root root [...] /sbin/init

 

The other files in /sbin/ seem to have proper executable permissions.

If i change init to 755, i can execute the shutdown, but on restart, the init is again missing execute permissions.

 

Tried restarting in gui mode, but the web admin console is not accessible and the firefox browser asking me to restart the browser (restart required). Tried that, but same issue...

 

I also tried to start the unraid in gui without plugins, same behavior.

 

 

The initial restart of the tower was due to ram upgrade (extra sticks), but i checked the ram with memtest and ram is ok. Also reverted now to the initial ram sticks, just to rule out the ram as the culprit, and same issue occurs.

 

Not sure what should i try next... Running out of options.

attaching also the diagnostics: towerq77-diagnostics-20190409-0024.zip

 

kindly please suggest

 

thanks a lot!

-d

 

Edited by darianf
solved
Link to comment

I would log in on the console and run the ‘df’ command to check that the USB stick is correctly being mounted as /boot. If that is failing for an reason you can get all sorts of unexpected results.

 

It might also be worth recreating the USB stick from scratch in case something on it is corrupted.   Before doing so make sure you have a backup of the config folder from the current USB stick and then after recreating the USB stick copy this saved config folder back to the recreated USB stick to get your settings and Unraid license key restored.

Link to comment

ok, so running df didn't show something wrong on /boot

 

I then created from scratch the usb, after backing up the config.

Once usb was ready, i restored the config, overwriting the fresh/original one.

Same behavior :(

   

But, i noticed an error caused by something executing in my go file.

Fixed that (the /root/.ssh dir was missing, required for copying some ssh keys, for rsync)

And at the end of the go file, i found this 😮

# Add macros to the profile
/boot/macros

There's no such file macros, and i'm perplexed who added it - for sure not me/manually.

I commented it out and things started to work.

 

thanks @itimpi for suggesting recreating the flash, this enabled to get closer to the issue.

Any idea what this macros entry could be?

 

 

P.S: Another thing worth sharing.
I discovered that my machine (dell optiplex 9010) does not boot unless a keyboard is attached to it (even if that option in bios is disabled - e.g. to error if no keyboard present).

So after boot post, the unraid menu does not appear, if a keyboard's missing.

Once a keyboard is plugged in, the blue unraid boot menu appears and OS loads fine.

 

The new usb flash was created with uefi support.

This was not the case with the previous flash, created about 1.5 or 2 years ago without the usb creator tool, for an older machine (non-uefi).

With the old flash, it was booting without a keyboard (and monitor as a matter of fact) successfully.


thanks

-d

Link to comment

Never heard of /boot/macros before so I do not know why you have it.    The default ‘go’ file only has 1 line in it that is used to start the emhttp daemon.    Anything else has to have been added manually at some point or by installing 3rd party software.   What did /boot/macros contain - that might give a clue as to how the entry got added.

 

The fact the system is requiring a keyboard be present is also something that is mandated by the system BIOS and as such should not be affected by how the USB stick is created.    It could be that switching from legacy to UEFI boot has changed how the BIOS handles a keyboard missing.    I know that on all the PCs I have had there has been a BIOS setting that specified whether the machine should be allowed to boot with no keyboard present (with the default being to require the keyboard to be present).   It sounds as if your BIOS is not honouring that setting when booting in UEFI mode.    Since you imply your system worked in legacy mode you could try reverting to booting in that mode to see if the problem persists?    Another possibility is to have the USB dongle for a wireless keyboard left plugged in - that may well work even if the keyboard itself is not present.

Link to comment

the /boot/macros file does not exist (i searched for macros file recursively in the flash). so no additional information to corroborate.

indeed, in the go file, it should normally be only the emhttp daemon startup.

 

but... as part of a manual configuration that i did for using rsync between a synology nas and this tower, i added extra commands to handle the ssh keys exchanged. Hence there are some extra commands for copying the keys and update some permissions (briefly mentioned in my previous post). 

this extra setup i had to take care when upgrading from 6.2 to 6.3 or something alike (i vaguely remember there was one UNRAID upgrade that was sensitive and the go file had to be "stock" during the upgrade).

And it worked very well without issues so far.

 

But for sure that entry in the go file for /boot/macros was not added by me.
 

I found more info here - https://wiki.unraid.net/Console

But still not sure how it came added... and why only the entry in the go file, without the actual /boot/macro file...

 

In regards to keyboard issue, this is how i solved it indeed - I left a wireless dongle of a rii keyboard inserted in the tower :) 

I will try when i have time, to recreate the flash usb without the UEFI and see the behavior without keyboard.

The bios option is to not report missing keyboard; and i specifically toggled this checkbox to make sure it's status is set. But to no effect.

 

Any advantage on UNRAID between between uefi vs legacy flash?

I guess no change...

 

thanks a lot

-d

 

 

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.