Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#239616 - 01/11/2004 11:06 Guide for installing sshd on the empeg car player
alex25
member

Registered: 30/06/1999
Posts: 179
Loc: Switzerland
Finally here is a guide on how to install a ssh server on the empeg car player:

The current version of this installation guide can be found on http://www.empeg.homelinux.com/sshd/

This installation instruction let you install a ssh server on your empeg player (Open SSH 3.8.1p1).
The following things are needed to do this:
- Slightly modified hijack kernel
- Empeg preinit from www.beaglebros.com
- sshd Tarfile

Before starting the installation download the following files:
Modified hijack kernel v413 for running sshd
preinit
sshd Tar File

Some explanations:
The sshd Tarfile also contains command like vi, top, … which can be used from within ssh sessions. The file is that large because it contains a lot of stuff which are not needed for the sshd but maybe can be used for other things. If you miss other things in there, just ask.
Preinit is needed because we have to mount the /programs0 partition before mounting the music partitions. If we mount it at a later time we have no access to the music partitions from inside ssh sessions.
Hijack modifications are needed because the actual hijack kernel seems to conflict with some libraries. So the kernel is patched with the following modifications:
- unsupported llseek bug
- vm-global patch
Furthermore the following compile option has to be set to use sshd: CONFIG_UNIX.

The patched hijack kernel for the sshd demon is 6kB larger than the original v413 kernel. A diff to the hijack v413 kernel can be found here. Maybe Mark Lord integrates this two patches into the standard hijack kernel because it could influence future development as well. I have a kernel running these two modification for a long time on my empeg without any problems.

Warning: Following the installation step by step should not disturb your empeg player installation at all. I tested this sshd installation on a stock empeg player but I can NOT guarantee that it will work for all the people out there. Please make absolutely sure you use the correct commands, else you can damage your empeg player software installation or your music partition. If this is the case you can reapply the original empeg player software and everything should be back normal. So use it at your own risk!

The following installation procedure assumes that you install the sshd on your not used empeg partition (/dev/hda2)
This has several advantages:
- You don't waste space on your music partition
- Installation will not be overwritten by further empeg software upgrades
- It does not affect the player software
- You have access to both music partitions
(If you decide to install it somewhere else you have to adapt several paths in the configuration files.)

1. Install the custom kernel and preinit
Install the custom hijack kernel from the link above (either through ftp, logomanager or jemplode)
Install preinit as mentioned on the preinit site:
rw
copy preinit binary (empeg-preinit.v7) to /sbin/hijack
chmod 755 /sbin/hijack
mkdir /etc/preinit.d
mkdir /programs0
mke2fs /dev/hda2
mkdir /programs1 (only if you have a two drive empeg)
mke2fs /dev/hdc2 (only if you have a two drive empeg)
ro
(Reboot your player at this stage)

2. Download and install sshd
Start a shell through a serial connection using a terminal program (e.g hyper terminal). The installation should also be possible using a telnet session to your empeg. Quit the player application and type the following commands:
mount -n -o remount,rw /dev/hda2 /programs0
mkdir /programs0/sshd
cd /programs0/sshd
copy the sshd_1.0.tar.gz file from above into the newly created directory
tar -xzvf sshd_1.0.tar.gz
rm sshd_1.0.tar.gz
To create the necessary ssh keys execute the following command (this takes some seconds):
/programs0/sshd/scripts/start_keygen
To change your empeg root password execute the following line:
/programs0/sshd/scripts/change_rootpassword
And finally if you would like to add other ssh users execute the following:
/programs0/sshd/scripts/start_adduser
To start the sshd demon execute:
/programs0/sshd/scripts/start_sshd
You should now have a running sshd on your empeg.
(Reboot your player at this stage)

3. Create new mount points for /drive0 and /drive1
(This step is necessary to have access from a ssh session to the music partitions. You can skip this section if you do not plan to access your music partitions for within ssh sessions.)
Please note: Everytime you install a new player version you have to do this instructions again.
cd /
rw
umount -n /drive0 (if error occurs close all running apps and try again)
umount -n /drive1 (if error occurs close all running apps and try again)
rm -r /drive0 (please make absolutely sure you have successfully unmounted the music partition, else you will delete all your music stored on your player!!! [proceed only if "ls -l /drive0/" lists no files])
rm -r /drive1 (same as for drive0)
ln -s /programs0/sshd/drive0 /drive0
ln -s /programs0/sshd/drive1 /drive1
ro
(Reboot your player at this stage)

4. Using your newly installed sshd
To start the sshd use the following command (this command mounts the /programs0 partition read/write):
/programs0/sshd/scripts/start_sshd
To stop the sshd and mount the /programs0 partition read only execute:
/programs0/sshd/scripts/stop_sshd (Mounting "read only" works ony if you terminate all ssh sessions before.)

It should also be possible to execute this commands from hijack. To run the player software and the sshd at the same time you have to upgrade the RAM of your player.
All the tests have been done on a 12MB MK2 empeg player.

Comments are welcome…

Top
#239617 - 02/11/2004 11:22 Re: Guide for installing sshd on the empeg car player [Re: alex25]
SonicSnoop
addict

Registered: 29/06/2002
Posts: 531
Loc: Triangle, VA
Thank you very much for taking all the time you did to create this! I will give this a try when I get home!
_________________________
-D Modifying and Tweaking is a journey, not a destination................................ MKIIa : 60gig - 040103286 - Blue - v2 + PCATS tuner MKIIa : 20gig - 040103260 - Blue - v3a8 + Mark Lord Special Edition Cherry Dock

Top