Running ssh, gcc, slimserver or whatever really, on the mss2

MSS II General talk

Running ssh, gcc, slimserver or whatever really, on the mss2

Postby marky » 27 May 2007 00:40

ok
marky
Junior Member
 
Posts: 11
Joined: 08 May 2007 19:00
Location: Sweden

Re: Running ssh, gcc, slimserver or whatever really, on the mss2

Postby marky » 27 May 2007 00:48

Hi, I am quite a Linux beginner, so perhaps the following info is already known by all of you talented linuxgurus in here. But, in case there is someone else around here that is a linux newbie like me, you might, like me, find it very cool to know that it is possible to install Debian on top of the mss2 linux.
Since Debian has great ARM support and a great simple package installer (apt-get) it is quite easy to installing anything such as gcc, ssh, slimserver etc. on a mss2 running Debian. Also, perhaps best of all, if you mess anything up in your mss2 Debian, you can just delete it and install it again (since it runs on top of the mss2 linux =)

Based on the info on the following 2 pages:
http://wiki.dns323.info/howto:chroot_debian
and
http://wiki.dns323.info/howto:chroot_debian:fun_plug
and also the great article on howto get telnet running on the mss2 (creds to "hd" for that great article!
)

I was able to get it all running by:

1. Downloading Debian Etch 4.0 from http://dev.skcserver.de/dns323/etch.tar (169 Mb) to my pc desktop.
2. Dragged and dropped it (etch.tar) in the public/Other dir on my mss2.
3. Then I telneted in to the mss2 and did the following:

/share/Public/Other # ls
etch.tar
/share/Public/Other # tar -xf etch.tar
/share/Public/Other # mkdir etch/mnt/root
/share/Public/Other # mount -o bind / etch/mnt/root
/share/Public/Other # mount -o bind /dev etch/dev
/share/Public/Other # mount -o bind /sys etch/sys

/share/Public/Other # mount -o bind /proc etch/proc
/share/Public/Other # cp -f /etc/resolv.conf etch/etc/

then I just did the magical change root:
/share/Public/Other # chroot etch

and woops, I am in Debian and thus able to use apt-get! I started by running the command:
apt-get update
and then installed the programs I wanted such as gcc:

sh-3.1# apt-get install gcc
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
binutils cpp cpp-4.1 gcc-4.1 libssp0
Suggested packages:
binutils-doc cpp-doc gcc-4.1-locales make manpages-dev autoconf automake1.9
libtool flex bison gdb gcc-doc gcc-4.1-doc
Recommended packages:
libc6-dev libc-dev libmudflap0-dev
The following NEW packages will be installed:
binutils cpp cpp-4.1 gcc gcc-4.1 libssp0
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 4915kB of archives.
After unpacking 12.3MB of additional disk space will be used.
Do you want to continue [Y/n]? Y

Get:1 http://ftp.de.debian.org etch/main binutils 2.17-3 [2485kB]
Get:2 http://ftp.de.debian.org etch/main cpp-4.1 4.1.1-21 [2006kB]
Get:3 http://ftp.de.debian.org etch/main cpp 4:4.1.1-15 [11.6kB]
Get:4 http://ftp.de.debian.org etch/main libssp0 4.1.1-21 [4224B]
Get:5 http://ftp.de.debian.org etch/main gcc-4.1 4.1.1-21 [403kB]
Get:6 http://ftp.de.debian.org etch/main gcc 4:4.1.1-15 [5062B]
Fetched 4915kB in 26s (187kB/s)
Selecting previously deselected package binutils.
(Reading database ... 8545 files and directories currently installed.)
Unpacking binutils (from .../binutils_2.17-3_arm.deb) ...
Selecting previously deselected package cpp-4.1.
Unpacking cpp-4.1 (from .../cpp-4.1_4.1.1-21_arm.deb) ...
Selecting previously deselected package cpp.
Unpacking cpp (from .../cpp_4%3a4.1.1-15_arm.deb) ...
Selecting previously deselected package libssp0.
Unpacking libssp0 (from .../libssp0_4.1.1-21_arm.deb) ...
Selecting previously deselected package gcc-4.1.
Unpacking gcc-4.1 (from .../gcc-4.1_4.1.1-21_arm.deb) ...
Selecting previously deselected package gcc.
Unpacking gcc (from .../gcc_4%3a4.1.1-15_arm.deb) ...
Setting up binutils (2.17-3) ...

Setting up cpp-4.1 (4.1.1-21) ...
Setting up cpp (4.1.1-15) ...

Setting up libssp0 (4.1.1-21) ...

Setting up gcc-4.1 (4.1.1-21) ...
Setting up gcc (4.1.1-15) ...

sh-3.1#

Quite magical, I must say! I guess people here can optimize this alot better than me and create a nice startupscript for this. However, I am now enjoying sshing in to my mss2 and installing all that I need with apt-get!

Thanks to my coworker and linuxguru MrVrigstad2007 who gave me some hints about howto do this!


Have a great day everyone!
marky
Junior Member
 
Posts: 11
Joined: 08 May 2007 19:00
Location: Sweden

Re: Running ssh, gcc, slimserver or whatever really, on the mss2

Postby PaKaL » 27 May 2007 14:10

My question is... how can I telnet my MSS II with original firmware installed?
PaKaL
Newbie
 
Posts: 3
Joined: 26 May 2007 12:10

Re: Running ssh, gcc, slimserver or whatever really, on the mss2

Postby stuart_f » 27 May 2007 18:59

You cannot telnet in using the firmware that ships with the drive. You need to perform hd's modifications for it to work.
stuart_f
Senior Member
 
Posts: 76
Joined: 17 Nov 2006 10:49

Re: Running ssh, gcc, slimserver or whatever really, on the mss2

Postby PaKaL » 27 May 2007 19:43

So, as the forum is back, I hope to see a MSS II hacked firmware soon, as I don't want to disassemble my MSS II... :D
PaKaL
Newbie
 
Posts: 3
Joined: 26 May 2007 12:10

Re: Running ssh, gcc, slimserver or whatever really, on the mss2

Postby rudi » 29 May 2007 13:23

Looks great. I've managed to run debian on my mss2, but if I compile e.g. wget in the debian environment I'm able to execute it there but not outside.

Code: Select all
sh-3.1# ls -l devel/wget-1.10.2/src/wget
-rwxr-xr-x 1 root root 233185 May 29 12:30 devel/wget-1.10.2/src/wget
sh-3.1# wget
wget: missing URL
Usage: wget [OPTION]... [URL]...

Try `wget --help' for more options.


but

Code: Select all
/ # ls -l /share/Service/Os/MSS/etch/devel/wget-1.10.2/src/wget
-rwxr-xr-x    1 root     root       233185 May 29 12:30 /share/Service/Os/MSS/et           ch/devel/wget-1.10.2/src/wget
/ # /share/Service/Os/MSS/etch/devel/wget-1.10.2/src/wget
/bin/sh: /share/Service/Os/MSS/etch/devel/wget-1.10.2/src/wget: not found


Any idea?
rudi
Newbie
 
Posts: 1
Joined: 29 May 2007 13:07

Re: Running ssh, gcc, slimserver or whatever really, on the mss2

Postby marky » 30 May 2007 10:24

Hi rudi,
just a quick thought regarding your question... have you tried compiling wget under Debian using static linking?
marky
Junior Member
 
Posts: 11
Joined: 08 May 2007 19:00
Location: Sweden

Re: Running ssh, gcc, slimserver or whatever really, on the mss2

Postby hd » 31 May 2007 12:34

Hi Marky,

this is great stuff! I lost interest in this forum for various reasons but I am glad I checked back.

to Rudi:

I posted instructions on how to (cross-)compile wget with large file support but they got lost, let me repost:

Code: Select all
[hd@golden ~]$ wget http://software.lpetrov.net/wget-LFS/wget-LFS-20041113.tar.bz2
[hd@golden ~]$ bunzip2 wget-LFS-20041113.tar.bz2
[hd@golden ~]$ tar xf wget-LFS-20041113.tar
[hd@golden ~]$ export CC=/home/hd/arm-2006q3/bin/arm-none-linux-gnueabi-gcc
[hd@golden ~]$ export PATH=$PATH:/home/hd/arm-2006q3/bin
[hd@golden ~]$ cd wget-LFS-20041113
[hd@golden wget-LFS-20041113]$ ./configure --host=arm-none-linux
[hd@golden wget-LFS-20041113]$ make
[hd@golden wget-LFS-20041113]$ ../arm-2006q3/bin/arm-none-linux-gnueabi-strip src/wget


Try to compile this version under the Debian environment on the MSSII

It still would be nice to get a new kernel compiled and running!
hd
Junior Member
 
Posts: 12
Joined: 22 Nov 2006 22:32

Re: Running ssh, gcc, slimserver or whatever really, on the mss2

Postby marky » 31 May 2007 21:23

Hi Hd,
Yes, I agree, even if this is sooo much nicer, a new kernel would still be great.
marky
Junior Member
 
Posts: 11
Joined: 08 May 2007 19:00
Location: Sweden

Re: Running ssh, gcc, slimserver or whatever really, on the mss2

Postby NRWler04 » 02 Jun 2007 09:52

@ALL ...
yesterday I've got my MSS II 1TB. I want to use it as a music server for my Hifidelio music machine. For this I want to install FireFly or TwonkyVision (Rel. 4.3) on the box. From twonky I've got a link where I downloaded the required files. There is a installation routine to install the media server on the MSS II. But I need a telnet conection ... :(

I studied all the posts but to be honest, I don't know how to setup the patched firmware on my Vista machine ....

I need your help .... :)

NRWler04
NRWler04
Junior Member
 
Posts: 10
Joined: 01 Jun 2007 21:27

Re: Running ssh, gcc, slimserver or whatever really, on the mss2

Postby Kos » 03 Jun 2007 11:13

NRWler04, a couple of my friends bought the MSSII and they would give anything to have my Twonky (running perfectly on MSS+) running. You are not alone!

Kos
Setup: Linksys (wifi), Philips SLA5520 & Noxon iRadio (clients), Twonky 4.4 (server), Maxtor Shared Storage Plus 200GB (NAS), Bush TR2015WIFI (radio), MediaMonkey Gold (manager)
Kos
Junior Member
 
Posts: 17
Joined: 10 Nov 2006 20:19

Re: Running ssh, gcc, slimserver or whatever really, on the mss2

Postby rvdb » 03 Jun 2007 21:26

HI there

if followed 'marky's' recipe to get debian running in a chroot environment.

Please could someone help me in understanding. As far as i understand i'm sill running the 'old' kernel. How then could i install new services like http server apache, or ssh server or nfs support? Don't they require kernel support??

rein
rvdb
Newbie
 
Posts: 4
Joined: 12 Mar 2007 14:12
Location: Netherlands

Re: Running ssh, gcc, slimserver or whatever really, on the mss2

Postby NRWler04 » 04 Jun 2007 12:05

Kos wrote:NRWler04, a couple of my friends bought the MSSII and they would give anything to have my Twonky (running perfectly on MSS+) running. You are not alone!

Kos


That's sound quite interesting. My question is, what we can do to solve our problem .... How we can patch the firmware on the Maxtor side to enable it for telnet?

How is an expert for this? I will provide the Twonkylink with installation routine ....
NRWler04
Junior Member
 
Posts: 10
Joined: 01 Jun 2007 21:27

Re: Running ssh, gcc, slimserver or whatever really, on the mss2

Postby rvdb » 04 Jun 2007 14:29

maybe there is some misunderstanding. To get telnet running you DON'T need to open the MSSII. You have to download the newest software from Maxtor, then make some changes to that (see hd's recipe) and upload this to the MSSII as a software update. And voila: telnet access.

From then on i see three `streams' here in the forum

1/ our own kernel
seems nescessary for those services that need kernel support (like nfs???)

2/ crosscompiling new software for the old kernel
if the kernel is good enough for you you may crosscompile new software and 'put it in the image' to be uploaded for a software upgrade. I guess static linking is needed as it is not clear what libs are already available.

3/ debian on top of the old kernel
just use the old kernel but forget about the rest and use a new debian installation and chroot. Works ok but what is the value of it? Well first of all no need to crosscompile: you can do all your compilation on the MSSII itself (really it runs gcc the c compiler). But i still do not understand in what way the new 'debian' works with the old devices and mounts? Totally unclear to me. (but i did manage to get ssh running).

Is there someone who can explain the architecture of the MSSII? What is the bootloader? What makes the disk bootable? What are the devices whose support need to go into the kernel? Are we able to compile our own kernel? I must say this is my first experience with such 'embedded device' and i'm a bit in the dark i must say.

Ah it would be so much fun if we could just get debian running using its own kernel. Can someone explain to me where we are in the process (did i write it down correctly anyway???)

Regards
Rein
rvdb
Newbie
 
Posts: 4
Joined: 12 Mar 2007 14:12
Location: Netherlands

Re: Running ssh, gcc, slimserver or whatever really, on the mss2

Postby bryanhepworth » 04 Jun 2007 19:37

Hi Everyone

In answer to the kernel build questions yes it has been done and I've managed to get them running on my mssii box by doing an update with the web based installation upgrade it has. There was a couple of things I was trying to do namely nfs, that didn't appear to work and with work commitments the last couple of months, I haven't been able to revisit the problem to figure out why.

The box does what I need it to do - ssh backup, so I haven't had any pressing work need to look harder. Time permitting I should be able to look at it again in a month or so's time, but I can tell you it can be done fairly painlessly, if you look through hd's notes. The guys on linkstation wiki are also helpful and it's worth dropping in to chat on technical issues.

It boots using uBoot - I have a console cable attached to mine so that I can tftp different things into it at boot time, which is why I've managed to rescue it from the daft things I've thrown at it!

Bryan
bryanhepworth
Junior Member
 
Posts: 20
Joined: 21 Dec 2006 13:58
Location: County Durham

Next

Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron