[GUIDE] Gnubee: Nas for Turris Omnia/Mox | Install Debian 9 with OpenMediaVault 4

Hello Turris-Fans,

this guide is for all people who want a perfect Nas for the Turris Omnia / Mox with Debian 9 + OMV 4. It’s perfect for your Nas Storage + Nextcloud and Webserver (I would be thankful for a tutorial for nextcloud and webserver). The GnuBee is a open source & hardware nas that is privacy focused. You can use it with the libreCMC(installed), openWRT(like the turris routers), debian and omv.

  • You can get this nas in 2 variations: small one with less power dry for 2,5 drives 15mm (so 5TB6= 30TB is possible) or for big drives (12tb6= 72TB possible).
    -> Tutorial is for the smaller one because this nas needs less electricity.

[HowTo] Getting Debian with OpenMediaVault on your Gnubee Personal Cloud 1 (maybe 2 too)

What you need:

  1. Connect your sata hard drive for the OS with your pc (with adapter mention above or internal socket if you use a tower pc) and use hard drive utilities (or gparted).
    Make 3 partions: sda1 formatted in ext4 min. 6GB, sda2 formatted in swap and 4GB and sda3 ext4 for your data storage

  2. Download this image for libreCMC prepared for debian install:
    https://github.com/k3pler4ever/gnubee/blob/master/librecmc-ramips-mt7621-gb-pc1-squashfs-sysupgrade_2017-11-28.bin

  3. Rename the image to gnubee.bin and put it on your usb-stick fat32 formatted

  4. Insert the stick on the front site of your gnubee (red button) and push the red button (Only Power supply connected no Hard drive or SD card)

  5. Wait until no led is blinking and the led on top is shining permanent. Disconnect your usb-stick and push the red button. (Attention: If something went wrong, you can every time set your gnubee back to LibreCMC with this image: https://github.com/k3pler4ever/gnubee/blob/master/librecmc-ramips-mt7621-gb-pc1-squashfs-sysupgrade.bin -> repeat point 2-5 with this image and you got a stock gnubee -> don’t forget to format your hard drive again!)

  6. Insert your Ethernet cable (blue port) and connect it to your router. Connect an other cable in the black port and to your pc / notebook. Push the red button again to power up.

  7. Wait until only the lower led is shining permanent. Type in your browser 192.168.10.1 and your in the luci libreCMC of your gnubee

  8. Login in luci without passwort and go so system-> backup and load this settings in: https://github.com/k3pler4ever/gnubee/raw/master/backup-libreCMC-2019-09-16.tar.gz

  9. After the reboot you can access ssh with terminal on your pc (Passwort should be now “GnuBee” or “gnubee”, i think):

ssh root@192.168.10.1
  1. Than type this code:
wget --no-check-certificate https://github.com/k3pler4ever/gnubee/blob/master/debian-jessie-install
  1. Now its time to connect your prepared hard drive from point 1 to your gnubee and type fdisk -l in the terminal. You will see your drives you created sda1 sda2 sda3. If not wait till you see your connected drive with fdisk -l
fdisk -l
Device       Start       End   Sectors   Size Type
/dev/sda1  8390656 234441614 226050959 10G Linux filesystem
/dev/sda2     2048   8390655   8388608     4G Linux swap
/dev/sda3  8390656 234441614 226050959 106G Linux filesystem
  1. Then you should be able to run the installer succesfully:
sh debian-jessie-install

write in /dev/sda1 and wait until the progress is successfully completed
and reboot:

reboot
  1. Connect the USB-to-UART debug cable to the “headphone jack” of your gnubee and the pc. Than use this code in terminal:
screen /dev/ttyUSB0 57600

(-> or go to the terminal of your router and check for new the gnubee device and the ip address)

Type this command to get your ip adress of the gnubee:

ip addr
  1. Remove the USB-to-UART debug cable and connect to your gnubee with the ip from the last point with terminal:
ssh root@192.168.1.204

->Passwort should be GnuBee again

  1. Then finish the jessie installation:
wget --no-check-certificate https://github.com/k3pler4ever/gnubee/blob/master/debian-modules-install

then

bash debian-modules-install

then

reboot
  1. Upgrade to stretch (Debian 9)

Type in:

vim /etc/apt/sources.list

Edit/Paste the old deb command to this new ones:

deb http://httpredir.debian.org/debian stretch main
deb http://httpredir.debian.org/debian stretch-updates main
deb http://security.debian.org/ stretch/updates main

-> Hit ESC-> type “:wq”

Then upgrade the packages:

apt update

then

apt full-upgrade

then

apt autoremove

then

reboot
  1. Install some preliminary packages and set up a non-root user (replace xxx below with the username). Everything from here on should be done as this user unless explicitly stated otherwise
apt-get install mdadm sudo 
adduser xxx 
adduser xxx users 
adduser xxx sudo 
su xxx 
cd ~
  1. Install the tools needed and download the sources. This step also pins a particular version of OMV4 to avoid issues introduced since the creation of this guide. (PMV 4.0.18-1)
sudo apt-get install build-essential devscripts php-dev libpam-dev xsltproc dh-systemd git postfix quilt fakeroot unzip 
git clone https://github.com/openmediavault/openmediavault
cd openmediavault
git checkout 6be37d09087957e86ee6f39dc4c30bb96f0a52cc
cd deb/sources
wget -c http://cdn.sencha.com/ext/gpl/ext-6.2.0-gpl.zip
cd ..
  1. Build some support libraries
cd libjs-extjs6/
debuild -b -uc -us
cd ../php-pam/
debuild -b -uc -us
cd ..
  1. Build OpenMediaVault
make install_build_tools
make clean binary
cd ..
find . -name *.deb
  1. Set up a local repository to install from and install OpenMediaVault
sudo mkdir /var/local/deb-repo
sudo cp `find ./ -name *.deb` /var/local/deb-repo
cd /var/local/deb-repo
sudo bash -c 'dpkg-scanpackages . | gzip > Packages.gz'
cd -
  1. Add deb file:/var/local/deb-repo/ ./ to /etc/apt/sources.list using your favorite editor and sudo (vim /etc/apt/sources.llist and etc “:wq” like before)
sudo apt-get update
sudo apt-get install openmediavault
  1. Start OpenMediaVault
sudo omv-initsystem
  1. Point your web browser to the GnuBee and you can log in to OpenMediaVault with the username admin and password openmediavault. (Same ip-adress like used before for ssh terminal login)

If you don’t already know the GnuBee’s ip address this should tell you sudo ifconfig|grep 192

Upgrading OpenMediaVault

New versions of OpenMediaVault come out all the time. To upgrade to the latest do the following steps:

cd openmediavault/
git pull
cd deb/
make clean binary
cd ..
sudo cp `find ./ -name *.deb` /var/local/deb-repo cd /var/local/deb-repo
sudo bash -c 'dpkg-scanpackages . | gzip > Packages.gz'
sudo apt-get update
sudo apt-get upgrade

Optional: Set language of debian


Optional: Change hostname if you want


Links:

https://feeding.cloud.geek.nz/posts/installing-debian-buster-on-gnubee2/