Magia, debian or ubuntu?

(Frank W.) #41

4.18 have no hdmi…i have merged it into 4.14, 4.16 and 4.19 is prepared (not yet merged)

Permitrootlogin is set to yes…so you can login as root,but you should change this if you add additional users for ssh

(Troumad) #42

Am I the fisrt user for the deb_stretch_4.14.13_SD.img ? Nobody have see the problem with the /dev/mmcblk1* ? Or the user have do 2 partition in the emmc ?

Before I have try it :

 root@bpi-r2:/home/test# cat /etc/crontab 
 # /etc/crontab: system-wide crontab
 # Unlike any other crontab you don't have to run the `crontab'
 # command to install the new version when you edit this file
 # and files in /etc/cron.d. These files also have username fields,
 # that none of the other crontabs do.


 # m h dom mon dow user	command
 17 *	* * *	root    cd / && run-parts --report /etc/cron.hourly
 25 6	* * *	root	test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
 47 6	* * 7	root	test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
 52 6	1 * *	root	test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
 *  *    * * *   root    /home/test/ >> /home/test/ssh.test;sync

and the file /home/test/

  •  if [ `systemctl status sshd | grep \ active | wc -l` = "1" ];
  •  then
  •          if [ `ifconfig lan0 | grep | wc -l` = "1" ];
  •          then
  •                  echo "lan0 OK, SSH marche"
  •          else
  •                  echo "lan0 non OK, SSH marche"
  •          fi
  •  else
  •  	if [ `ifconfig enp4s0 | grep | wc -l` = "1" ];
  •         	then
  •  		echo "lan0 OK, SSH ne marche pas"
  •  	       	systemctl restart sshd;
  •  	else
  •  		echo "lan0 non OK, SSH ne marche pas"
  •         	fi
  •  fi

And nothing was become in /home/test… Now I have :

lan0 non OK, SSH marche

(Frank W.) #43

i don’t know how many users tried my image…imho one reported problems on mounting…but imho he fixed it herself over debug-uart. had no time to change the image because i’m busy with creating the kernel, uboot, wiki, …

i don’t know what you want to do with your script…ssh works, right? then create a user for it, test it and then disable root-login

Btw. Ifupdown should be used no more…i only have it installed for interfaces-file,cause i don’t know how to bring up cpu-ports in new framework

(Troumad) #44

I have do my script because I don’t know why the ssh don’t run before testing tour idea about problems on mounting.

(Frank W.) #45

you can work now with the debian-image or other problems?

(Troumad) #46

I have play Donjon ans dragon with my son this afternoon and a friend… I try to configure the network, but I don’t have anought time. It’s not easy because when it’s don’t work (make a error it’s easy), I can’t acces to my config with the BPI-R2. I modifiy my cd-card with my computer.

(Frank W.) #47

You can first configure a Management-vlan and the do the other config. If you make an error on real config you can access via vlan

(Troumad) #48

I am trying to configure wan the first output in dhcp. You said it’s wan.

auto wan
iface wan inet dhcp

It’s not good… And I have only this in the file interface.

(Frank W.) #49

for dhcp don’t use auto…use allow-hotplug

Else system waits for interface

Don’t forget the eth0 and eth1 (if using 4.14.53+).without it wan wont work

(Troumad) #50

Now, I have dhcp in lan0 :

auto lan0
allow-hotplug lan0
  iface lan0 inet dhcp
  pre-up ip link set $IFACE address 02:01:02:03:04:00 up
  post-down ip link set $IFACE down

I nead “auto lan0” . But I can’t have dhcp in wan…

I have 4 questions :

  1. Can I install this .deb : bananapi-r2-image-4.14-main_4.14.79-1_armhf.deb found here :
  2. How do my network
  • wan for the wan with a dhcp adress and a mac adresse fix
  • lan0-3 and ap0 for the lan with a bridge and static adress.

    I have already managed a “wan/lan” network with a raspberry pi2 and iptables. But It was only eth0 and eth1 (in USB port). I have not managed hostapd.
  1. Can I do it with a raspbian in my raspberry pi 3 (I have a debian at home)
  2. I don’t understand all yoru file interfaces. What is $IFACE ? Where can I find a help ? I don’t have find it at the web.

(Frank W.) #51

You cannot bridge ap0

auto interface means that system waits you only nee hotplug-option,i dont knoe if you can set here mac…

(Troumad) #52

For my question 4), I can do
man interfaces

(Frank W.) #53

For eth0 and eth1 just copy the block and work only on lanx and wan. DHCP-Client allow-hotplug,all other auto

(Troumad) #54

For the question 1) I have try
dpkg -i bananapi-r2-image-4.14-main_4.14.79-1_armhf.deb
I was very afraid… Only the red LED… A ping and after a ssh : it’s good !
root@bpi-r2:~# uname -r

Have you a file interfaces example for dhcp in wan and bridge with adress in lan0-4 ?

Now, I wan’t try the Wifi. I see I have a problem : root@bpi-r2:~# ifconfig -a
Device “-a” does not exist.
I don’t understand why ifconfig -a is a problem…

(Frank W.) #55


ip a

Internal wifi needs creation of ap0 via wmt-tools and echo

(Troumad) #56

About ifconfig -a : I think it’s a bug of ifconfig.

The wifi can not have a automatique creation ?

(Frank W.) #57

you can call my in autorun (e.g. rc.local), activate/change ip-config in it and try it :slight_smile: this is how i do it

for ifconfig: imho ifconfig was an alias for ip-command, because ifconfig is old tool and should not be called

type ifconfig

(Troumad) #58

Yes :
ifconfig is aliased toip addr show’`

(Troumad) #59

There si not driver for my ssd in the kernel : I can’t mount this partition auto with the fstab, but after, I can mount this partition.

(Frank W.) #60

if driver is not included in kernel you can’t also mount it later :wink:

mostly you don’t need driver for ssd/hdd…more you need sata-support for chipset (and on r2 it depends on pcie-driver)…both should be included in my (newer) main-kernels. If you still use 4.14.79 it should be included…have also a ssd on my r2 running with 4.14.32+ (actual running 4.14.52 on main router). also last 4.19.1-main should work