NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
Skywalker
Dec 13, 2007NETGEAR Expert
Getting started How-To
Requirements:
1) RAIDiator-4.00c1-p2 or later.
2) The APT addon. Install it using the Frontview web UI under System -> Update -> Local Update.
3) The EnableRootSSH addon. Again, install using the Frontview web UI under System -> Update -> Local Update. This will allow you to SSH in to the NAS and bring up a shell command prompt.
Now what?
After those requirements are met, you should be able to run the standard Debian command "apt-get" to download and install packages for everything you need for development, including the headers for the non-standard packages used for the ReadyNAS.
Examples:
# apt-get update
# apt-get install libc6-dev
# apt-get install gcc
# apt-get install gdb
# apt-get install libtag1-dev
# apt-get install uuid-dev
Compiling natively on the ReadyNAS is slow. How about a cross-compiler?
You can grab a tarball of a cross-compiler to compile using an x86 system from here. It includes gcc, g++, and development headers, for use on Linux-based systems. Extract the tarball from your root directory to ensure things are placed in the correct path.
WARNING!
Please note that you can get your ReadyNAS into peril easily by overriding some of the system libraries and utilities. Do not do your development on a system you don't have a backup of as you may end up re-installing the firmware or worse yet, doing a factory default.
1) RAIDiator-4.00c1-p2 or later.
2) The APT addon. Install it using the Frontview web UI under System -> Update -> Local Update.
3) The EnableRootSSH addon. Again, install using the Frontview web UI under System -> Update -> Local Update. This will allow you to SSH in to the NAS and bring up a shell command prompt.
Now what?
After those requirements are met, you should be able to run the standard Debian command "apt-get" to download and install packages for everything you need for development, including the headers for the non-standard packages used for the ReadyNAS.
Examples:
# apt-get update
# apt-get install libc6-dev
# apt-get install gcc
# apt-get install gdb
# apt-get install libtag1-dev
# apt-get install uuid-dev
Compiling natively on the ReadyNAS is slow. How about a cross-compiler?
You can grab a tarball of a cross-compiler to compile using an x86 system from here. It includes gcc, g++, and development headers, for use on Linux-based systems. Extract the tarball from your root directory to ensure things are placed in the correct path.
WARNING!
Please note that you can get your ReadyNAS into peril easily by overriding some of the system libraries and utilities. Do not do your development on a system you don't have a backup of as you may end up re-installing the firmware or worse yet, doing a factory default.
129 Replies
Replies have been turned off for this discussion
- btaroliProdigyTried again to install the *-dev packages after installing T45 and got the same results.
- wmcelhan1AspirantSee ERROR near the end....
wemightbe:~/MYUPDATES# apt-get install libc6-dev
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
linux-kernel-headers
Suggested packages:
glibc-doc manpages-dev
Recommended packages:
gcc c-compiler
The following NEW packages will be installed:
libc6-dev linux-kernel-headers
0 upgraded, 2 newly installed, 0 to remove and 78 not upgraded.
Need to get 4705kB of archives.
After unpacking 20.5MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://www.infrant.com readynas/ linux-kernel-headers 2.6.17.8ReadyNAS.netgear1 [1863kB]
Get:2 http://www.infrant.com readynas/ libc6-dev 2.3.2.ds1-22sarge6.infrant1 [2842kB]
Fetched 4705kB in 7s (629kB/s)
Selecting previously deselected package linux-kernel-headers.
(Reading database ... 9636 files and directories currently installed.)
Unpacking linux-kernel-headers (from .../linux-kernel-headers_2.6.17.8ReadyNAS.netgear1_sparc.deb) ...
Selecting previously deselected package libc6-dev.
Unpacking libc6-dev (from .../libc6-dev_2.3.2.ds1-22sarge6.infrant1_sparc.deb) ...
Setting up linux-kernel-headers (2.6.17.8ReadyNAS.netgear1) ...
Setting up libc6-dev (2.3.2.ds1-22sarge6.infrant1) ...
wemightbe:~/MYUPDATES# apt-get install gcc
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
binutils cpp cpp-3.3 gcc-3.3 gcc-3.3-base
Suggested packages:
binutils-doc cpp-doc make manpages-dev autoconf automake libtool flex bison gdb gcc-doc gcc-3.3-doc
The following NEW packages will be installed:
binutils cpp cpp-3.3 gcc gcc-3.3 gcc-3.3-base
0 upgraded, 6 newly installed, 0 to remove and 78 not upgraded.
Need to get 5307kB of archives.
After unpacking 14.1MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://http.us.debian.org oldstable/main gcc-3.3-base 1:3.3.5-13 [149kB]
Get:2 http://http.us.debian.org oldstable/main binutils 2.15-6 [2193kB]
Get:3 http://http.us.debian.org oldstable/main cpp-3.3 1:3.3.5-13 [1333kB]
Get:4 http://http.us.debian.org oldstable/main cpp 4:3.3.5-3 [29.6kB]
Get:5 http://http.us.debian.org oldstable/main gcc-3.3 1:3.3.5-13 [1592kB]
Get:6 http://http.us.debian.org oldstable/main gcc 4:3.3.5-3 [10.8kB]
Fetched 5307kB in 7s (698kB/s)
Selecting previously deselected package gcc-3.3-base.
(Reading database ... 11537 files and directories currently installed.)
Unpacking gcc-3.3-base (from .../gcc-3.3-base_1%3a3.3.5-13_sparc.deb) ...
Selecting previously deselected package binutils.
Unpacking binutils (from .../binutils_2.15-6_sparc.deb) ...
Selecting previously deselected package cpp-3.3.
Unpacking cpp-3.3 (from .../cpp-3.3_1%3a3.3.5-13_sparc.deb) ...
Selecting previously deselected package cpp.
Unpacking cpp (from .../cpp_4%3a3.3.5-3_sparc.deb) ...
Selecting previously deselected package gcc-3.3.
Unpacking gcc-3.3 (from .../gcc-3.3_1%3a3.3.5-13_sparc.deb) ...
Selecting previously deselected package gcc.
Unpacking gcc (from .../gcc_4%3a3.3.5-3_sparc.deb) ...
Setting up gcc-3.3-base (3.3.5-13) ...
Setting up binutils (2.15-6) ...
Setting up cpp-3.3 (3.3.5-13) ...
Setting up cpp (3.3.5-3) ...
Setting up gcc-3.3 (3.3.5-13) ...
Setting up gcc (3.3.5-3) ...
dpkg: error processing gcc (--configure):
subprocess post-installation script killed by signal (Illegal instruction)
Errors were encountered while processing:
gcc
E: Sub-process /usr/bin/dpkg returned an error code (1)wemightbe:~/MYUPDATES# pwd
/root/MYUPDATES
wemightbe:~/MYUPDATES# apt-get install gcc
Illegal instruction
wemightbe:~/MYUPDATES# apt-get install gcc
Illegal instruction
wemightbe:~/MYUPDATES# apt-get install reinstall gcc
Illegal instruction
wemightbe:~/MYUPDATES# apt-get update
Illegal instructionwemightbe:~/MYUPDATES# - osakanaAspirantI occurred same "Illegal instruction" problem.
Selecting previously deselected package cpp.
Unpacking cpp (from .../cpp_4%3a3.3.5-3_sparc.deb) ...
Selecting previously deselected package gcc-3.3.
Unpacking gcc-3.3 (from .../gcc-3.3_1%3a3.3.5-13_sparc.deb) ...
Selecting previously deselected package gcc.
Unpacking gcc (from .../gcc_4%3a3.3.5-3_sparc.deb) ...
Removing old gcc doc directory.
Setting up gcc-3.3-base (3.3.5-13) ...
Setting up binutils (2.15-6) ...
Setting up cpp-3.3 (3.3.5-13) ...
Setting up cpp (3.3.5-3) ...
Setting up gcc-3.3 (3.3.5-13) ...
Setting up gcc (3.3.5-3) ...
dpkg: error processing gcc (--configure):
subprocess post-installation script killed by signal (Illegal instruction)
Errors were encountered while processing:
gcc
E: Sub-process /usr/bin/dpkg returned an error code (1)
readynas:~# ls
Illegal instruction
readynas:~#
I tried following firmware.
* RAIDiator-4.00b5-p1-T1
* RAIDiator-4.00b9-p1-T1
* RAIDiator-4.00c1-p1
* RAIDiator-4.00c1-p2-T38
* RAIDiator-4.00c1-p2-T45
But all failed. - wmcelhan1AspirantSame after updating to T45 and trying again.
- wmcelhan1AspirantReinstall from flash T45
reran apt-get update
Decided to not do the gcc steps...
and started with
apt-cache search ntp
apt-get openntpd
same issue at the end of the process
The default action is to keep your current version.
*** ntpd.conf (Y/I/N/O/D/Z) [default=N] ? Y
Installing new version of config file /etc/openntpd/ntpd.conf ...
dpkg: error processing openntpd (--configure):
subprocess post-installation script killed by signal (Illegal instruction)
Errors were encountered while processing:
openntpd
E: Sub-process /usr/bin/dpkg returned an error code (1)
wemightbe:~# ll
/sbin/ll: line 1: 2453 Illegal instruction ls -ltr $*
wemightbe:~#
Seems to be something with the apt-get update changes, or we are just lucky with gcc and openntpd. - wmcelhan1Aspirantwemightbe:~/MYUPDATES/ntp# dpkg -i openntpd_3.9p1-4_sparc.deb
Selecting previously deselected package openntpd.
(Reading database ... 9636 files and directories currently installed.)
Unpacking openntpd (from openntpd_3.9p1-4_sparc.deb) ...
dpkg: dependency problems prevent configuration of openntpd:
openntpd depends on libc6 (>= 2.3.5-1); however:
Version of libc6 on system is 2.3.2.ds1-22sarge6.infrant1.dpkg: error processing openntpd (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
openntpd
wemightbe:~/MYUPDATES/ntp#
Back one step at a time...
wemightbe:~/MYUPDATES/ntp# dpkg -i openntpd_3.9p1-3_sparc.deb
(Reading database ... 9650 files and directories currently installed.)
Preparing to replace openntpd 3.9p1-4 (using openntpd_3.9p1-3_sparc.deb) ...
Unpacking replacement openntpd ...
dpkg: dependency problems prevent configuration of openntpd:
openntpd depends on libc6 (>= 2.3.5-1); however:
Version of libc6 on system is 2.3.2.ds1-22sarge6.infrant1.dpkg: error processing openntpd (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
openntpd
wemightbe:~/MYUPDATES/ntp#
Back another step
wemightbe:~/MYUPDATES/ntp# dpkg -i openntpd_3.6.1p1-2_sparc.deb
(Reading database ... 9650 files and directories currently installed.)
Preparing to replace openntpd 3.9p1-3 (using openntpd_3.6.1p1-2_sparc.deb) ...
Unpacking replacement openntpd ...
dpkg: dependency problems prevent configuration of openntpd:
openntpd depends on libssl0.9.7; however:
Package libssl0.9.7 is not installed.
dpkg: error processing openntpd (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
openntpd
wemightbe:~/MYUPDATES/ntp#
I decided to be brave/crazy (depends upon outcome) and use APT.
wemightbe:~/MYUPDATES/ntp# apt-get install libssl0.9.7Reading Package Lists... Done
Building Dependency Tree... Done
The following NEW packages will be installed:
libssl0.9.7
0 upgraded, 1 newly installed, 0 to remove and 78 not upgraded.
1 not fully installed or removed.
Need to get 0B/1819kB of archives.
After unpacking 4030kB of additional disk space will be used.
Selecting previously deselected package libssl0.9.7.
(Reading database ... 9650 files and directories currently installed.)
Unpacking libssl0.9.7 (from .../libssl0.9.7_0.9.7e-3sarge5_sparc.deb) ...
Setting up libssl0.9.7 (0.9.7e-3sarge5) ...
Setting up openntpd (3.6.1p1-2) ...
dpkg: error processing openntpd (--configure):
subprocess post-installation script killed by signal (Illegal instruction)Errors were encountered while processing:
openntpd
E: Sub-process /usr/bin/dpkg returned an error code (1)
wemightbe:~/MYUPDATES/ntp#
OH WELL
wemightbe:~/MYUPDATES/ntp# ls
Illegal instruction
wemightbe:~/MYUPDATES/ntp#
Restore from Flash - wmcelhan1Aspirantapt-get install libc6-dev gcc gdb libtag1-dev uuid-dev cpp gcc-3.3 gcc-3.3-base cpp-3.3 binutils linux-kernel-headers libssl0.9.8
wemightbe:~/MYUPDATES/openssl# apt-get install libc6-dev gcc gdb libtag1-dev uuid-dev cpp gcc-3.3 gcc-3.3-base cpp-3.3 binutils linux-kernel-headers libssl0.9.8
Reading Package Lists... Done
Building Dependency Tree... Done
libssl0.9.8 is already the newest version.
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
libssl0.9.7: Depends: libc6 (>= 2.3.5-1) but 2.3.2.ds1-22sarge6.infrant1 is to be installedE: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
wemightbe:~/MYUPDATES/openssl#
Back to getting an updated libc6 - btaroliProdigy
btaroli wrote: I'm running T38 (waiting to upgrade to T45 until a long operation finishes and I'll be able to restart without interrupting it) but have been unable to use apt-get to install any of the *-dev packages. The gcc and gdb bits installed w/o any issues.
Upon doing a factory reset under T45, I decided to have another go at this. The one change to my procedure was that by the time I'd been following these instructions on T38, I'd already done a wget of apt-get from the debian site and installed it with dpkg. The difference that caused, and what I wanted to share here is that the following (first) line was missing from /etc/apt/sources.list:deb http://www.infrant.com/packages readynas/
In fact, the sources.list seems to have far fewer things in it when installed via the APT add-on versus a direct wget from debian.org. So for others who have been doing other apt-get work before doing these instructions, you probably want to consider applying the APT add-on anyway, just to get the correct sources.list.
With the correct sources.list, I had no trouble installing the indicated packages. - SkywalkerNETGEAR ExpertYes, thanks btaroli. And for those seeing illegal instructions, you must have installed a debian glibc package. DO NOT DO THIS! If you are seeing illegal instructions, you need to do a 5-second firmware reinstall, and then delete any newer glibc libraries (eg. "# rm -f /lib/libc-2.3.6.so"). If you do not do this, each time ldconfig is run, the illegal instructions will come back!
- cdaigerAspirantMy sources list is very long. Could someone post the the list from the APT add-on?
Thanks!
Related Content
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!