Deleted /sbin/init ... Recovered From Live CD, Still Will Not Boot?

Hi all,

Been messing around with my CentOS 6.6 VM trying to break stuff and learn with it. I thought it may be a good learning exercise to (ok, sounds a bit stupid, but purposely) delete /sbin/init to see how I could recover and learn.

I've booted into a recovery CD and recovered the /sbin/init file to my existing directory, however, I'm still having issues booting the machine.

Per Google suggestions, I have given the new init file 755 permissions but it still does not boot.

I apologize that I have not had more ideas, I am currently Googling solutions but am having a bit of trouble knowing where to start. Any suggestions would be greatly appreciated, thank you.


Similar Content



Cannot Execute Binary File

hello everyone,
I created a script file (info.sh) in linux centos 6.
location of file is '/etc/init.d/info.sh'
content of file is:

#!/bin/sh
#To get the MAC address
ifconfig | grep HWaddr
#To get the HDD serial no.
hdparm -I /dev/sd? | grep 'Serial\ Number'
#To get the HDD size
hdparm -I /dev/sda |grep "device size"

gave the permission by: chmod 777 /etc/init.d/info.sh
but when i run this file by: /etc/init.d/info.sh
it gives an error like...
-bash: /etc/init.d/info: cannot execute binary file

what should i do?? Actually i have to run this file during boot up..

thanks in advance..

Why Are Init Systems So Important?

hi guys,

i know what initialization systems are, and pretty much what they do.
lately everybody has been giving out about various distros changing to systemd...

firstly have i got this right?

init is pretty much retired and used on many older distros

debian used init then switched to upstart and now uses systemd...though you can keep using upstart but its difficult to get right.

slackware uses a hybrid type sysv with bsd like scripting...

centos 7 is using systemd by default

so what is the big fuss? why would a poor init system steer people away from a distro they have used for years.

can it really be this important? i mean how many times a day are you going to reconfigure start-up services etc...i dont understand this.

Ubuntu Will Not Dual Boot Beside Windows 7--error Codes

I have windows 7 laptop, Dell. I downloaded the newest edition of Ubuntu (Twice)to see if it would install and dual boot beside Windows 7. Unsucessful on several attempts. Once I reboot the computer it will give ma a choice of 7 or Ubuntu. I decide on Ubuntu it starts to boot into Ubuntu than a black screen with all types of Kernel error codes that i'm unfamilur with. one is---(1.292618) kernel panic-not syncing: no working init found.

Try passing init option to Kernel (see Linux Documentation/init.txt for guidance..

I am not sure what all this means any help would be appreactiated...

Question About Run Level Programs And How The OS Know What To Run

Hey guys, I am a little confused about run level programs. (concerning centos)

I know when the system boots up the orders will be

bios
MBR
GRUB
kernel
init
runlevel

to my understanding - etc/init looks at /etc/inittab
then where is the run level located?
is it /etc/rc.d/rc0.d...
/etc/rc.d/rc1.d
/etc/rc.d/rc2.d
are these run level programs?

if so, what about /etc/init.d ? doesnt that also execute run level programs?

and how does it know what to start? where does it look

thanks guys just a bit confusing where what looks for what

Unable To Get Login Prompt In Buildroot

I am porting linux on movidius M2 leon3 board,but unable to get login prompt I am only getting /etc/issue message
as below

UART: --> do_sys_open /etc/issue f1935ec0
UART: --> do_sys_open /etc/issue f1935ec0
UART: IamHere 3
UART: IamHere 3
UART: Welcome to Buildroot

No login prompt

my inittab script as below

# completely ignored by BusyBox init. If you want runlevels, use
# sysvinit.
#
# Format for each entry: <id>:<runlevels>:<action>:<process>
#
# id == tty to run on, or empty for /dev/console
# runlevels == ignored
# action == one of sysinit, respawn, askfirst, wait, and once
# process == program to run

# Startup the system
null::sysinit:/bin/mount -t proc proc /proc
null::sysinit:/bin/mount -o remount,rw / # REMOUNT_ROOTFS_RW
null::sysinit:/bin/mkdir -p /dev/pts
null::sysinit:/bin/mkdir -p /dev/shm
null::sysinit:/bin/mount -a
null::sysinit:/bin/hostname -F /etc/hostname
# now run any rc scripts
::sysinit:/etc/init.d/rcS
#ttyS::sysinit:/bin/echo "I am Manjunath to let this work."
#ttyS::respawn:/sbin/getty -L ttyS0 38400 vt100
# Example of how to put a getty on a serial line (for a terminal)
#::respawn:/sbin/getty -L ttyS0 9600 vt100
#::respawn:/sbin/getty -L ttyS1 9600 vt100
#
# Example how to put a getty on a modem line.
#::respawn:/sbin/getty 57600 ttyS2
ttyS0::respawn:/bin/sh </dev/ttyS0 >/dev/ttyS0 2>/dev/ttyS0
# Put a getty on the serial port
#ttyS0::askfirst:/bin/sh
#ttyS::respawn:/bin/sh </dev/ttyS0 >/dev/ttyS0 2>&1
ttyS0::respawn:/sbin/getty -n ttyS0 38400 vt100 # GENERIC_SERIAL
#ttyS::wait:/bin/sh </dev/ttyS0 >/dev/ttyS0 2>&1

# Logging junk
null::sysinit:/bin/touch /var/log/messages
null::respawn:/sbin/syslogd -n -m 0
null::respawn:/sbin/klogd -n
#null::sysinit:/bin/touch /var/log/messages
#null::wait:/sbin/syslogd -n -m 0
#null::respawn:/sbin/klogd -n

# Stuff to do for the 3-finger salute
::ctrlaltdel:/sbin/reboot

# Stuff to do before rebooting
null::shutdown:/usr/bin/killall klogd
null::shutdown:/usr/bin/killall syslogd
null::shutdown:/bin/umount -a -r
null::shutdown:/sbin/swapoff -a

Is any problem in my inittab.
please help me to get from this issue.

Thanks
Manjunath Goudar

Changes In CentOS 7

Hi Team,

I have installed Centos 7 and I feel everything is totally changed.

I am able to see only 3 folders under /etc/init.d/......where as earlier versions have many other init scripts.

I tried installed Minimal & full installation, both have the same situation.

Install Package On Centos 7

I use Centos 7 and have just installed vsftpd to the server , I want to start vsftp service after install , when I tried the command "systemctl |grep vsftp" , it show nothing .

I use previous , all services keep at /etc/rc.d/init.d , what I need to do is /etc/rc.d/init.d/vsftpd start .

Please advise what I need to do for Centos 7 to start vsftpd ?

thanks

Executable Not Found From /usr/local/bin

Hi,

I installed ghostscript via yum package manager. Later I wanted a newer version of ghostscript and compiled it from source. "make install" placed the gs executable file under /usr/local/bin/gs. This works if I run the command with absolute path, but if try to run gs, the shell will output

"-bash: /usr/bin/gs: No such file or directory"

if I echo the path variable it will display

/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin

If i run whereis it will give me the correct path
gs: /usr/local/bin/gs

How do I make it work so that typing "gs" will run the executable file from the /usr/local/bin/gs?

(I am using Centos 6)

Thanks.

Useradd Command Why 1000:1000: Group?

useradd -s /bin/bash -d /home/jaydul -m jaydul
[root@tuhin /]# cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
adm:x:3:4:adm:/var/adm:/sbin/nologin
lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
mail:x:8:12:mail:/var/spool/mail:/sbin/nologin
operator:x:11:0perator:/root:/sbin/nologin
games:x:12:100:games:/usr/games:/sbin/nologin
ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
nobody:x:99:99:Nobody:/:/sbin/nologin
dbus:x:81:81:System message bus:/:/sbin/nologin
sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
jaydul:x:1000:1000::/home/jaydul:/bin/bash
[root@tuhin /]# cat /etc/redhat-release
CentOS Linux release 7.0.1406 (Core)

jaydul:x:1000:1000::/home/jaydul:/bin/bash

Why 1000:1000: Group? it will be by default will be 500:500?
I was any mistake?
jaydul:x:500:500::/home/jaydul:/bin/bash

Centos 6.4 Does Not Boot - A Kernel Panic Issue For Initialization

Hello

I have installed a CentOS 6.4 on VmWare.

Now, after several days of using it, it suddenly does not boots. There is a problem with its initialization, here is the error:

Kernel Panic : Unalble to init. Try passing init= option to the kernel.
Pid 1 : Swapper not tainted.

I have used CentOS.iso to rescue it, but it still does not solve it.

My grub.conf contains:

PHP Code:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/sda2
#          initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.32-358.el6.x86_64)
    root (hd0,0)
    kernel /vmlinuz-2.6.32-358.el6.x86_64 ro root=UUID=6082bcf5-00ba-4bf8-86ea-9821d774cb6f rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
 initrd /initramfs-2.6.32-358.el6.x86_64.img 



How should I solve it then? Thanks in advance