Lenovo Iomega EZ Media & Backup Center

man mkimage

1 Like

Please, I already read the man page of mkimage, but I don't know yet what I need to do, I never used mkimage in the past...

It sounds like your best option is to get someone who knows what they are doing to do it for you.

1 Like

I know how to connect it using my serial-ttl cable, I know how to run commands on linux vm, I know how to use dd I already have a usb-sata cable and serial-ttl cable and have correctly identified pins on board, and I successfully disk-flashed a WDMybookLive (similar box)... but I just don't understand the linux kernel thing and the uImage image thing... I just need help with that... I am completely lost on Doozan forums about this... there is so many files and config trial and error and missing steps...
I want to try to install LEDE, to see if it works (the WDMybookLive works like a charm), if not, I want to just install Debian to be able to use the damn NAS for god sake... with stock firmware this shit it is just unusable.

Do you have a recovery plan if you brick the device?

As far i can tell with the serial ttl I can modify the 1mb flash of the board if it is needed to boot properly.
No problem if my hardrive fails in some way, and no problem if my any of my USB flash drive fails in some way.
If the on-board flash of the Iomega fails no problem to me, I already have my WD MybookLive with LEDE up and working.

That is because I want to do experiments, no problem if I brick the hardware, I also have lots of Routers, and some PogoPlug Mobile too, all flashed with LEDE.

I am very careful with my notes, I will write it down as I always do as a step-by-step guide if I had success to allow other to learn to do it with their hardware or similar ones.

For start, Can someone explain to me what is and the relation between of "Plain kernel", uBoot, uImage, a Initramfs, a zImage, ramdisk, initrd, dtb, etc, etc, may be if I understand all of that well I will understand easily what involves the mkimage process in order to get the files to ´dd´ in to the Iomega EZ.

'Plain kernel' is the binary which is the result of compiling&linking the kernel source.
zImage is a compressed plain kernel with a 'pyggyback'. Some extra code which can decompress the kernel before booting it.
uImage is (in most cases) a zImage with a 64 byte uImage header, which contains the load address & entry point of the zImage, so that uBoot knows what to do with it. Further is contains a description of the actual contents (linux kernel, version, ...)
An initramfs and initrd are basically the same. It's a filesystem in memory, which contains userland software. In an embedded environment it might contain the whole distro, on bigger systems it can contain tools&scripts to assemble&mount raid arrays and stuff like that before passing userland boot to them. Both can have a uHeader, to let uBoot know what it is.
dtb is a database describing the hardware. (How many Sata ports, their addresses, gpio, ... ).

You have at least to set the load address and entry point of the uImage correctly. Else u-boot doesn't know what to do. Don't know if uBoot actually cares about the other fields. But they are not hard to guess
Here you can see the uImage header of an ix2-dl:
Image Name: Linux-2.6.31.8
Created: 2013-03-12 21:25:40 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2943440 Bytes = 2.8 MB
Load Address: 00008000
Entry Point: 00008000

1 Like

Loud and Clear... Understood perfectly! MANY Thanks!!!

Ok, do you recommend that I must give a try to use mkimage then with this image?

so I need to convert that zImage into a uImage passing to mkimage with the entrypoint of 00008000 right?

It is something like this?

mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.11.3-kirkwood-tld-2 -d zImage.fdt uImage

I just found it here, I just missed it, I speed read again the forum post and I just found it: https://forum.doozan.com/read.php?2,35331,35434#msg-35434

the setenv commands in "u-boot reconfiguration" are needed to be executed on the same debian VM that I wil l use to run the mkimage command right ? or it goes on some file ?

In the post, I don't understand, are he running the commands on the box itself on the /boot directory? it says root@iomega:/boot#

I will write now to Eine from Doozan Forum to see if he can give a hand on this experiment too

@Mijzelf Again, thank you so much.

It is something like this?

Yes.

the setenv commands in “u-boot reconfiguration” are needed to be executed on the same debian VM that I wil l use to run the mkimage command right ? or it goes on some file ?

No. They are executed in the u-boot prompt, and the environment is stored in the 'u-boot environment partition' in flash.

In the post, I don’t understand, are he running the commands on the box itself on the /boot directory?

Yes. He already seems to have Debian running, which he uses to upgrade the kernel. So he can use dd to write the image to the local flash partition.
In your case you can run mkimage on any OS/platform which it can run on, and you'll have to upload using tftp to u-boot, and flash it using u-boot. (If you know another way to write it it's also fine, of course.)

Amazing, Thanks!.
I am chating with Ein on Skype, he help me too with this.
I will try to make the image and flash it.

I'll keep you posted.

Ok, Debian worked perfectly fine!
Now I will try to flash LEDE, boot to USB, and other thing, I will post my findings here too, so If anyone want to see a simplified step-by-step on this: https://gist.github.com/braian87b/b5a4c5f20d1112473c470b096df766a3

Hello everyone, just signed up to the forum and trying to give a new life on a Iomega EZ I just get for free. Unfortunately it's not getting an IP, so I'm trying to get it on the serial port. Can anyone tell me what are the parameters to setup the serial connection?

Almost for sure it's 115200N81. When it doesn't work for you, make sure you switched off all hardware handshake.

1 Like

Thanks you! I used and old serial female-rj45 from console cable from a switch, bit still couldn't get anything from the serial port. I'll try to fiddle a little with the cables, as it can be just a wrong wiring, but I'm worried that it isn't working at all. The hdd led is always off and I don't know if the hardrive is really spinning, although I'm getting 7.8V and 4.5V on the power connector. Do you know it the second hdd position can be populated with the connectors?

A female rj45? What do you mean? Like the ethernet port from a switch?

Anyway, if you short the rx and tx from your cable, you should get an echo in your terminal. If not, you have wrong cabling/pinning

I wouldn't know why not. It's a long time ago, but as far as I remember the ix2 and EZ Media PCB are identical, except some missing 2nd sata port components. But I can't remember if anyone has done it.

Sorry for my confusion! Its female DB-9 on one side and a RJ45 male on the other :slightly_smiling_face:

DB9? Are you sure it's TTL and not RS232?

You need to use USB-ttl with 3.3v pins, and connect tx, rx and gnd only... if you put more voltage on those you may burn some chip on the board.

Yeap, I was using an old laptop I had around with a serial port, but I can't be sure it is working. It has windows 98 :laughing: . I'm going to get one of these usb ttl pl2303 serial adapter and try again from my main machine.
image

Thank you all for the replies!