Installation of HFP should be very straightforward. Log in at your CH3HNAS as admin. Download and execute the setup program. A few questions will be asked, allowing you to fine tune the installation. Most of the options can be changed after HFP has been installed.

Question: where do you want HFP to be located?

You can specify any directory here, installing the chrooted environment on an USB stick should be possible (although I haven’t tried it yet, no USB stick big enough). If you don’t mind, just accept the default.

Question: do you want to make /home accessible inside HFP

If you answer yes to this question, your original /home folder will be accessible from your new environment. If you’re only going to take a quick look at HFP, you might consider to answer no here.

When /home is accessible inzide the chrooted environment and you somehow remove the folder in which you installed HFP (e.g. the root folder), you might end up with an empty NAS. Therefore, you should always disable HFP before removing the folder specified in the first question.

Question: do you want to enable a backdoor sshd

If you enable the backdoor process, a dropbear executable is started as soon as the original dropbear executable is killed. This new dropbear daemon will listen for incoming connections at port 8022. This way, you can still open a ssh session to your original file system.

Only specify yes until the installation has proven to be stable (or you need it for another reason)..

Question: how do you want to logon to your CH3HNAS?

Specify dropbear (2) here, as the new dropbear daemon will use the same RSA key as the orginal version of your CH3HNAS (some applications may not like the fact that the key suddenly changes). A reason to choose ssh here is if you want to use scp to copy files to your CH3HNAS.

Note: use ssh for the moment, until I’ve figured out why the original dropbear recreates the key pairs when you boot

Question: how do you want to enable HFP at system startup?

If you have an USB drive, specify a file located on this drive. This way, you can always disable (booting of) HFP by disconnecting you USB device. Otherwise, use the first option (or specify a file on your hard disk, although you can always disable HFP as long as you have access to your hard disk).

After answering these questions, HFP will be installed at your CH3HNAS and after you reboot your system, HFP will be enabled.

root:~ # cd /home/Public/funplug
root:/tmp # wget http://henkjan.net/hfp2/setuphfp
setuphfp             100% |*******************************|  3916  --:--:-- ETA
root:/home/Public/funplug# chmod 755 setuphfp
root:/home/Public/funplug# ./setuphfp
setup HFP
=========
where do you want the root of hfp to be located?
directory [/home/Public/funplug/hfproot]: 
do you want to make /home accessible inside HFP [y]: n
do you want to enable a backdoor sshd (port 8022) [n]: y
how do you want to login to your CH3HNAS?
1. using ssh
2. using dropbear
choice[2]: 1

how do you want to enable HFP at system startup?
1. always (RECOMMENDED)
2. if a certain file exists (for example located at your USB drive)
choice [1]: 2
which file should exists such that HFP will be activated?
filename:  /home/hfp/etc/enable.hfp
- installing root filesystem
Connecting to henkjan.net 
rootfs.tar.bz2       100% |*******************************|  4578k 00:00:00 ETA
- copy /etc/passwd /etc/shadow /etc/resolv.conf
- copying existing ssh keys
- install package manager
Connecting to henkjan.net 
hfppkg               100% |*******************************| 27170  --:--:-- ETA
- update configuration
configuration /home/Public/funplug/hfproot/var/packages/hfpindex updated
- install busybox
installing busybox-1.17.4 ...
busybox-1.17.4 installed
- install openssh
the following packages have to be installed first:
- openssl-1.0.0b
- libz-1.2.5
installing openssl-1.0.0b ...
openssl-1.0.0b installed
installing libz-1.2.5 ...
libz-1.2.5 installed
installing openssh-5.6p1 ...
-=[ configure ssh ]=-
adding sshd user to /etc/passwd
adding sshd user to /etc/shadow
adding sshd user to /etc/group
generating ssh_host_key ...
Generating public/private rsa1 key pair.
Your identification has been saved in /etc/ssh_host_key.
Your public key has been saved in /etc/ssh_host_key.pub.
The key fingerprint is:
b9:13:b3:ea:88:67:1d:77:63:5f:ce:32:4e:6a:21:6c root@CH3HNAS
The key's randomart image is:
+--[RSA1 2048]----+
|                 |
|                 |
|                 |
|         .       |
|       .S        |
|      . E==   .  |
|     . +++ +.+   |
|   .o... ..o+ o  |
|  .o..o  ....o   |
+-----------------+
generating ssh_host_dsa_key ...
Generating public/private dsa key pair.
Your identification has been saved in /etc/ssh_host_dsa_key.
Your public key has been saved in /etc/ssh_host_dsa_key.pub.
The key fingerprint is:
10:14:8b:47:3c:3b:83:9f:48:8c:72:a4:5b:a3:c6:13 root@CH3HNAS
The key's randomart image is:
+--[ DSA 1024]----+
|     o=.         |
|  .  ooo         |
| o o..+o         |
|oE= +.+.         |
|.*.o o +S        |
|o+  . o          |
|. .              |
|                 |
|                 |
+-----------------+
generating ssh_host_rsa_key ...
Generating public/private rsa key pair.
Your identification has been saved in /etc/ssh_host_rsa_key.
Your public key has been saved in /etc/ssh_host_rsa_key.pub.
The key fingerprint is:
a3:76:9d:d5:b8:46:bb:a2:c3:d1:d8:5f:7d:00:b7:60 root@CH3HNAS
The key's randomart image is:
+--[ RSA 2048]----+
|                 |
|            E .  |
|           . + . |
|             oo  |
|        S+  + .o |
|       .ooo+ o. o|
|      o...o.+.  .|
|     . .o ....   |
|        .o ..    |
+-----------------+
openssh-5.6p1 installed
- install starthfp
installing starthfp-0.1 ...
starthfp-0.1 installed
- saving configuration
- create /ffp/start/newhfp.sh

assuming the installation went OK
waiting one minute to enable the CH3HNAS to write everything to disk...
[************************************************************]

do you want to reboot your CH3HNAS? [y]: yes