[HowTo] Debian 9 with OpenMediaVault 4 | First working step by step tutorial for everyone. Beginner friendly.

408 views
Skip to first unread message

GnuBeeNoob

unread,
Jul 18, 2021, 6:52:34 PM7/18/21
to GnuBee
[HowTo] Debian 9 with OpenMediaVault 4 | First working step by step tutorial for everyone. Beginner friendly.

Attention: You will find this guide also on gnubee github site. Nobody should be punished to use a data spying service from an asshole company like google :)

Hey all,

In this "beginners" tutorial i will show you how you can set up OMV with your gnubee.
If something is not working or you need help, write here. i will help you with normal words, so everyone can understand it. Not only IT-nerds! 
-> IF you really cant get your gnubee running with my help and this tutorial, i can also make an disk image of my 120gb SSD Operationsystem drive. So you only must burn it on a 120gb ssd drive and stick it in the first drive and your gnubee will run.

Disclaimer | Why i wrote this tutorial: 
I'am a person that cares about privacy and i love the open source movement! This is why i bought the gnubee.
After getting it, it was a nightmare to setup (Believe me i was working 1 month like a full time job on the gnubee). 
I'am not a programmer or an it-guy. I had a lot of struggle with other devices, like my OpenWRT Router set-up for perfect privacy, but all of them can't compete against the gnubee. It would be so damm easy if the producer of the gnubee would make an sd-card or HDD image that works like sd-cards with the raspberry pi! But no, they decided to be "real special":"Only "Geeky IT-Programmer" should use the Gnubee. It is not for everyone". For me all people are equal and we should help us all and share all our knowledge. This is want the open source movement stands for right? I was banging for help, but i didn't get people that really wanted my gnubee to run. Only telling me more Nerdstuff and wanted me to use other Images that don't work! Not really read want my problem is and help me at the point of my problem with normal words everyone can understand. 
-> It is really sad that people are acting like instagram influencers after they learned to programm and think only if you speak their language your are worth to use their nerdy stuff. Everyone is equal and welcome. Thats the open Source spirit! 


What you need:

    - Gnubee Personal Cloud 1 or 2
    - Power supply 12V 3A (not less because with less the gnubee won’t read your drives)
    - Optional: USB-to-UART debug cable to get your IP (You get the IP also in your Router under your connected devices)
    - Sata Harddrive with 10GB minimum -> SSD recommend for the first slot for a silent debian operating system 
      and the same drive size for the other 5 drives if you want to use raid
    - USB-Stick formatted in FAT32
    - Sata to USB Adapter to mount your drive in linux (easier than format/split the drive with terminal):
    - Linux OS on your Computer with an Ethernet port (Or an adapter USB to Ethernet)
    - Make sure no Drive name in your gnubee is "gnubee_root". 
      GnuBee will everytime boot from this drive first, we don't want that for a fresh new start
    - 2 hours time or more!

Read before start:
I tried to write every step down, so most people should understand it and can make the gnubee running.
If in the installtion process while installing a gui, inferface "pop-up" will pop out, chose everytime "yes", "y", "ok" or hinting enter and let all things like it is). Passwort is allways "GnuBee" or "gnubee" or this this passwort you chose in the "xxx" sector (Point 15). You can save 1 hour time if you instead want to install Debian 8 with OMV3. Working the same, only the inferface is looking more ugly.  

HowTo:
1. Connect your sata drive, that you want to use in the first slot for the os with your pc (with adapter mention above or internal socket if you use a tower pc) Use hard drive utilities (or gparted,) or another program to make 3 partions: sda1 formatted in ext4 min. 6GB (This is for your os), sda2 formatted in swap 4-8GB and sda3 ext4 all the rest GB of your drive for your data storage (If you want no data storage on this drive, what i recommend, use all space instead for sda1). Please Format all other drives you want to use with your gnubee to ext4 too with the adapter also. We only doing this because we don't want that gnubee is booting from on of this drives because there is the drive name "gnubee_root" on one of them)

2. Connect the first drive you want to use for the os to the first slot 1. Connect all other drives that you want to use to Slot 2-5.

3. Download this image for libreCMC OS prepared for debian install:
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 (blue usb port) and push the on button (GB1: red button / GB2: Switch) (Only Power supply connected no 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.

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. (If your pc refuse the connection to system: Make sure there is no SD Card in your Gnubee and no drive connected with the name "gnubee-root")

8. Login in luci (username: root) without passwort, let this field blank and go to administration -> system-> backup and load this settings in: https://github.com/k3pler4ever/gnubee/raw/master/backup-libreCMC-2019-09-16.tar.gz 3 (Do not flash new OS, we talking only about the backup/settings you should load up). Press the upload button on the right site you can see your uploaded file.

9. After the reboot you can access ssh with terminal on your pc (Passwort is “gnubee”) with this code:


(if yu connected a device with the same ip before you must delete your fingerprint settings, console should show you how you can do this

10. Now type "fdisk -l" in the terminal. You will see your drives you created sda1 sda2 and if you made it sda3. 

"fdisk -l"

Device       Start       End   Sectors   Size Type
/dev/sda1  8390656 234441614 226050959 6G Linux filesystem
/dev/sda2     2048   8390655   8388608     4G Linux swap
(/dev/sda3  8390656 234441614 226050959 110G Linux filesystem)

10. Then you should be able to run the installer succesfully:
    Type this code:


sh debian-jessie-install

-> write in "/dev/sda1" and type "CONFIRM" wait until the progress is successfully completed.
Now you got Debian on your drive!
-> After install reboot with by typing this:

reboot

11. Go to the terminal of your router -> network devices and check for your new the gnubee device and the ip address of it (It is the device with gnubee hostname). Please write down your IP, you will need it later also.

Alternative / Optional:
Connect the USB-to-UART debug cable to the “headphone jack” of your gnubee and the pc if you use the orginal one. (You can also buy one that you can connect to the 3 Pins TXD RXD GND) 
Than use this code in a new terminal window:

screen /dev/ttyUSB0 57600

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

ip addr

After that:
Remove the USB-to-UART debug cable

12. Connect to your gnubee with the ip that we wrote down from the last point with terminal:
(Now you are connecting not over blue port direct to your pc, you will connect over your router, you need a pc that is connected to your router / same network). Connect to your gnubee again (IP Adress is only my example):


->Passwort should be now "GnuBee"

13. Then finish the jessie installation (Could be you must use a new router, or a switch because your gnubee get no stable internet connection, of course the ip adress will change also if you change router)


then:

vim debian-modules-install

add "--no-check-certificate" after "wget"
Let all other things like it is
save with pressing "esc" -> and entering ":wq" -> after that press enter

then:
sh debian-modules-install
(or "bash debian-modules-install" also works)

then

reboot

!!!(Skip Point 14 and go to Step 31 if you want only the fast Debian 8 & OMV 3 installion (Not Debian 9 & OMV4)!!!
14. Upgrade to stretch (Debian 9)

Reconnect with ssh again with the new IP again (In my case "ssh ro...@192.168.1.204") and type in:

vim /etc/apt/sources.list

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

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

-> Hit ESC-> type “:wq”

Then upgrade the packages:

apt update

then:

apt full-upgrade

-> change in the installtion process "localhost" to "gnubee"    
then:

apt autoremove

then:

reboot

15. Reconnect again to ssh with your Gnubee Ip. Install some preliminary packages and set up a non-root user (replace xxx below with your own username). Everything from here on should be done as this user unless explicitly stated otherwise. Rember the Passwort you must create in this section, you need it later.

apt-get install mdadm sudo 
then:
adduser xxx 
then:
adduser xxx users 
then:
adduser xxx sudo 
then:
su xxx 
then:
cd ~

16. 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 
then:
then:
cd openmediavault
then:
git checkout 6be37d09087957e86ee6f39dc4c30bb96f0a52cc
then:
cd deb/sources
then:
then:
cd ..

17. Build some support libraries

cd libjs-extjs6/
then:
debuild -b -uc -us
then:
cd ../php-pam/
then:
debuild -b -uc -us
then:
cd ..

18. Build OpenMediaVault

make install_build_tools
then:
make clean binary
then:
cd ..
then:
find . -name *.deb

19. Set up a local repository to install from and install OpenMediaVault

sudo mkdir /var/local/deb-repo
then:
sudo cp `find ./ -name *.deb` /var/local/deb-repo
then:
cd /var/local/deb-repo
then:
sudo bash -c 'dpkg-scanpackages . | gzip > Packages.gz'
then:
cd -

20. Add created local repo to Source List:

sudo vim /etc/apt/sources.list

-> Add "deb file:/var/local/deb-repo/ ./" and save it like before: press esc -> then “:wq” and enter)

21. Install Open Media Vault 4:

sudo apt-get update
then:
sudo apt-get install openmediavault  
    
22. Start OpenMediaVault

sudo omv-initsystem

(If you skipped steps before for OMV3, start here after you completed Point 31)
23. Point your web browser to the GnuBee (Type in the ip adress you wrote down) and you should log in to OpenMediaVault with the username "admin" and password "openmediavault".
(You can also write in the open terminal if you don't find the letter ;) : "sudo ifconfig|grep 192"

24. !!!DO NOT REBOOT OR SHUTDOWN!!! This is a real important part in this guide. If you do it wrong, you can start from beginning! 

Type in the terminal:
cat /etc/network/interfaces

What you will see is like this:

auto lo
iface lo inet loopback

auto eth0.1
iface eth0.1 inet static   
    address 192.168.1.1
    netmask 255.255.255.0  

auto eth0.2
iface eth0.2 inet dhcp

-> This is totally stupid because the auto static adress is 192.168.1.1. Normally with an SoC Systemfor example armbian os with the omv script in armbian-confg the settings will be made automatically right for you. 192.168.1.1 is most of the time the adress of your router. So with this settings your gnubee wont work and you can't connect it again. Your settings should look like this, we change it in the next point:

auto lo
iface lo inet loopback
iface lo inet6 loopback

# eth0.2 network interface
auto eth0.2
allow-hotplug eth0.2
iface eth0.2 inet dhcp
iface eth0.2 inet6 auto
    privext 2
    pre-up echo 1 > /proc/sys/net/ipv6/conf/$IFACE/autoconf
    pre-up echo 1 > /proc/sys/net/ipv6/conf/$IFACE/accept_ra
    pre-up echo 0 > /proc/sys/net/ipv6/conf/$IFACE/disable_ipv6

# eth0.1 network interface
auto eth0.1
allow-hotplug eth0.1
iface eth0.1 inet static
    address 192.168.1.203
    gateway 192.168.1.1
    netmask 255.255.255.0
    dns-nameservers 192.168.1.1
iface eth0.1 inet6 manual
    pre-down ip -6 addr flush dev $IFACE

25. -> Change IP Settings in Open Media Vault!

The Gnubee 1 got 2 Lan Ports: eth0.1 (blue port) and eth0.2 (black port).
The Gnubee 2 got 3 Lan Ports: eth0.1 (blue port), eth0.2 (black port) and eth0.3.

You can use this port like you want, but i recommend this settings:
1. One Port should be static, so you can use the ip adress from before forever (The port you chose for static will be the port you can connect your gnubee with your router for your home network)
2.One Port should be DHCP Auto so in theory you should get with it internet and can connect it to other devices with other ips, also direct to a pc)

The Static adress:
-> So in OpenMediaVault in your Browser go to "network->inferfaces".
Click add and chose the port you want to use for static, the connection port you want to go to your router 
(not eth0.0, eth0).
In my case i used eth0.1.
Write this settings in:
IP4 Method -> Static
Adress -> The Ip Adress from before (that you wrote down)
netmask -> 255.255.255.0
gateway -> The Ip of your router (You can find it also in the router inferface) 

IP6 Method -> Disabled

DNS-Server -> Again IP Adress of your Router
Set MU to 0

-> Safe settings!

DHCP Adress:
Click add and chose the port you didn't used before for DHCP, the connection you want to use for other connection stuff (not eth0.0, eth0 or the used port before).
In my case i used eth0.2.
Write this settings in:
IP4 Method -> DHCP

IP6 Method -> Auto

Set MU to 0

-> Safe too and apply all settings with the button in the big yellow field!

26: In your router set this ip adress with gnubees mac adresse (you can find it also in your router under ip4 devices) as static too. In dns settings of your router you can do this! And set leasetime to "infinite" Also write down the Ip Adress you set for gnubee and the mac adress  down on a paper. I mean save it! It is the access ticket to your OMV Device!

27. Reboot and be happy! Congratulations. Now you can shutdown or reboot your gnubee and it will allways go to this adress you was choosing before. After changing the IP adress in OMV it is possible that after you again open your gnubee website that you want to apply the settings again because of the yellow field. If you get an error after applying. Click on refuse and check if network settings are still the same. After this there should be no more error.
-> You can change this ip adress to an adress you like anytime! Only make sure that you change the ip adress for the gnubee under your static adresses in your router too after changing it in omv!

28. Now it is time to set up your gnubee. Change settings, set up Raid, make folders, create user, share folders with users. I won't explain this here, you can find a lot of tutorial in the web and it is allways the same :) Only keep in mind that sda1 is your OS and sda2 is your swap! Let it like it is!

29. Optional: Upgrading OpenMediaVault
New versions of OpenMediaVault come out all the time. To upgrade to the latest do the following steps. But it is not nessarsay so "Never update a perfect running system):

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

30. Optional (I Dont care): You can set language of debian in ssh also change hostname if you want in ssh (pr hostname in omv interface). Duckduckgo.com for tutorials :D

--------------------------------

31. Alternative fast OMV Install: Debian 8 with OMV3

Install OpenMediaVault:

Again in ssh use this 3 lines 
    
then:
chmod +x omv-jessie-install
then:
./omv-jessie-install

-> Continue with Point 23


penguinpages

unread,
Dec 9, 2021, 9:09:09 AM12/9/21
to GnuBee
This is a great article.

Just a few notes and questions

1) Can you clarify / clear up the step 24 about IP post.   "..Your settings should look like this, we change it in the next point:..."   this is a statement of what the deployment script SHOULD have done.. but not that you expect users to vi /etc/network/interfaces  to make it match the noted stanza.  I think your entire comment is just that many home networks 192.168.x.1   is there router.. and so would create IP conflict and so they would lose IP access.  This is a "user friendly guide" and I appreciate that... just wanting to be technically accurate. 
2) This design negates in any means the use of SD card. Your first drive bay will have to be for OS. 
3) Serial UAT port access, especially for boot /fsck  or network issues etc..  This out of band access is very important and I think is required.  Most debian guides for this refer to steps like below... but I am missing where grub is and associated kenel modifications to at very basic console spawn console to /dev/ttyS0
     a)  modification of /etc/default/grub   to add lines: << /boot empt  /room ... not sure.. poked around and nothing clear
        # Tell the kernel to use a serial console.
GRUB_CMDLINE_LINUX_DEFAULT="console=ttyS0,115200n8 console=tty0" GRUB_CMDLINE_LINUX="" # Tell grub to offer its own UI over the serial line GRUB_TERMINAL="console serial" GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"
    
          # Run update of grub
          update-grub
          systemctl enable serial...@ttyS0.service
          systemctl start serial...@ttyS0.service

          # Test via remote host connected with serial cable. Ex: The device for that host is /dev/ttyUSB0
          screen /dev/ttyUSB0 57600
           <<<<<<<<<<<Broken>>>>>>>>>>>>>>


Thanks for detail posting.. It really did help.  Just a few paths taken less traveled... and should not have been.. and that made all the difference.

penguinpages

unread,
Dec 9, 2021, 9:28:43 AM12/9/21
to GnuBee
Side Posting:  Wanted to split this out.

I purchased six drives for use as data drives for what I need....  so to loose an entire drive for OS is rather inconvenient.

Is there a thread of how to re-activate sd card.. and move back to using that.

1) I am not clear if this means the updated drivers / compilation should "fix this ... so this is no longer a set of steps needed"
2) How to fix this if there are steps to accomplish this
3) How to transfer installation back to the SD.  I have things installed on /dev/sda1 ..  I could match SD card partitions etc..  .. copy data over.. but how to change boot path for this kind of ROM system I am not sure.
4) When I run "apt-update"  "apt-upgrade"  and there is a new kernel version..  What steps would I have to do to make sure the initrd / kernel has required modules (this goes to previous posting about no /etc/default/grub  (or similar file that I could find)

Thanks

penguinpages

unread,
Dec 9, 2021, 2:24:59 PM12/9/21
to GnuBee
<<< update on serial console>>>

User error..
Root Cause : Helps if you plug it in (all the way)

I keep unplugging the serial console because until I do that, the unit will not boot.. <led lights blink very dull is symptom>. Once I do that, the system starts booting.   I think this is related to power brick I have is 1.5amp (waiting for new 3.5 amp brick to show up as one on GnuBee was out of stock for weeks and with only one hard drive figured this would be fine.... will revisit this once I get things in)

As a side note.  I plugged the serial cable into my raspberry pi and per deployment guide use "screen /dev/ttyUSB0 57600"  and console / line wrap is weird:  Never used screen before to tweek it to use correct line wrapping

Question: 
1) is there a screen setting you pass to enable the line wrap or console return

## Example Garbage on console:
enmediavault -1 (Arraks pandorodtio the uhwrolv-firstaid' CLI
command.

o0r more information regardig this appliance, pl
CoTheile All rights reserved

hee 'aisoeaor this account
oemdo tthe openmediavault web control panel:

No neiands 'iasaring this appliance, please visit the
web site: http://ww.
as                  pna ln: root
in inorrectnPassw
Paw
Lootn:admin
P
Linuxpandora 4.4.8MP d Nov 22 13:06:3 17 mips

The programs included with the DebianUf G ABmitted by applicable la.
amn@a
admin@andora:~$
admin@adora:
adin@pandora:~$
admin@pandora:sudo su

We tived grety.
a.do] password for admin:


adnd:rooti
[udoudoh | -K  | in@pandora:~$ sudo reboot
as not in thesdoers file. Ths incidet will be reported.
admin@pandora:~$
admi@sudo reboot
Sorry, try again.
pasdo] password for admin:
ctpwdtpt
a:~a:~$
dmin@ndora:~$ reboot
-bsn@panda:GnuBee
-asad~$ clea
hlunclear
~$ clea
dora~
amin@

#####
On Thursday, December 9, 2021 at 9:09:09 AM UTC-5 penguinpages wrote:

penguinpages

unread,
Dec 9, 2021, 2:29:07 PM12/9/21
to GnuBee
I forgot to note... TTY output console issues are within the OS / debian.. NOT during boot

[  23..5241] ssknsystemd[1]:LVMdaa deon  343steeDipetso Consirectory ]:-madaemon FOsF ctl Copa2m  OK  ] Listening on /dev/initctl Compatibility Name Pipe.
 e ser and Session ce. EnptedVoles.
[   23.89398] systemd1]: Listning o Journl Socket dev/lg).
[  OK  ] Listenin on ournal Socket (/dev/log).
[ eated slice System Slice.
[ slice System Slice.
[ ]: Mounting POSIX Message Queue File System 225627 06380systemd[1]: Starting      Staringurnal Service...
 NFSD configuratio
                   [0m] Reached target ong Debug File System...
[   tarng Createst ofreird st…ce node for the c..  24.746MoutedRPC Pipe File System.
[   4  4.889264] systemd[1]: Mounted Debu 2419775] systemd[1]: Started Journal Service32  O   Started FilSystem Check on Root Device 32m K  0m] Started LVM2 l  ted Apply Kel Variables.
0;32m  OK  ] Started pNFS block layout mappng daemon.
[  OK ] Stated Create Static Device 0;32m  OK  ernel Device Manager.
[nt Roo  ting ude      v.trting nhm[ Rec flusruntmejurnal from PID 1
 o      Starting Preprocess NFS confur.taronk. Cleanup monit state file...
[coate U      Star RPC 0;32m  OK] Re Tichronzed.
[  OK  ] Reached tC bind portmap service.
[e3
     OK [0m] Stta [ Rc2m  OK  [0m] Rached taOK0m] StPI;3m  chrgt Paths.
[0m]     0;m  OK  ] Sarefer eecution heduler.
     Startin cotrol0m] Started ACPI event daem  OK  tarted Syst]rnfuKtiK  Created slice system-getty.slc[[   tretork0d        Starting Generate the prelogin message...
    [See'sstemctsase      Starting 0-secon gracpeiod (net 806  [O  0[; K 32m  OK   m  O;.
2 e[0234.penmetails.Kra; ul                                                              [[B: Load enl modulesneededt enble cpufq saig

No network interface(s) available

By default web password for this account
mdthin the web control panel or usin'oitCI

enmediavault 4.0.20-1 (Arrakis) pandora tty
                                           Copyright (C) 2009-201by Volker Theie. All rights reerved.

To manage the system visit the openmediavault web control panel:

No network interface(s) available

pnmediile. All rghtToa thecontroavailablerator account
eeu.200-2018 by Volker Theile. All rights reserved.

To manage theyyed that you change the password for this account
within the web si
con
ult.org

pan
Pasd

##

Note how line wraping breaks and console response messes up once the os is loaded and shell listener goes live on the ttyS0 port

Neil Brown

unread,
Dec 21, 2021, 7:54:23 PM12/21/21
to GnuBee
I'm not sure if this is helpful, but they easiest way to get make the SD card work on old 4.4 kernels is to compile with CONFIG_HIGHMEM=n.  This will reduce the amount of usable memory a little, but avoids the bug in the sd card driver.
Reply all
Reply to author
Forward
0 new messages