├── LICENSE ├── README.md └── omv-rpi-install.sh /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 steigerbalett 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OpenMediaVault-Installation 2 | Installscript for OMV on RaspberryPi 3 | (with Raspian 9 lite) install: 4 | 5 | 6 | cd /tmp 7 | 8 | wget https://raw.githubusercontent.com/steigerbalett/OpenMediaVault-Installation/master/omv-rpi-install.sh 9 | 10 | sudo bash omv-rpi-install.sh 11 | 12 | ################## 13 | 14 | After installation & reboot you have to access your OMV thru a browser http://x.x.x.x 15 | User: admin 16 | Password: openmediavault 17 | 18 | ################# 19 | 20 | Beware: The installation will disable ssh for user pi. You have to reactivate it thru the OMV webfrontend: 21 | Acces Rights Management -> Users -> Edit -> Groups -> tick the ssh box! Save -> Apply -> Yes 22 | 23 | ######## 24 | 25 | If you installed OMV-Extras: 26 | Disable backport Repos: 27 | System -> OMV-Extras -> Backports -> tick the red button Disable Backports 28 | 29 | ######## 30 | 31 | sources: 32 | 33 | https://openmediavault.readthedocs.io/en/latest/installation/on_debian.html 34 | 35 | https://forum.openmediavault.org/index.php/Thread/2140-Install-OMV-1-0-on-Debian-6-or-7-Squeeze-Wheezy-via-apt/ 36 | 37 | https://forum.openmediavault.org/index.php/Thread/5549-OMV-Extras-org-Plugin/ 38 | 39 | https://forum.armbian.com/topic/9044-openmediavault-from-softys-omv-keyring/ 40 | -------------------------------------------------------------------------------- /omv-rpi-install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #License 4 | clear 5 | echo 'MIT License' 6 | echo '' 7 | echo 'Copyright (c) 2019 steigerbalett' 8 | echo '' 9 | echo 'Permission is hereby granted, free of charge, to any person obtaining a copy 10 | of this software and associated documentation files (the "Software"), to deal 11 | in the Software without restriction, including without limitation the rights 12 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | copies of the Software, and to permit persons to whom the Software is 14 | furnished to do so, subject to the following conditions:' 15 | echo '' 16 | echo 'The above copyright notice and this permission notice shall be included in all 17 | copies or substantial portions of the Software.' 18 | echo '' 19 | echo 'THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 25 | SOFTWARE.' 26 | echo '' 27 | echo 'Installation will continue in 3 seconds...' 28 | sleep 3 29 | 30 | #Prerequisites 31 | clear 32 | echo Prerequisites: Checking if you are running as root... 33 | idinfo=$(id -u) 34 | if [[ idinfo -eq 0 ]] 35 | then 36 | echo 'You are running as root! :-)' 37 | else 38 | echo 'You are not running as root :-(' 39 | echo 'This script has to run in SUDO mode to run smoothly!' 40 | exit 41 | fi 42 | 43 | #Checking Memory Requirements 44 | clear 45 | echo 'Step 1: Checking minimum system memory requirements...' 46 | memtotal=$(cat /proc/meminfo | grep MemTotal | grep -o '[0-9]*') 47 | swaptotal=$(cat /proc/meminfo | grep SwapTotal | grep -o '[0-9]*') 48 | echo Your total system memory is $memtotal 49 | echo Your total system swap is $swaptotal 50 | totalmem=$(($memtotal + $swaptotal)) 51 | echo Your effective total system memory is $totalmem 52 | 53 | if [[ $totalmem -lt 900000 ]] 54 | then 55 | echo You have insufficient memory to run OpenMediaVault, minimum 1 GB 56 | echo -n 'Do you want to create a 1 G swap file? [Y/n] ' 57 | read swapfiledecision 58 | if [[ $swapfiledecision =~ (Y|y) ]] 59 | then 60 | echo 'Creating 1 G swap file...' 61 | sudo fallocate -l 1G /swapfile 62 | sudo chmod 600 /swapfile 63 | sudo mkswap /swapfile 64 | sudo swapon /swapfile 65 | sudo cp /etc/fstab /etc/fstab.bak 66 | echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab > /dev/null 67 | echo '1 G swap file successfully created!' 68 | elif [[ $swapfiledecision =~ (n) ]] 69 | then 70 | echo No swap file was created! 71 | echo Insufficient memory to run OpenMediaVault 72 | echo Exiting... 73 | exit 74 | else 75 | echo Input error! 76 | echo No swap file was created! 77 | echo Please start again 78 | echo Exiting... 79 | exit 80 | fi 81 | else 82 | echo 'You have enough memory to meet the requirements! :-)' 83 | fi 84 | 85 | 86 | #Option to generate new SSH Key 87 | echo 'Step 2: Generate new SSH Key' 88 | echo -n 'Do you want generate a new SSH Key? [Y/n] ' 89 | read sshdecision 90 | 91 | if [[ $sshdecision =~ (Y|y) ]] 92 | then 93 | sudo rm /etc/ssh/ssh_host_* 94 | sudo dpkg-reconfigure openssh-server 95 | echo 'done' 96 | elif [[ $sshdecision =~ (n) ]] 97 | then 98 | echo 'No modifications was made' 99 | else 100 | echo 'Invalid input!' 101 | fi 102 | 103 | # Adding OpenMediaVault to the repository 104 | echo 'Step 1: Adding OpenMediaVault to the repository' 105 | echo '' 106 | cd /tmp 107 | #wget http://packages.openmediavault.org/public/pool/main/o/openmediavault-keyring/openmediavault-keyring_1.0_all.deb 108 | #sudo dpkg -i openmediavault-keyring_1.0_all.deb 109 | #cd .. 110 | # Alternatives 111 | sudo wget -O - http://packages.openmediavault.org/public/archive.key | sudo apt-key add - 112 | #sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 7E7A6C592EF35D13 24863F0C716B980B 113 | echo "deb http://packages.openmediavault.org/public arrakis main" > /etc/apt/sources.list.d/openmediavault.list 114 | # Alternatives 115 | #echo "deb http://downloads.sourceforge.net/project/openmediavault/packages arrakis main" > /etc/apt/sources.list.d/openmediavault.list 116 | 117 | #Installing OpenMediaVault 118 | echo Step 2: Installing OpenMediaVault... 119 | sudo apt update && sudo apt full-upgrade -y 120 | sudo apt install dirmngr 121 | sudo apt install ntfs-3g hdparm hfsutils hfsprogs exfat-fuse -y 122 | sudo apt update 123 | sudo apt install openmediavault-keyring postfix -y 124 | sudo apt update 125 | sudo apt install openmediavault -y 126 | 127 | # check for dependencies 128 | sudo apt --fix-broken install -y 129 | 130 | # Initialize the system and database. 131 | omv-initsystem 132 | 133 | # Install Extras 134 | echo -n 'Do you want install OMV Extras? [Y/n] ' 135 | read extrasdecision 136 | 137 | if [[ $extrasdecision =~ (Y|y) ]] 138 | then 139 | sudo wget -O - http://omv-extras.org/install | bash 140 | echo 'done' 141 | elif [[ $extrasdecision =~ (n) ]] 142 | then 143 | echo 'No modifications was made' 144 | else 145 | echo 'Invalid input!' 146 | fi 147 | 148 | # Config autostart of OMV 149 | echo 'Step 5: enable autostart' 150 | sudo systemctl enable openmediavault 151 | sudo systemctl start openmediavault 152 | 153 | echo 'OpenMediaVault has been installed & modified to your preference (if any)!' 154 | echo 'Share this with others if this script has helped you!' 155 | echo 'After reboot you can login to OMV thru a browser with' 156 | echo 'User: admin' 157 | echo 'Password: openmediavault' 158 | echo 'reboot the RaspberryPi now with: sudo reboot now' 159 | exit 160 | --------------------------------------------------------------------------------