[Guide] How to install OpenMediaVault 1.0.32 from scratch

Discussion in 'Other OS' started by killkrt, Nov 16, 2014.

  1. killkrt

    killkrt New Member

    Joined:
    Nov 1, 2013
    Messages:
    22
    Likes Received:
    0
    Hi,

    I've finally prepared a guide to setup OpenMediaVault 1.0.32 on UDOO Quad.
    This is the procedure that I followed.

    Prerequisites

    • An SD card (2GB or larger)
      Debian/Ubuntu based OS (I've used Linux Mint)

    Procedure
    Insert your SD card in your PC. Open a shell and log as root:
    Code:
    su
    
    Then go to the root home folder
    Code:
    cd
    
    Now update and install the needed packages for this procedure:
    Code:
    apt-get update
    apt-get upgrade
    apt-get install binfmt-support qemu-user-static debootstrap
    
    Now check where your SD card is mapped
    Code:
    fdisk -l
    
    You should find your SD card with a name like /dev/sdX (in my case it is /dev/sdb). From now on I will refer to the SD card as /dev/sdX (in your system this path could differ). Please consider that we are going to wipe the entire content of this disk, so be sure that you're pointing to the right device and you've already made a backup of its content.
    In case your system automatically mount the SD card we have to un-mount it:
    Code:
    umount /dev/sdX1
    The previous command could fail if your SD card has not been mounted automatically by your system, the important thing is that /dev/sdX is pointing correctly to your SD card and is not mounted in your file system
    Now we have to wipe the entire filesystem and create a new partition, we will use fdisk:
    Code:
    fdisk /dev/sdX
    Delete all partitions using the command
    Code:
    d
    as the partition table is empty (use command p to check the partition table) you can create a new partition with:
    Code:
    n
    Then select a primary partition with:
    Code:
    p
    And 1 as ID:
    Code:
    1
    To be sure to have enough space for U-Boot image let the partition start at 16025, so choose as start:
    Code:
    16025
    I noticed that using 16GB card this value could create some problem, but honestly I don't know why. I used a 8GByte SD card (class 6)
    Partition end is automatically suggested so you can press [ENTER]
    Now you can write your partition table with the following command:
    Code:
    w
    Now format your SDCard with EXT4 filesystem:
    Code:
    mkfs.ext4 /dev/sdX1
    Before mounting your partition check if the folder /mnt exists and it is empty. So mount it on /mnt using:
    Code:
    mount /dev/sdX1 /mnt
    Download the U-Boot image with (for UDOO Europe version):
    Code:
    wget http://download.udoo.org/files/UDOO_Unico/u-Boot_Quad/u-boot-q.imx
    While if you have an US UDOO you have to use this link:
    Code:
    wget http://udoo.org/download/files/UDOO_Unico/u-Boot_Quad/u-boot-q.imx
    And then write it to the SDCard
    Code:
    dd if=u-boot-q.imx of=/dev/sdX bs=512 seek=2
    Now create a new folder where we will temporally put our packages. Please be sure that “debian” folder is not already existing in your home folder.
    Code:
    mkdir ~/debian
    Download basic package:
    Code:
    debootstrap --foreign --arch=armhf wheezy ~/debian
    Copy the QEMU file:
    Code:
    cp /usr/bin/qemu-arm-static ~/debian/usr/bin/
    Install all basic packages in debian folders:
    Code:
    chroot ~/debian /debootstrap/debootstrap --second-stage
    Download Kernel image (if you have an Europe version):
    Code:
    wget http://download.udoo.org/files/UDOO_Unico/Kernel/uImage
    While if you have an US UDOO you have to use this link:
    Code:
    wget http://udoo.org/download/files/UDOO_Unico/Kernel/uImage
    And copy it to the boot folder:
    Code:
    cp uImage ~/debian/boot
    Download modules (if you have an Europe version):
    Code:
    wget http://download.udoo.org/files/UDOO_Unico/Kernel/modules.tar.gz
    While if you have an US UDOO you have to use this link:
    Code:
    wget http://udoo.org/download/files/UDOO_Unico/Kernel/modules.tar.gz
    And extract them to our folder:
    Code:
    cd  ~/debian
    tar xzf ~/modules.tar.gz
    From now on our root folder will be the “debian” folder
    Code:
    chroot ~/debian
    Add new lines for the ethernet interface (if your using Wi-Fi you have to make a little change to it, but I suggest if it is possible to use ethernet at least for the first boot):
    Code:
    nano /etc/network/interfaces 
    Add following lines to the exisiting:
    Code:
    auto eth0
    iface eth0 inet dhcp
    Save and exit using CTRL+X
    Add package repository:
    Code:
    nano /etc/apt/sources.list
    Add this line:
    Code:
    deb http://ftp.uk.debian.org/debian/ wheezy main
    Save and exit using CTRL+X
    Now update APT repositories:
    Code:
    apt-get update
    Install SSH and other basic stuff:
    Code:
    apt-get install openssh-server bash-completion locales
    Set your root password (please take note of it!)
    Code:
    passwd
    Exit from chroot with:
    Code:
    exit
    Copy everything you have installed on your SDc ard:
    Code:
    cd ~/debian/
    cp -rp * /mnt
    sync
    
    Now you can un-mount your SDCard
    Code:
    umount /dev/sdbX
    exit
    
    Remove your SD card (if you’re using a VM please assure that your host OS has completely un-mounted the SD card, in case unmount also from it)

    Now put your SD card in your UDOO and be sure is connected to your home network (so ethernet connection is the simplest way) boot it and wait at least 30 seconds, from a PC connected to the same network open a SSH session using the UDOO IP address and log as root and put the password that you have entered some step above:
    Code:
    ssh root@UDOO_IP
    Where UDOO_IP is the IP address of your UDOO.
    Once the SSH shell is opened add locales export to your bashrc:
    Code:
    nano .bashrc
    Add the following lines at the end of the file:
    Code:
    export LC_ALL=en_US.UTF-8
    export LANG=en_US.UTF-8
    export LANGUAGE=en_US.UTF-8
    Save and exit with CTRL+X, then update (when the selection menu will pop-up please select en_US.UTF-8 and deselect everything else):
    Code:
    locale-gen en_US.UTF-8
    dpkg-reconfigure locales
    source .bashrc
    
    Now add repository for OMV
    Code:
    echo "deb http://packages.openmediavault.org/public kralizec main" > /etc/apt/sources.list.d/openmediavault.list
    Add key for Kralizec repository (thank to @calmyabadselfdown):
    Code:
    apt-key adv --keyserver http://packages.openmediavault.org/public/archive.key --recv-keys 7E7A6C592EF35D13
    And add our hostname
    Code:
    echo "127.0.0.1" $HOSTNAME.localdomain $HOSTNAME >> /etc/hosts
    Update packages definition:
    Code:
    apt-get update
    Install OVM stuff:
    Code:
    apt-get install openmediavault-keyring postfix
    Answer to questions that will pop-up
    Now update definitions again:
    Code:
    apt-get update
    And install OVM:
    Code:
    apt-get install openmediavault
    If everything has work correctly you should not get any error during the previous installation. You have to add again this line at the end of /etc/hosts (after OVM installation it will be probably deleted)
    Code:
    echo "127.0.0.1" $HOSTNAME.localdomain $HOSTNAME >> /etc/hosts
    Then configure OVM:
    Code:
    omv-initsystem
    You should get no error and so now you can reboot:
    Code:
    reboot
    Now SSH server is disabled on your UDOO, but you can re-enable it using the OVM WebGUI. Connect to your UDOO via web browser (you have to enter your UDOO_IP in your URL bar in your browser) and log as admin:
    Code:
    user: admin
    password: openmediavault
    Go to Services->SSH and select Enable, then Save and confirm with Apply in order to have an SSH connection.
    If you want extra plug-in, connect via SSH as before and digit the following commands:
    Code:
    echo "deb http://packages.omv-extras.org/debian/ kralizec main" >> /etc/apt/sources.list.d/omv-extras-org-kralizec.list
    apt-get update
    apt-get install openmediavault-omvextrasorg
    apt-get update
    
    That's all! :D

    P.S.:
    I made this procedure using Linux Mint in a Parallels 9 VM (on Mac OS X 10.10), I have noticed that using Virtual Box VM under OS X 10.10 I got a lot of errors while trying to format the SD card. I have also noticed that using a 16GByte SD card the procedure doesn't work, the system doesn't start, I don't know why, since I follow the same procedure (I've prepared my debian folder and then write in both SD cards).
     
  2. delba

    delba Administrator Staff Member

    Joined:
    May 8, 2013
    Messages:
    1,064
    Likes Received:
    9
    Re: [Guide] How to install OpenMediaVault 1.0.32 from scratc

    WTF This is just awesome!!!!!!!! :O
     
  3. calmyabadselfdown

    calmyabadselfdown New Member

    Joined:
    Aug 17, 2014
    Messages:
    3
    Likes Received:
    0
    Re: [Guide] How to install OpenMediaVault 1.0.32 from scratc

    many thanks for this works great

    The only extra bit I had to do was I got an error after adding the kralizec main to the sources when doing the apt-get update.
    it moaned about a missing key.
    if you do get this error type :-

    sudo apt-key adv --keyserver http://packages.openmediavault.org/public/archive.key --recv-keys 7E7A6C592EF35D13

    fixed the problem for me and the rest of the install had no further issues
     
  4. killkrt

    killkrt New Member

    Joined:
    Nov 1, 2013
    Messages:
    22
    Likes Received:
    0
    Re: [Guide] How to install OpenMediaVault 1.0.32 from scratc

    Thank you @calmyabadselfdown, I've updated my guide with your suggestion!
     
  5. BalBenoit

    BalBenoit New Member

    Joined:
    Apr 12, 2014
    Messages:
    2
    Likes Received:
    0
    Re: [Guide] How to install OpenMediaVault 1.0.32 from scratc

    Many thanks for this guide! Would it work for UDOO Dual as well?
     
  6. BalBenoit

    BalBenoit New Member

    Joined:
    Apr 12, 2014
    Messages:
    2
    Likes Received:
    0
    Seems to work on dual as well, but haven't managed to get NFS or owncloud working yet.
     
  7. crieke

    crieke New Member

    Joined:
    Feb 5, 2015
    Messages:
    2
    Likes Received:
    1
    Thank you for this easy guide. One thing is still unclear to me: Where is the difference between the European and US UDOO? Is it hardware related and how can I identify my model?
     
  8. delba

    delba Administrator Staff Member

    Joined:
    May 8, 2013
    Messages:
    1,064
    Likes Received:
    9
    Re: [Guide] How to install OpenMediaVault 1.0.32 from scratc

    There's no difference between US and European UDOO. I believe killkrt was talking about the download speed: "download.udoo.org" for a faster download in europe," udoo.org/download" for the US.
     

Share This Page