[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
Trouble with rc.sysinit
After booting into single-user mode, give the command:
mount -oremount,rw -n /
[edit files here]
mount -oremount,rw -n /
and reboot.
Regards,
-- Raju
>>>>> "Vikrant" == Vikrant Dhawale <vkdhawale@xxxxxxxx> writes:
Vikrant> Hi there, I did a foolish thing. I edited the rc.sysinit
Vikrant> script and changed the value of the variable HOSTNAME
Vikrant> where it was declared/defined in it. Earlier value was
Vikrant> HOSTNAME=localhost I changed it to HOSTNAME=Redhat
Vikrant> Now the system does not reboot. I have later replaced
Vikrant> the file rc.sysinit to original version from
Vikrant> explore2fs. But still I am not able to boot in multiuser
Vikrant> mode.
Vikrant> When I boot to singleuser mode I get the following two
Vikrant> messages : INIT : version 2.74 booting INIT : cannot
Vikrant> execute '/etc/rc.d/rc.sysinit ' and then the bash#
Vikrant> prompt. The filesystem is in readonly.
Vikrant> When I try to boot into multiusermode I get the following
Vikrant> messages : INIT : version 2.74 booting INIT : cannot
Vikrant> execute '/etc/rc.d/rc.sysinit ' INIT : switching to
Vikrant> runlevel : 3 INIT : /etc/rc.d/rc : /var/run/runlevel.dir
Vikrant> : Readonly filesystem
Vikrant> Then when various daemons and services start, touch gives
Vikrant> a message "Readonly filesystem" for various files
Vikrant> /var/lock/subsys/xxxxxx
Vikrant> After similar messages from apmd,interface
Vikrant> lo,portmapper,systemlogger a big wait about 10 mins. then
Vikrant> suddenly again similar messages for other daemons and
Vikrant> services some [FAILED] messages too and then init says no
Vikrant> more processes in this runlevel. Some messages similar
Vikrant> to ones found in /etc/inittab. Each gives a message
Vikrant> filesystem readonly.
Vikrant> I have studied the /etc/rc.d/rc and /etc/rc.d/rc.sysinit
Vikrant> and I think the problem is init cannot execute
Vikrant> /etc/rc.sysinit for some reason and /etc/rc.d/rc starts
Vikrant> executing which depends on some actions performed in the
Vikrant> rc.sysinit.
Vikrant> Also /var/run/runlevel.dir contains lines
Vikrant> /etc/rc.d/rc0.d. /etc/rc.d/rc contains a command set
Vikrant> `/sbin/runlevel` which is used to assign value to
Vikrant> variables previous and runlevel. when i run this on
Vikrant> prompt it gives 3 0.
Vikrant> When I open these files in vi,then with
Vikrant> /etc/rc.d/rc.sysinit vi shows [readonly] [dos format] but
Vikrant> with /etc/rc.d/rc vi shows [readonly]. Could this be the
Vikrant> problem? Both rc.sysinit and rc have permissions 755.
Vikrant> Will rescue mode help, I do not have RHL cd presently but
Vikrant> I can arrange.
Vikrant> Can anyone help me out. I have Redhat Linux 6.0
Vikrant> Thanks
Vikrant> Vikrant Dhawale