How to fix missing startup script link without reflashing

Post Reply
lexfiend
Posts: 2
Joined: Sat Jun 28, 2014 3:14 pm

How to fix missing startup script link without reflashing

Post by lexfiend » Sat Jun 28, 2014 3:34 pm

Just bought a couple of 2TB EZ's recently (4.0.4 firmware), enabled SSH access and started "trimming the (services) fat". Unfortunately, I removed the /etc/rc2.d/S60executord symlink on one of them. As a result, when it rebooted, it's now stuck with a blinking power LED, and the only ports open (based on an nmap scan) are NFS-related.

I'd completely forgotten that almost all services, including sshd, are started by appmd, which in turn is spawned by the executord script.

I've read through Mijzelf's writeup on how to reflash the firmware here, but before I go through all that trouble, does anyone know of a way that I can auto-run a script of my own creation from a USB drive on EZ bootup? I'd rather do what's essentially a one-liner fix than wipe everything and start from scratch again.

Thanks much for any insights!

Mijzelf
Posts: 6207
Joined: Mon Jun 16, 2008 10:45 am

Re: How to fix missing startup script link without reflashin

Post by Mijzelf » Sat Jun 28, 2014 5:30 pm

I think you have 3 options.
  • Connect to the serial port, I *think* there is a shell running there.
  • Get the disk out, and mount it manually (the firmware is on disk. Only u-boot is in flash). Here you can find a disk layout. Unfortunately you'll have to assemble a raid array, start(?) a logic volume and loopmount a file to get into /etc/init.d/, but it can be done.
  • Rebuild the firmware using that USB stick.

lexfiend
Posts: 2
Joined: Sat Jun 28, 2014 3:14 pm

Re: How to fix missing startup script link without reflashin

Post by lexfiend » Mon Jun 30, 2014 2:36 pm

Thanks, Mijzelf! Since I'm only a week into the 3-year warranty, I decided against opening up the case, so my only real option was to reflash with your image. Thankfully, it worked without a hitch.

Post Reply