Jump to content
XPEnology Community

[SOLVED] Wrongly put a script in rc.d, unable to startup now


huminsk

Recommended Posts

Hi everyone,

 

I am a new user of XEPnology(DSM 4.2). Today, I wrongly put a shutdown script to /usr/syno/etc/rc.d/ (Really stupid!!!).

When I restart my N54L, it always shutdown due to this script. So anyway I can delete this script from rc.d?

I know it's on system partition. Can I operate system files in another OS?

 

Thanks in advance.

 

huminsk

 

--------------

Solved! see my post below. Thank you all for your help! :mrgreen:

Edited by Guest
Link to comment
Share on other sites

Many ideas:

1. Via ssh (if you faster) rm or mv this sh.

2. Mount HDD with DSM on another linux PC.

3. Boot via USB on Linux installer, live Arch Linux and rm via chroot.

4. Reinstall :mrgreen:

 

k0ste, thanks for your suggestions.

I tried option 1 couple of times, but the timing window is so narrow,almost impossible to remove the script before system shutdown.

For option 2,3, looks like DSM system files resides on special partition. I have all 3 hard disks in basic mode. Can I operate files on that partitions?

For option 4, since DSM is in installed status, I don't have the chance to reapply image without formatting hard disk first. Right?

Link to comment
Share on other sites

Many ideas:

1. Via ssh (if you faster) rm or mv this sh.

2. Mount HDD with DSM on another linux PC.

3. Boot via USB on Linux installer, live Arch Linux and rm via chroot.

4. Reinstall :mrgreen:

 

Hi k0ste,

 

For option 3, can i just mount DSM filesystem and rm the bad script without chroot? thank you!

Link to comment
Share on other sites

Option 1 - run putty with pre configured password and a command to execute - then you just need to hammer your syno untill sshd is up (run a batch script if necessary).

 

2/3 - yes you should be able to access the partition iirc

 

nailed it! wrote putty+sh scripts to remove the bad script between sshd and shutdown.

 

dsm.bat:

@echo off

putty -load "dsm" -l username -pw password -m d:\putty\rmsd.sh

 

rmsd.sh:

rm /usr/syno/etc/rc.d/wol_shutdown.sh

Link to comment
Share on other sites

Many ideas:

1. Via ssh (if you faster) rm or mv this sh.

2. Mount HDD with DSM on another linux PC.

3. Boot via USB on Linux installer, live Arch Linux and rm via chroot.

4. Reinstall :mrgreen:

 

Hi k0ste,

 

For option 3, can i just mount DSM filesystem and rm the bad script without chroot? thank you!

You can try.
Link to comment
Share on other sites

×
×
  • Create New...