www.zeroshell.org Forum Index www.zeroshell.org
Linux Distribution for server and embedded devices
 
 SearchSearch  RegisterRegister  UsergroupsUsergroups 
 ProfileProfile  Log inLog in  Log in to check your private messagesPrivate Message 

[Janus / twin Alix2] #2 Setup IPKG and add packages

 
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> ZeroShell
View previous topic :: View next topic  
Author Message
PatrickB



Joined: 03 Nov 2012
Posts: 50

PostPosted: Sun May 24, 2015 2:50 pm    Post subject: [Janus / twin Alix2] #2 Setup IPKG and add packages Reply with quote

Hello.

I had already extended routers and NAS devices this way. I didn't have the toolchain to compile for them and even with the toolchain, due to provider's options, compatibility issues may remain with the binaries already installed... When you need to add only 1 or 2 utilities, it is a pain.

The projects NSLU2, Optware etc. feature many useful packages in ready-to-use binaries, were ported to various architectures, then finding the good repository is affair of luck.
Need to try...

For instance this promising repository was bad luck Sad
https://downloads.openwrt.org/barrier_breaker/14.07-rc3/x86/alix2/packages/

...but:
root@janus2> file ssmtp
ssmtp: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
dynamically linked (uses shared libs), corrupted section header size Evil or Very Mad

This one was bingo ! Very Happy
http://ipkg.nslu2-linux.org/feeds/optware/syno-i686/cross/stable/


Remap /opt

The packages above like to install in /opt then I don't want to stress them.
But /opt is mounted to RAM (and quite empty) in Zeroshell on Alix.
So at first I change that to make /opt persistent at reboot.

I create /DB/opt and bind /opt to it.

Here is my PreBoot script:

Code:

# Support for extensions from NSLU2 repository:
# We need a persistent /opt, then it is located at /DB/opt.
# Zeroshell defaultly mounts /opt to the RAM and just creates 2 links there:
#   nmap -> /var/register/system/AutoUpdate/pkgs/40400/pkg/prefix/nmap
#   shibboleth-sp -> /usr/local/shibboleth-sp/

mount -o bind  /DB/opt /opt

# Optimizations:
# / is mounted to the RAM, only few subdirs are mounted to the CFlash, including /Database.
# Mount all fugitive data inside /Database to the RAM (it will also save the CFlash):

mount -t tmpfs -o mode=1755,nosuid,nodev      tmpfs /Database/LOG
mount -t tmpfs -o mode=1755,nosuid,nodev      tmpfs /Database/var/register/system/mrtg/counters
mount -t tmpfs -o mode=1755,nosuid,nodev      tmpfs /Database/var/register/system/mrtg/html
mount -t tmpfs -o mode=1755,nosuid,nodev      tmpfs /DB/opt/var/samba


(the optimizations using tempfs were added later)


Manually setup IPKG

Code:

root@janus2> wget http://ipkg.nslu2-linux.org/feeds/optware/syno-i686/cross/stable/ipkg-opt_0.99.163-10_i686.ipk

root@janus2> tar zxvf ipkg-opt_0.99.163-10_i686.ipk
./debian-binary
./data.tar.gz
./control.tar.gz

root@janus2> tar zxvf data.tar.gz
...

root@janus2> vi ./opt/etc/ipkg.conf
=> add there:
src syno-i686 http://ipkg.nslu2-linux.org/feeds/optware/syno-i686/cross/stable



Then move the content of the 'opt' created locally to /opt.

Also add /opt/bin and /opt/sbin to the PATH and IPKG works. It will install the wanted packages properly in /opt/...

Then using IPKG I already installed several packages from this repository, all working fine:
- samba2
- rsync
- nail
...

You may find there others fitting your own needs. Enjoy ! Wink

Any idea of improvement is welcome too.

Best regards.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> ZeroShell All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group