Shop OBEX P1 Docs P2 Docs Learn Events
Low power Debian file server over Wifi -- Cubieboard1 and a 128Gb SSD — Parallax Forums

Low power Debian file server over Wifi -- Cubieboard1 and a 128Gb SSD

LoopyBytelooseLoopyByteloose Posts: 12,537
edited 2015-11-20 17:20 in General Discussion
I went window shopping today for a Gigabyte BRIX in Taiwan, but couldn't find one. Nonetheless, the shops did have a huge selection of SSD devices, so I picked up one for my Cubieboard21 which hasn't been pressed into active use.

I am considering making it a Debian Linux file server, and only available locally via wifi. Rather than re-firewalling the router and Samba to assure security, I am thinking I can just use wifi security and keep the server local.

Any suggestions pro or con on my security choices?
«13

Comments

  • Heater.Heater. Posts: 21,230
    edited 2015-11-19 09:25
    Depends how secure you want to be.

    For most of my junk I would just rely on WPA2-PSK or whatever the latest recommendation is.

    Then employ the usual SAMBA security practices. Like host and user protection https://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/securing-samba.html

  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2015-11-19 09:36
    This is looking useful for all the very personal and extremely private stuff - like my annual income tax files. I can always just keep the server off when not required.

    The SSD is only 65 watts of power, the Cubieboard2 is equally low power - so it is optimal for a 24/7 server application. I just don't have the need for that.

    With the audio built in to the Cubieboard2, it could have just as easily become an audio jukebox. I even have the IR interface for a remote control device. Hmmm... I just might change my mind about what I want to build. The tax stuff can go an a USBstick... it doesn't really need a server.
  • Heater.Heater. Posts: 21,230
    I do hope you mean 6.5 Watts !!
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2015-11-19 11:05
    Well, I thought the document in the box said 65 watts and I can't get to it right now; and mechanical hard disks do run much higher... maybe 150 watts or often more. It is a Transcend SSD370 Sata3.0. I have a photo that shows the lable and that lools like 5VD and 1.5Amps. 7.5 watts would be wonderful. A typo perhaps....

    In any event, I will try to get the Debian file server software loaded and running and go from there.
  • Heater.Heater. Posts: 21,230
    edited 2015-11-19 13:40
    Loopy,

    150 Watts! What century are you living in? A hard drive has not consumed that much power since they looked like this:

    102649110.lg_.jpg

    It's an order of magnitude less than 150 Watts. I have a bunch of drives here that claim about 7Watts is required. And they are pretty old desktop jobs. I bet a laptop hard drive is even less.

    SSD's are two orders of magnitude down from your figure. My Samsung EVO consumes a max of about 1.5 watts

    When the EVO is resting it's down to 25 milli Watts ! That's nearly 4 orders of magnitude less than 150 watts!!

    Don't you love this "order of magnitude" thing ?
  • I'm sure it's just a typo. The 120 GB Kingston SSDs I bought when I got the Brix are rated 5 watts. As comparison, I have on the shelf a Western Digital Raptor which was a screaming fast (for 2007) spinning disk drive that runs at 10,000 rpm, and it's rated for less than 15 watts.
  • Heater. wrote: »

    Don't you love this "order of magnitude" thing ?

    It's at least an order of magnitude easier than citing actual numbers!! :)
  • In any event, the new SSD was $1499.00 NTD or a bit less than $45.00 USD at today's rate of exchange. Over-the-counter, no shipping, and sales tax included.

    If this one works out, I may never buy another mechanical hard disk again.

    I did take a look at Seagate Barracude 7200.7 @ 200 GBytes and certainly seems to require less than 8 watts (5VDC @ 0.75amps; 12VDC @ 0.36 amps). Looking back into the paperwork of the new SSD, I can't find where I read or thought I read 65 watts.

    The nicest thing about the SSD are that it boots really fast, and I don't have to worry about it being bumped while running.
  • Spent the afternoon powering up the Cubieboard. It comes up nicely in Android4.0.4, but I have forgotten a great deal about it.

    I had to go shopping again for a SATA cable with power. And I picked up a little 5amp 5VDC switcher to adequately power all that I might attach to this.

    I thought I had a Cubieboard2, but it is now obvious that I have the original Cubieboard1.

    So having spent a bit of bench time with it, I now have to go back to reading up on how to get Debian to boot. Android currently won't recognize my SSD or the USB Wifi.
  • Heater.Heater. Posts: 21,230
    Yep, after all the years of cobbling parts into PC's, RAM upgrades, processor upgrades, coprocessor upgrades (back in the day), GPU upgrades, etc, etc the SSD had the most dramatic effect of any of them by a long way. Much faster to boot and do pretty much any day to day task, no whining noise, and lower power is a bonus. All my machines have SSD now.

  • ...don't have to worry about it being bumped while running.

    I'm actually beginning to think this is one of an SSD's biggest advantages. I've always used WD Raptors for boot drives though, so I'm somewhat used to fast disks.

  • Heater.Heater. Posts: 21,230
    I bet those Raptors are painfully slow by comparison to any SSD.
  • Probably an order of magnitude slower.



  • Heater.Heater. Posts: 21,230
    :)
  • Well, while youall are out ordering your magnitudes, I did manage to locate the information for installing a Debian file server with wifi on the Cubieboard1. And it seems that there is a shell script that migrates the Root to the SSD.

    Considering the small mass of the actual computer, having a SSD to avoid bumping is a very important issue. But they boot and run faster as well.

    My EEEpc 701/4G had a 4Gybe SSD and even at that small size it was very impressive in Linux. Plus, the SSD proved itself when the notebook was dropped hard on concrete. It happened twice due to falling out of a backpack, and once went bounding down a flight of concrete stairs. Neither drop did any serious damage.
  • If this one works out, I may never buy another mechanical hard disk again.

    I just read that if you have anything important, you really need to back it up to cassette tape.

    Of course, this was a back issue of Byte magazine from last century.

  • Funny that. In my case it would have been to back it up to either a batch of zip disks, or a bundle of streamers. Also tape.
  • Well, anything really important in my world is backed up on paper and put away in a file box. I just considered that the digital versions needed to be more secure. As it now stands, the files have beem relocated all to a USBstick that can't be hacked into from afar.

    Meanwhile, I am still working on getting my Cubieboard1 with SSD and wifi operational as an interesting project. Prior efforts with this Cubieboard have it booting in Android and I am working through how to change that over to Cubian, a Debian version of Linux for the Cubian which supports the Samba File server, headless operation, and wifi interface.

    I still may deploy the device as a digital jukebox... in addition to being a file server. Linux has long had a well documented digital jukebox project and the fact that I have an IR remote interface, very low stand-by power, and a small foot print make this attractive to me.

    In the process of getting up and running, I discovered that the Cubieboard uses "Das U-Boot", which happens to be the same booting application that Open-Wrt uses. So I am reading up on it for projects in both contexts.

    Cubieboard support has matured and that makes it easier to get going. Previously I had one of their first boards and rather cryptic support for how to get started. There is a new application called Cubiez.

    At this point, it seems that I may not have to compile anything from binaries. I might just get by with installing a pre-compiled binary to a micro SDcard and then having it install the Root file system to the SSD.

    I am just wondering if I need to remove the Andriod 4.0.4 or if it can exist as an alternative boot.

    I am still working on my MR-3020 in Open-Wrt that has similar challenges, and also offers another Wifi interface.

  • Cluso99Cluso99 Posts: 18,069
    I have a MXQ quad core S805 ARM A5 1.5GHz with Mali-450 GPU running Android 4.4 IIRC. It's meant to be a TV box but with 4 USB ports, SD, HDMI, Ethernet and wifi, and ~$30 shipped, it should make a nice general use box.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2015-11-22 16:29
    Hi Cluso,
    Yes, the Cubieboards were derived from boards designed for a TV box that was supposed to have Android with a LAN access to the internet.

    In fact, mine is currently set up for that. It was also the easiest way to get started.

    A change over can be done in three ways.
    1. A mini SDcard with a bootable Linux OS to replace the Android
    2. Re-flash the NAND memory with a Linux OS binary
    3. Provide a SATA hard disk to boot Linux OS

    Much depends on what hardware you have and what you are really trying to do.

    It looks as though I have to have the 3.3v ttl serial port active to get a boot from an SDcard, and then I can have the image on the SDcard revise the NAND and/or provide a SATA hard disk boot. (Or there is an alternative USB port that will load a binary to NAND directly from Windows or Linux which has a special load button -- but you have to compile the binaries for that approach.)

    There isn't one comprehensive document explaining the pros and cons of each and pointing to the links that are required. In fact, I am getting quite a few broken links. So I am going back and forth with exploring one alternative then another.

    I have pretty much settled on the Cubian Linux as I don't have to compile anything. Just load it to a mini-SDcard and boot. Then I can migrate where it boots from.

    But for you, you may have to set up a cross-compiler tool chain, compile and load. It is a more tedious process.

    I absolutely HATE the HDMI video interface as I only have VGAs in my house. I doubt if I will ever buy and HDMI TV. So I had to spend about $25USD on a good HDMI to VGA converter.

    Good luck on finding a tool chain to hack your TV box. It can be quite a challenge to locate. At least the Cubieboards make that part a bit easier.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2015-11-22 16:30
    Here is the digital jukebox Wiki for Cubieboard. (There is another one -elsewhere on the net - for any Linux box)
    http://docs.cubieboard.org/tutorials/cb1/customization/wireless_music_box

    And Cluso..
    If you are using Sunxi chips... (I really don't know where your MXQ Quad core fits in - these are all Allwinner SoC Arm chips. You might just have a nice Android TV box that won't load Linux.).
    http://linux-sunxi.org/Main_Page
    There is a lot of TV boxes listed with hacking advice.
  • Cluso99Cluso99 Posts: 18,069
    Loopy,
    The S805 is an Amlogic ARM chip with the MALI-450 GPU.

    Since it is so cheap and compact, and has all the nice peripherals, I am waiting for it to be hacked for other work. Maybe OpenWRRT ???
    Comes with 2GB & 32GB so its not a tiny router.

    BTW my version has an AV out too :) Apparently there are two variants of the MXQ.
  • I have SSDs on all my RPi boards. $4/ea. ;)
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2015-11-23 09:01
    Cluso99 wrote: »
    Loopy,
    The S805 is an Amlogic ARM chip with the MALI-450 GPU.

    Since it is so cheap and compact, and has all the nice peripherals, I am waiting for it to be hacked for other work. Maybe OpenWRRT ???
    Comes with 2GB & 32GB so its not a tiny router.

    BTW my version has an AV out too :) Apparently there are two variants of the MXQ.

    About all I can find is that the Chinese sell a Linux pre-loaded version called "OpenElec".
    Sunxi has been extremely popular in low-end Android devices and the Linux-Sunxi provides good support to hacking these... even though it is unsupported by Sunxi.

    So the real question here is typical of Linux. What DIY support is there for the Amlogic ARM products? You might wait a long time for someone to do something.

    Or something may be already in the works...
    http://openlinux.amlogic.com/wiki/index.php/Arm

    ++++++
    I got into the Cubieboard1 a bit to early for my skill set at that time. So I kept my board and backed off for quite awhile. Now the community has matured and offers an easier entry point for a new user. Amlogic just has to go through the same cycle of growing pains.

    It does seem like the link for Amlogic in OpenLinux does indeed provide enough to get just about any popular Linux compiled. You may have to add 'Das U-Boot' to the tools. And then figure out a good plan and memory map for flashing binaries to your device. (That is a challenge I am not quite ready for.)

    Presently, it seems OpenWrt only provides a HOWTO for a headless server verision. OpenElec is not sharing what they did, at least not in English... maybe in Chinese.

  • So where am I with my own Cubieboard1?

    Last night I spent a bit of time exploring what I had done on the miniSDcard. The NAND flash loads Android 4.0.4 and works nicely, but the miniSDcard was not booting as it should when inserted.

    I discovered I have an image of Berryboot on the miniSDcard, and that is really a RaspberryPi solution that has never gotten fully ported to the Cubieboard. So I wiped the SDcard and am currently working on loading a CubianX1 binary to it.

    If all goes well, that should boot right up when plugged in.

    After than, I have choices to load it to the NAND flash (overwriting the Android 4.0.4) and/or loading the Root to my SSD.

    That's the plan for now. Of course, there may be more snags along the way. I suspect I will at least stay in the microSDcard boot for awhile to familiarize myself with Cubian. I may want to go with another Linux distro rather than commit it to NAND and/or SSD.

    The boot from microSDcard makes exploring distrobutions a bit like the LiveCD/DVD. I am NOT fond of the Android 4.0.4 as it mainly is extremely Google dependent and expects to be connected to the WWW.
  • Good news... I have CubianX1 working via microSDcard.

    There are three configurations to chose from.
    1. HDMI, which is really the comand line via an HDMI display with keyboard and mouse for input.
    2. Headless, which I presume uses the RS232 interface to a terminal that you provide
    3. Desktop HDMI.

    I currently have #1 running. And I need to still investing a wifi interface and installing the SSD Sata storage.

    Eventually, there is the question of need to change the booting over to NAND or to the SSD. But I may purchase a few more microSDcards and try some different distributions and Linux alteratives.

    +++++++
    The main point is that the Cubieboard now is running in Cubian Linux.
  • mindrobotsmindrobots Posts: 6,506
    edited 2015-11-23 15:50
    Headless may provide console access through RS232 but I would guess that is is mostly designed for network access via SSH. When I build something headless or hear of a headless server, it usually involves remote access via SSH (or Telnet but that's not very safe).

    It's good to see you've finally got your Cubbie running beyond Android.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2015-11-24 13:31
    I have run into some interesting observations in getting the Cubie board up and running.

    A. At this point, it is rather simple to load Android 4.0.4 from an available binary to the NAND flash, and that includes an alternative automatic boot from the microSDcard of Linux distributions. Cubian is quite easy to copy a binary onto a microSDcard with provided binaries. Other flavors might require you use Cubiez to compile your own binary that can be on a microSDcard.

    B. The SSD hard disk appears to need to be formated for Linux. I've not figured out how I desire to do that. I may have to open my big box computer that has SATA interfaces on the mother board and go from there. Or I think I might have a USA to SATA/PATA adapter device that can do the job. Of course, the third alternative is to figure out how to do it from CubianX with either FDISK or gparted.

    C. OpenWRT is a very valid OS alternative -- even if it does not support the HDMI. Why so? OpenWrt has a delightful repository called opkg. There are tons of software choices in there that will keep one engaged and one doesn't have to compile from code. I am not sure if CubianX even has a repository. The lack of one adds a bit of a burden to explorting.

    D. Some software applications keep cropping up as popular 'goto' tools for hacking these small boards and exporing.

    "Das U-Boot" has been mentioned previously. Open-Wrt uses it for everything and the Cubieboard also depends on it to get binary images running. One can use this to explore an unknown device if one really learns to use all its features.

    "Busybox" seems to be on-board. "Busybox" compacts a wide array of utilities for system operation and management into one binary. Previously, all the separate binaries took up unnecessary space. So gaining and understanding of "Busybox" is useful.

    "nano" which is just a small text editor. It is easier to use than 'vi' or 'emacs'. One needs to use a good text editor to configure the system to personal preferences.

    "minicom" or "putty" are serial terminal programs. PuTTY is more complicated and powerful. These might be installed on your Windows or Linux computer to connect to the RS232 port on your board. Often that RS232 port is the ONLY unsecured port that allows you to collect and observe the boot operation. Such data in turn gives you an idea of how to use "Das U-boot" to configure and create a new binary.. and to take the final leap of loading it. Flash memories have memory maps and it is imperative you have a good understanding of the existing one, before you create a new one.

    And eventually "ssh" is important for administration of your new board. It is more secure than a simple RS232 port or telnet.

    Next steps????
    1. Ge then USB wifi device installed and working.
    2. Get the SSD installed and working as merely extra storage -- not the Root
  • Heater.Heater. Posts: 21,230
    $ sudo fdisk /dev/whateverSataDevice

    Then follow the instructions.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2015-11-24 16:51
    Yes, indeed...
    fdisk is available in CubianX and eliminates the need for me to dig through a lot of junk or open up another computer for a SATA interface.

    Usually I use gparted in Linux. I am not sure that is available in CubianX as I don't yet have a GUI running. But I am now certain that fdisk is available for both the SSD and microSDcard.

    I just need to refresh my use of it before I get into it. Just 'man fdisk' might be enough.
Sign In or Register to comment.