General NAS-Central Forums

Welcome to the NAS community
It is currently Tue May 23, 2017 6:47 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Tue Dec 22, 2015 2:30 am 
Offline

Joined: Sat Dec 19, 2015 1:48 am
Posts: 5
Hello all-
I am a new member, and I have been hanging out and reading. My first visit here, in August 2014, was to get help after I upgraded to Ubuntu 14.04 and discovered that Samba no longer worked. Tracking the problem down led me to a bug report https://bugzilla.samba.org/show_bug.cgi?id=10584#c73, and from there, here! http://iomega.nas-central.org/wiki/Root_access_enabling_(Home_Media_CE)

I can see that the content that is available here represents a good deal of effort put into learning what is in these boxes, and how to repair and improve the capabilities. Also, quite a bit of help has been given to visitors with problems.

I have a bit of experience writing C in a bare metal gnu tool chain, but no experience in Linux, except bash scripts and small C programs, but nothing complicated. Still, I wonder what can be done with a NAS besides backing up data and being a server on my LAN? If my IOmega EZ Media NAS enclosure (E*Bay, $15 no HDD) has a good PCB, I'll put a spare drive in and see if I can bring it online. Then what? is there enough RAM to
  • Actually run a process while it's being a server?
  • Generate Plots in Python for web pages?
  • Do some data collection via a serial port connected device?

I have not come upon any discussion of these sorts of things. Any Thoughts?

_________________
- sshin
Using: IOmega Home Media CE
Hacking: EZ Media & Backup Center
Ubuntu 15.04 Gnome


Top
 Profile  
 
PostPosted: Tue Dec 22, 2015 2:00 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 5994
sshin wrote:
Is there enough RAM to
  • Actually run a process while it's being a server?
  • Generate Plots in Python for web pages?
  • Do some data collection via a serial port connected device?
  • Yes, easily. The box has 128MiB. The box might slowdown a bit, as less ram is available for disk cache.
  • Depends on the complexity of the plots, I suppose. And I don't know if python is available, and if it has all necessary modules. The box is based on Debian, so theoretically you can just install them, but it's not easy to install additional Debian packages. Yet I think it's relatively easy to just install Debian.
  • The box has a single serial port, which is used for the console. So you'll need an usb to serial converter (or free up the stock serial port). The amount of data you can gather from a serial port can hardly be too much for the device.


Top
 Profile  
 
PostPosted: Tue Dec 22, 2015 9:27 pm 
Offline

Joined: Sat Dec 19, 2015 1:48 am
Posts: 5
Quote:
The box has a single serial port, which is used for the console. So you'll need an usb to serial converter (or free up the stock serial port).

I am ignorant regarding NAS architecture - I see posts that mention "firmware" and devices that are based on Linux. Does the firmware do more or less than a computer bios? If the NAS was Linux, and only had two boot choices (USB Flash stick or one and one only HDD partition" then the BIOS would be really simple: No keyboard, no mouse, no graphics adapters, no drivers for multiple boot devices, etc.

Is there something on NAS-Central that discusses the IOmega firmware, what it does before it passes control to the secondary boot loader, and is the firmware open source? Perhaps a discussion of how to hack a Linux Distro to make it boot on NAS hardware ? I don't mean to imply that I am competent to do such a thing :roll: !

Free up the stock port? If it's really Linux this should do it http://www.howtogeek.com/111417/how-to-multitask-in-the-linux-terminal-3-ways-to-use-multiple-shells-at-once/

Thank you for Your comments!

_________________
- sshin
Using: IOmega Home Media CE
Hacking: EZ Media & Backup Center
Ubuntu 15.04 Gnome


Top
 Profile  
 
PostPosted: Wed Dec 23, 2015 9:46 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 5994
Firmware is in this case: All software which was installed on the new box, and their updates. So that includes the bootloader, linux, and the userland.

And there is no BIOS. The processor has a build in bootloader which is just smart enough to load a higher level bootloader in memory, and pass execution to it. On most embedded boxes (including the EZ Media) that is u-boot. It's u-boot's responsibility to fetch a Linux kernel somewhere, and maybe an initramfs, pass a commandline to the linux kernel, and execute it.
Linux then needs to find and mount it's rootfs, although on some embedded boxes only the initramfs is used. The rootfs can be found because it's location is specified in the commandline (by u-boot, who reads it from it's environment), or because it's location is hardcoded in the kernel, or by means of a script in initramfs.

U-boot can be very powerful, and execute scripts to search for a kernel on several places, including usb-sticks, harddisks, tftp- and nfs servers, but on most systems only a subset of all functions is included, and the bootscript only searches for the kernel on it's stock location.
You can also interrupt u-boot and upload a kernel and initramfs using tftp, and execute them from ram. (Or flash them to flashrom, but not on an EZ-Media. It's flash size is too small)

On your EZ-Media the boot process is:
Processor runs it's internal bootloader, and loads u-boot from flash, and executes it.
U-boot reads it's environment from the same flash, loads a kernel (uImage) and initramfs (uInitrd) from harddisk, at specified (in environment) sector offsets. (U-boot is smart enough to mount a filesystem and read a kernel from file, but Iomega has chosen to write the kernel and initramfs to raw disk space.)
The kernel is executed, it initializes all hardware which it can find, and then executes a script in initramfs (/rclinux IIRC). This script mounts the harddisk, assembles raid arrays and logical volumes, composes the rootfs by mounts, bindmounts and symlinks, and finally starts the 'NAS backend'.

The most common way to change this is by connecting to the serial port, which gives you access to the u-boot command prompt, where you can change the environment. If u-boot has USB support, you can tell it to get it's kernel from an usb stick, and provide a commandline which tells the kernel to find it's rootfs there too. Then you can start *any* ARMv5 compatible distro (which is not dependent on a video card).
Another option is to exchange the kernel and/or initramfs on harddisk, which gives the possibility to load another rootfs either.

Quote:
is the firmware open source?
Yes. At least u-boot, the Linux kernel and most of the userland. Maybe a few closed source binaries are included.
Quote:
Free up the stock port? If it's really Linux this should do it <snip>
No, that is about high level terminals. The console is low-level. It's the interface which is used to write the boot messages to, from both bootloaders and the kernel, and sometimes you can also get a shell on it, when the box is booted. Here can you find the console output of a HMNHD-CE. To free up the serial port you have to pass a command line param which redirects console output to nil. In that case the kernel won't open it, and if you tell the userland not to open a shell on it, you can use it for something else. Although you still have the bootloader output on boot. Your connected device should be able to handle that (or be disconnected on boot). An usb-serial adapter is more convenient.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group