BPI-R3 Can anyone share how to configure debian to work as a router?

if you have not gotten any errors, you can verify mit “nft -v” or just pass your nft-file…i’m not sure if i put the patch on 0.9.8

but we just unpacked a file, we didn’t install ?? and i don’t see where it is unpacked…

root@bpi-r3:/# nft -v
-bash: nft: command not found

ok i got it, the install path is in the tar file.

everything went inside the /install folder…

the file contains a folder structure (you see it with tar -tzf) beginning from root and unpacked to rootfs…so you should have the nft binary in /sbin

but i see it has install-prefix…it has created /install i think

so we need this too for the unpack command

--strip-components 1
root@bpi-r3:/tmp# tar -xzf nftables_bpi-r64.tar.gz -C / --strip-components 1
root@bpi-r3:/tmp# nft -v
-bash: /sbin/nft: No such file or directory
root@bpi-r3:/tmp#

really strange…strip-components should strip the install directory in the tarfile and unpack all to / with -C

maybe execute-bit missing

ls -lh /sbin/nft

or unpack with tar -tzvf …

since this last command i lost control of the BPI. a simple “ls” was not working anymore…i rebooted and now i have a kernel panic and it bootloops :unamused:

arg, i have a thought…some distributions recently replaced some dirs with links, so it can be that the symlink was overridden by the directory in the tar…sorry for that. easiest way is to reflash…harder one is to reactivate the symlinks…but this is nearly impossible from windows host

yes…should be the symlink-issue, as all in /bin or /sbin is linked to somewhere else and placing a folder there now contains only the parts in the tar…so no init and other commands

if you have a linux-host which can access the card you can restore them

ln -fs /usr/sbin /sbin
ln -fs /usr/bin /bin
ln -fs /usr/lib /lib

and then we need to extract the tar contents step by step

i can reinstall the image on the sdcard, but the problem is I lost the entire configuration, which took me several days (which is 30 minutes for you :rofl: )

i have a ubuntu in a VM

You can copy parts of your config and backup it to external system

tar -czf /boot/etc.tar.gz /etc

Before flashing the image just copy the tar file to your windows host

vm is tricky to access the filesystem on the card

so backup parts you need to /boot, copy from card to host and then reflash, copy back your backup and the nft-tar, boot up unpack your backup to root to have same etc back again

tar -xzf nftables_bpi-r64.tar.gz -C /sbin --strip-components 1 install/sbin
tar -xzf nftables_bpi-r64.tar.gz -C /lib --strip-components 1 install/lib

should be enough to get nft working…you can repeat the commands for share,include and etc, at least share should be done for man-pages (cli help). and do not forget to uninstall debians nft before

from where i should do this ??

it does not matter as source (/etc) and target (/boot/etc.tar.gz) are absolute paths

i mean from my windows PC ? because i can’t see any filesystem from here, only the folders i told you before

image

ah, right…thats a problem…do you have an application which can extract an image from the card? then you can backup the full card and put it on usb-stick or similar to later restore the parts from running system or you can move the actual root-partition after the position written by new image (>8GB). idk if windows partition tool can do such things…gparted in linux can :wink:

i think it will be quicker to reinstall the image…

yes but you 'll loose the changes you already made, sorry, didn’t thought on this

that’s not a big problem, as i don’t want to stay with debian in the BPI, that’s just for testing purpose.

but at least having a working system would allow me to wait for a solution to be found with openwrt.

is there another image working with debian that i can use , more up to date maybe ?