Koozali.org: home of the SME Server

error /sbin/init no souch file kernel panic

Offline larieu

  • *****
  • 214
  • +0/-0
error /sbin/init no souch file kernel panic
« on: July 20, 2011, 12:25:54 AM »
long story short
on one unattended server lot's of power lost happen (at beginning UPS had batteries to save it but after several long power loss batteries failed - and after that moment several power loss occurred at about 5 minutes) 

I found the server into the state that it gives me the error at boot with kernel panic

used the install CD and went into recovery mode
here partition is only ro
here first attempt to fsck gives me the error with " no /etc/fstab"
copied /mnt/sysimage/etc/fstab into /etc/fstab
in this moment fsck worked

after reboot I receive the error with /sbin/init

again recovery mode - this time /mnt/sysimage is in rw
it seems that /sbin/init is ok and has the right ownership/rights

any further steps (work around) will be appreciate
thanks in advance
if everybody's life around you is better, probably yours will be better
just try to improve their life

Offline larieu

  • *****
  • 214
  • +0/-0
Re: error /sbin/init no souch file kernel panic
« Reply #1 on: July 20, 2011, 12:46:27 AM »
more data

the exact error is at follows

Code: [Select]
no fstab.sys, mounting internal defaults
Swithcing to new root and running init
unmounting old /dev
unmounting old /proc
unmounting old /sys
exec of init (/sbin/init) failed!!!: No souch file or directory
Kernel panic - not syncing: Attempted to kil init!

I noticed that compared with an working server - the mtab is different

mine
Code: [Select]
cat /mnt/sysimage/etc/mtab
/dev/mapper/main-root / ext3 rw,usrquota,grpquota 0 0
/dev/md1 /boot ext3 rw 0 0
sysfs /sys sysfs rw 0 0
proc /proc proc rw 0 0

compared with other one

Code: [Select]
cat /etc/mtab
/dev/mapper/main-root / ext3 rw,usrquota,grpquota 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
/dev/md1 /boot ext3 rw 0 0
tmpfs /dev/shm tmpfs rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0

also tring to chroot /mnt/sysimage gives error

chroot: cannot run command '/bin/sh' : No such file or directory
if everybody's life around you is better, probably yours will be better
just try to improve their life

Offline larieu

  • *****
  • 214
  • +0/-0
Re: error /sbin/init no souch file kernel panic
« Reply #2 on: July 20, 2011, 07:08:18 AM »
more data
found also that /mnt/sysimage/etc/sysconfig folder is missing
lots of it is under /mnt/sysimage/lost+found preceded by some #numbers

I wander if doing one "upgrade" with the boot cd will solve this
(boot from cd and instead going in linux rescue - just type sme)
if everybody's life around you is better, probably yours will be better
just try to improve their life

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: error /sbin/init no souch file kernel panic
« Reply #3 on: July 20, 2011, 07:50:26 AM »
more data
found also that /mnt/sysimage/etc/sysconfig folder is missing
lots of it is under /mnt/sysimage/lost+found preceded by some #numbers

I wander if doing one "upgrade" with the boot cd will solve this
(boot from cd and instead going in linux rescue - just type sme)


IMHO you should reinstall and restore. you suffered a major filesystem corruption, I would not try to recover..

my 2c

Offline larieu

  • *****
  • 214
  • +0/-0
Re: error /sbin/init no souch file kernel panic
« Reply #4 on: July 20, 2011, 08:10:14 AM »
Thanks Stefano
In this moment I try to do something like "manual affa"
I started to backup on network
/home
/opt
/etc/passwd

does anyone know what else I need to to backup ? (how affa job looks)
does anyone know how to see what contribs I had on old install?
after this I want to reinstall and put back data and "manual rise" ( copy data over new install)
any "guide" is welcomed - I had an White night and it is quite hard to find correct inputs on wiki

Thanks
if everybody's life around you is better, probably yours will be better
just try to improve their life

Offline larieu

  • *****
  • 214
  • +0/-0
Re: error /sbin/init no souch file kernel panic
« Reply #5 on: July 20, 2011, 09:00:03 AM »
found some info here

http://wiki.contribs.org/Backup_server_config

does anyone know if the USB can be FAT32 or it must be ext3?
« Last Edit: July 20, 2011, 10:05:19 AM by larieu »
if everybody's life around you is better, probably yours will be better
just try to improve their life

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: error /sbin/init no souch file kernel panic
« Reply #6 on: July 20, 2011, 02:55:10 PM »
IMHO you should reinstall and restore. you suffered a major filesystem corruption, I would not try to recover..

I agree. Restore from backup.

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: error /sbin/init no souch file kernel panic
« Reply #7 on: July 20, 2011, 03:33:05 PM »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline larieu

  • *****
  • 214
  • +0/-0
Re: error /sbin/init no souch file kernel panic
« Reply #8 on: July 20, 2011, 03:42:16 PM »
 :-x

unfortunately the backup server was in the same area and is worst as this (hdd no boot at all no possible to read from it)

I have manually copied from production server

/home
/etc/e-smith
/opt
/var/log
/root
/etc/group
/etc/gshadow
/etc/passwd
/etc/samba/secrets.tdb
/etc/samba/smbpasswd
/etc/shadow
/etc/smbpasswd
/etc/ssh
/etc/sudoers

I hope in /var/log I'll see contribs (under yum)
and also hope I can recover all data from this bunch of files
if everybody's life around you is better, probably yours will be better
just try to improve their life

Offline larieu

  • *****
  • 214
  • +0/-0
Re: error /sbin/init no souch file kernel panic
« Reply #9 on: July 21, 2011, 05:32:36 AM »
it seems that  almost worked

installed fresh
update
put some of the contribs I remembered about
then
copied all data into one temporary folder
issued "signal-event pre-restore"
put all data on correct location
"signal-event post-upgrade"
reboot
I had a minor problem with eth0/1  solved by console (I have 4 ETH on that MB and it was wrong allocated by default)
then I received in var/log/messages something about  getgrnam and squid - found on forum that could be from /etc/group rights - chmode 644 - solved

apparently I have only one problem
I cannot receive mails from internet on port 25 (not any mail form external servers cann reach my users - ex Yahoo, google...)
If I send mails from internal/external location with Thunderbird correctly set up - works (SMTPS authentication seems to be ok)

If I go in /webmail and try to send mail I receive this error
Code: [Select]
Failed to connect to localhost:25 [SMTP: Failed to connect socket: Connection refused (code: -1, response: )]
this error is displayed also in /var/log/messages
Code: [Select]
mail HORDE[11357]: [imp] Failed to connect to localhost:25 [SMTP: Failed to connect socket: Connection refused (code: -1, response: )] [pid 11357 on line 93 of "/home/httpd/html/horde/imp/lib/UI/Compose.php"]
but apart from this no any errors occur
and /var/log/qpsmtpd/current is empty

any help will be appreciated
« Last Edit: July 21, 2011, 07:19:03 AM by larieu »
if everybody's life around you is better, probably yours will be better
just try to improve their life

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: error /sbin/init no souch file kernel panic
« Reply #10 on: July 21, 2011, 02:17:25 PM »
this error is displayed also in /var/log/messages
Code: [Select]
mail HORDE[11357]: [imp] Failed to connect to localhost:25 [SMTP: Failed to connect socket: Connection refused (code: -1, response: )] [pid 11357 on line 93 of "/home/httpd/html/horde/imp/lib/UI/Compose.php"]
but apart from this no any errors occur
and /var/log/qpsmtpd/current is empty

It seems you don't have a working qpsmtpd service. You need to find out why not. Here are some steps to get you started:

rpm -q qpsmtpd smeserver-qpsmtpd
rpm -V qpsmtpd smeserver-qpsmtpd
sv status /service/qpsmtpd
config show qpsmtpd

Offline larieu

  • *****
  • 214
  • +0/-0
Re: error /sbin/init no souch file kernel panic
« Reply #11 on: July 22, 2011, 01:48:23 PM »
Thanks Charlie

I figured out
Some custom templates from additional contribs which was missing into the "fresh install"
installing that contribs solved the problem
apparently the qpsmtb was started but ....

now another issue

I have several users with some problems to access some folders in email, to read or write email, or write emails from mobile phone (I think all are related to the same issue)

for example

one user ( "problem.user")
cannot see anything in inbox - but is able to see everything else on subsequent folders
apparently not any mail arrive to it
but if i go into

/home/e-smith/files/users/problem.user/Maildir/cur

I can see all his mails
also all files there has appropriate ownership/rights (read write by the same user)

any suggestion?

for inbox is clear
thus with problem to send from Thunderbird - Send folder has the same behavior
thus with problem to send from mobile - Sent Messages has the same behavior
thus with problem to send from webmail - send-mail ....

unfortunately I'm not able to catch any error ( or I'm looking for something which is not related)
where is the log where to look for related error

Thanks
if everybody's life around you is better, probably yours will be better
just try to improve their life

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: error /sbin/init no souch file kernel panic
« Reply #12 on: July 22, 2011, 02:28:58 PM »
/home/e-smith/files/users/problem.user/Maildir/cur

I can see all his mails
also all files there has appropriate ownership/rights (read write by the same user)

any suggestion?

Check ownership and access permission for all the directories back to his home directory.

Offline larieu

  • *****
  • 214
  • +0/-0
Re: error /sbin/init no souch file kernel panic
« Reply #13 on: July 26, 2011, 01:42:18 PM »
Thanks Charlie

it seems that folders should have 755 ( I don't expected this) (others and group should be grant the search power)

I also found something strange
If you need to inject some recovered mails (or from some backup) is better to put it in "new" section instead of "cur"
I had funny manifestation in Thunderbird trying to inject them directly in cur

and to be clear if somebody get here ALL MAILS should have 600 (only read write from user)

for thus which will need this
to achieve this go into the root folder of users and issue the commands

Code: [Select]
find username -type d -exec chown username:username {} \;
find username -type f -exec chown username:username {} \;
find username -type d -exec chmod 755 {} \;
find username -type f -exec chmod 600 {} \;

continuing this "story"

it exist some "signal-event" which will rebuild the default folder architecture in case it doesn't exist any more for some users (lost in the power issue)?
- to be more precise - Some users (around 10) had problems with emails due to fact that the "default" /cur /new /tmp missing; also some had issue with the fact that they missing .Sent or .Trash ....

I remember that I saw somewhere on wiki that it exist one script to rebuilt ownership and rights on /home/e-smith/files/users but I'm not able to find it now - and I am not able to remember if that script also solved this issue
if everybody's life around you is better, probably yours will be better
just try to improve their life

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: error /sbin/init no souch file kernel panic
« Reply #14 on: July 28, 2011, 04:44:57 AM »
it exist some "signal-event" which will rebuild the default folder architecture in case it doesn't exist any more for some users (lost in the power issue)?

No, there is no such thing.