# DIGI recovery - how to in linux

**URL:** <https://forums.digi.com/t/digi-recovery-how-to-in-linux/6045>\
**Category:** NET+OS\
**Created:** [September 15, 2011, 3:08pm UTC](https://forums.digi.com/t/digi-recovery-how-to-in-linux/6045 "2011-09-15T15:08:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kubiajir](https://avatars.discourse-cdn.com/v4/letter/k/e19b73/32.png) [@kubiajir](https://forums.digi.com/u/kubiajir)\
**Post date:** [September 15, 2011, 3:08pm UTC](https://forums.digi.com/t/digi-recovery-how-to-in-linux/6045/1 "2011-09-15T15:08:04Z")

</div>

Hello,  
I spent long time with finding out how to setup some enviroment for recovering digi ME modules with some bugs in firmwares which blocks standard FTP upload. Here is my configuration for linux server with digi fail-safe recovery.

At first see [http://www.digi.com/support/kbase/kbaseresultdetl.jsp?id=843](http://www.digi.com/support/kbase/kbaseresultdetl.jsp?id=843)  
At second Im using Gentoo OS so some paths and names may varying on different linux distros.

1. install standard DHCP (from [http://www.isc.org/products/DHCP](http://www.isc.org/products/DHCP), on GENTOO install net-misc/dhcp)
2. Go to its configuration folder /etc/dhcp and create dhcpd.conf

```auto
touch dhcpd.conf

```

1. Copy into the file followed lines

```auto
nano dhcpd.conf

```

```auto
# dhcp.conf

# option definitions common to all supported networks...

option domain-name "internal";
option domain-name-servers 192.168.1.1, 192.168.1.130;
option routers 192.168.1.1;
ddns-update-style interim;
ddns-rev-domainname "in-addr.arpa";

authoritative;

default-lease-time 600;
max-lease-time 7200;

subnet 192.168.1.0 netmask 255.255.255.0 {
  range 192.168.1.100 192.168.1.128;
# If you want to provided WINS Server
  option netbios-name-servers 192.168.1.1;
  option netbios-node-type 8;

# followed lines is options 66 and 67
option tftp-server-name "192.168.1.1";
option bootfile-name "image.bin";

}

```

1. go to /etc/conf.d/ and edit in dhcpd line where is DHCPD\_IFACE=“”. Here write down interface where may the DHCP server runs. For example for eth1  
DHCPD\_IFACE=“eth1”

```auto
 nano /etc/conf.d/dhcpd 

```

1. now the DHCP setup is done, now configure tftp server
2. install tftp server ([http://www.kernel.org/pub/software/network/tftp/](http://www.kernel.org/pub/software/network/tftp/)  
on gentoo install net-ftp/tftp-hpa)
3. edit file /etc/conf.d/in.tftpd replace lines with following content

```auto
 nano /etc/conf.d/in.tftpd

```

```auto

# /etc/init.d/in.tftpd

# Path to server files from
# Depending on your application you may have to change this.
# This is commented out to force you to look at the file!
#INTFTPD_PATH="/var/tftp/"
INTFTPD_PATH="/tftpboot/"
#INTFTPD_PATH="/tftproot/"

# For more options, see in.tftpd(8)
# -R 4096:32767 solves problems with ARC firmware, and obsoletes
# the /proc/sys/net/ipv4/ip_local_port_range hack.
# -s causes $INTFTPD_PATH to be the root of the TFTP tree.
# -l is passed by the init script in addition to these options.
INTFTPD_OPTS="-R 4096:32767 -s ${INTFTPD_PATH}"

```

1. now configuration for fttp is done
2. create folder for image

```auto
mkdir /tftpboot

```

and change the owner

```auto
chown nobody:nobody /tftpboot

```

now upload the new image to this folder and change its rights

```auto
chmod 644 /tftpboot/image.bin

```

1. now all is set up
2. run followed commands

```auto
ifconfig eth1 192.168.1.1

```

(for eth0 replace eth1 with eth0)

```auto
/etc/init.d/dhcpd start

```

```auto
/etc/init.d/in.tftpd start

```

1. now everything is running and you can connect the digi in recovery

Notes:  
a) take care to not use the Ethernet interface where is running another DHCP server, always use independent network!  
b) if you have problems with uploading images try to use ethernet switch between PC and digi

---

<div class="post-metadata">

**Author:** ![bobthomas13](https://avatars.discourse-cdn.com/v4/letter/b/958977/32.png) [@bobthomas13](https://forums.digi.com/u/bobthomas13)\
**Post date:** [September 22, 2011, 7:16am UTC](https://forums.digi.com/t/digi-recovery-how-to-in-linux/6045/2 "2011-09-22T07:16:29Z")

</div>

Nice work Jiri 🙂
