Jump to content

Recommended Posts

You may use Debian 8.11 "Jessie" , Debian 9.13 "Stretch" or Debian 10.9 "Buster" right on your Keenetic router.

http://files.keenopt.ru/ is a good example of working Debian on Keenetic Giga III.

Requirements

Installation

           ( for KN-2011 or KN-2111 - debian-jessie-8_11-mips.tar.gz or debian-stretch-9_13-mips.tar.gz or debian-buster-10_9-mips.tar.gz )

  • Open OPKG page, pick your USB drive and hit "Apply".

Give your Keenetic a couple of minutes to unpack necessary files, you''ll see following syslog messages if all went fine:

[I] Jul 19 13:24:28 ndm: Opkg::Manager: disk is set to: fb4e34d1-3cab-fd19-b96d-4bb3a2d5ec84:
[I] Jul 19 13:24:28 ndm: Opkg::Manager: init script reset to default: /opt/etc/initrc.
[I] Jul 19 13:24:28 ndm: kernel: EXT4-fs (sda1): re-mounted. Opts: (null)
[I] Jul 19 13:24:28 ndm: Opkg::Manager: /tmp/mnt/FIT8GB/ mounted to /tmp/mnt/FIT8GB/.
[I] Jul 19 13:24:28 ndm: Opkg::Manager: /tmp/mnt/FIT8GB/ mounted to /opt/.
[I] Jul 19 13:24:28 npkg: inflating "debian-keenetic.tar.gz".
[I] Jul 19 13:24:28 ndm: Core::ConfigurationSaver: saving configuration...
[I] Jul 19 13:26:10 ndm: Opkg::Manager: /tmp/mnt/FIT8GB/ initialized.
[I] Jul 19 13:26:10 ndm: Core::ConfigurationSaver: configuration saved.
[I] Jul 19 10:26:10 root: Starting Debian services...
[W] Jul 19 13:26:11 ndm: kernel: Algorithmics/MIPS FPU Emulator v1.5
[I] Jul 19 13:26:11 ndm: Opkg::Manager: /opt/etc/initrc: Starting OpenBSD Secure Shell server: sshd.
[I] Jul 19 13:26:11 ndm: Opkg::Manager: /opt/etc/initrc: Done.
[I] Jul 19 10:26:11 sshd[448]: Server listening on 0.0.0.0 port 22.
[I] Jul 19 10:26:11 sshd[448]: Server listening on :: port 22.
Spoiler

...
[I] Feb 19 12:26:45 ndm: Opkg::Manager: disk is set to: debian:/.
[I] Feb 19 12:26:45 ndm: kernel: EXT4-fs (sde): re-mounted. Opts: (null)
[I] Feb 19 12:26:45 ndm: Opkg::Manager: /tmp/mnt/bc2a2eb6-f889-4366-83ba-2cc3b93646f9 mounted to /tmp/mnt/bc2a2eb6-f889-4366-83ba-2cc3b93646f9.
[I] Feb 19 12:26:45 ndm: Opkg::Manager: /tmp/mnt/bc2a2eb6-f889-4366-83ba-2cc3b93646f9 mounted to /opt/.

[I] Feb 19 12:26:45 npkg: inflating "debian-stretch-9_8-mipsel.tar.gz".

[I] Feb 19 12:27:13 ndm: Opkg::Manager: /tmp/mnt/bc2a2eb6-f889-4366-83ba-2cc3b93646f9 initialized.
[I] Feb 19 12:27:13 ndm: Opkg::Manager: init script reset to default: /opt/etc/initrc.
[I] Feb 19 12:27:13 ndm: Core::ConfigurationSaver: saving configuration...
[I] Feb 19 12:27:13 ndm: Dns::Manager: RPC-only mode enabled.
[I] Feb 19 12:27:13 ndnproxy: ndnproxy stopped.

[I] Feb 19 09:27:13 0: Starting Debian services...
[I] Feb 19 09:27:14 sshd[8096]: Server listening on 0.0.0.0 port 222.
[I] Feb 19 12:27:14 ndm: Opkg::Manager: /opt/etc/initrc: Starting OpenBSD Secure Shell server: sshd.
[I] Feb 19 12:27:14 ndm: Opkg::Manager: /opt/etc/initrc: Done.
[I] Feb 19 09:27:14 sshd[8096]: Server listening on :: port 222.

[I] Feb 19 12:27:15 ndnproxy: ndnproxy 1.3.0b22 started.
[I] Feb 19 12:27:15 ndnproxy: PID file: /var/ndnproxymain.pid.
[I] Feb 19 12:27:15 ndnproxy: stats. file: /var/ndnproxymain.stat.
[I] Feb 19 12:27:17 ndm: Core::ConfigurationSaver: configuration saved.

[I] Feb 19 09:27:55 sshd[8308]: Connection closed by 192.168.1.60 port 48314 [preauth]
[I] Feb 19 09:28:34 sshd[8476]: Accepted password for root from 192.168.1.60 port 48318 ssh2
[I] Feb 19 09:28:34 sshd[8476]: pam_unix(sshd:session): session opened for user root by (uid=0)
[E] Feb 19 09:28:34 sshd[8476]: pam_env(sshd:session): Unable to open env file: /etc/default/locale: No such file or directory

[I] Feb 19 09:29:56 chroot: Hello, World!

[I] Feb 19 09:31:13 sshd[8476]: Received disconnect from 192.168.1.60 port 48318:11: disconnected by user
[I] Feb 19 09:31:13 sshd[8476]: Disconnected from 192.168.1.60 port 48318
[I] Feb 19 09:31:13 sshd[8476]: pam_unix(sshd:session): session closed for user root

[I] Feb 19 12:31:30 ndm: Opkg::Manager: unmount existing /opt disk: debian:/.
[I] Feb 19 09:31:30 0: Stopping Debian services...
[I] Feb 19 09:31:31 sshd[8096]: Received signal 15; terminating.
[I] Feb 19 12:31:31 ndm: Opkg::Manager: /opt/etc/initrc: Stopping OpenBSD Secure Shell server: sshd.
[I] Feb 19 12:31:31 ndm: Opkg::Manager: /opt/etc/initrc: Done.
[I] Feb 19 12:31:31 ndm: Opkg::Manager: disk unmounted.

[I] Feb 19 12:31:31 ndnproxy: ndnproxy stopped.
[I] Feb 19 12:31:31 ndm: Dns::Manager: RPC-only mode disabled.
[I] Feb 19 12:31:31 ndm: Opkg::Manager: disk is unset.
[I] Feb 19 12:31:31 ndm: Opkg::Manager: init script reset to default: /opt/etc/initrc.
[I] Feb 19 12:31:31 ndm: Core::ConfigurationSaver: saving configuration...
[I] Feb 19 12:31:33 ndnproxy: ndnproxy 1.3.0b22 started.
[I] Feb 19 12:31:33 ndnproxy: PID file: /var/ndnproxymain.pid.
[I] Feb 19 12:31:33 ndnproxy: stats. file: /var/ndnproxymain.stat.
[I] Feb 19 12:31:34 ndm: Core::ConfigurationSaver: configuration saved.
...

 

Using Debian

Use following SSH credentials to get access to Debian environment:

  • host: my.keenetic.net,
  • port: 222
  • user name: root,
  • password: debian.

This is it, you've got 10000+ available packages from one of greatest linux community!

For 64MB RAM devices is highly recommended to turn on Swap-file.

 

Details

You see chroot-environment after SSH logon, there's only minimal Busubox outside of it and /opt/etc/initrc script to fire up sandbox, this script starts necessary Debian services on boot and gracefully shut them down on reboot or unmount USB drive:

 

[I] Jul 19 10:28:36 root: Stopping Debian services...
[I] Jul 19 10:28:36 sshd[448]: Received signal 15; terminating.
[I] Jul 19 13:28:36 ndm: Opkg::Manager: /opt/etc/initrc: Stopping OpenBSD Secure Shell server: sshd.
[I] Jul 19 13:28:36 ndm: Opkg::Manager: /opt/etc/initrc: Done.
[I] Jul 19 13:28:36 ndm: Opkg::Manager: disk unmounted.

Also, you'll find /chroot-services.list file, where you can put new services which should be started on boot, please use one name per string, service names can be taken from  /etc/init.d.

Good luck!

deb.png

Edited by TheBB
Updated Debian 10: 10.9 released

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...