# Relevant info about this: | |
https://forum.lede-project.org/t/lenovo-iomega-ez-media-backup-center/5031/ # "Lenovo Iomega EZ Media & Backup Center" | |
https://forum.doozan.com/read.php?2,35331,35434#msg-35434 # "Lenovo iomega EZ support" but read entire thread if it is possible | |
https://forum.doozan.com/read.php?2,15887 # "Debian on Iomega EZ Media & Backup Center" this is another thread about | |
https://forum.doozan.com/read.php?2,12096 # "Linux Kernel 4.14.1 Kirkwood package and Debian rootfs" Kernel and rootfs, thanks to this it is possible to run Debian | |
# Newer kernel guide: | |
https://gist.github.com/koczaj/a20ed52c969a8d0612986ca576067876 | |
# Using a Debian box (it could be a VM) with the harddrive connected (it could be a minimal net-install Debian) | |
See ip with: | |
ip addr show | |
# connect remotely using: | |
user@outside:~/# ssh user@10.211.55.6 | |
# We elevate permissions or even better install and config sudo | |
user@debian8vm:~/# su | |
root@debian8vm:~/# apt-get install sudo -y | |
root@debian8vm:~/# sudo adduser user sudo | |
user@debian8vm:~/# exit | |
root@debian8vm:~/# exit | |
user@outside:~/# ssh user@10.211.55.6 | |
user@debian8vm:~/# sudo su | |
# install miscelaneous | |
root@debian8vm:~/# apt-get install u-boot-tools parted gdisk -y | |
# Should be already installed | |
root@debian8vm:~/# apt-get install wget tar -y | |
# if we want to read the hardware description table file | |
root@debian8vm:~/# apt-get install device-tree-compiler-y | |
# we create a directory to work whithin | |
root@debian8vm:~/# mkdir iomegaez | |
root@debian8vm:~/# cd iomegaez | |
# download needed files | |
# we could use kernel 4.12 or newer one 4.14 | |
root@debian8vm:~/iomegaez/# wget https://www.dropbox.com/s/orud4fq131gtut9/linux-4.12.1-kirkwood-tld-1-bodhi.tar.bz2 | |
root@debian8vm:~/iomegaez/# wget https://www.dropbox.com/s/2gmcik1hu95i316/linux-4.14.1-kirkwood-tld-1-bodhi.tar.bz2 | |
# we download Debian rootfs | |
root@debian8vm:~/iomegaez/# wget https://www.dropbox.com/s/wsyuzr69se20um2/Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2 | |
# we download the hardware description tables for the Iomega EZ | |
root@debian8vm:~/iomegaez/# wget https://forum.doozan.com/file.php?2,file=1456,filename=kirkwood-lenovo-iomega-ez.dtb,download=1 -O kirkwood-lenovo-iomega-ez.dtb | |
# if we want to check it out: | |
root@debian8vm:~/iomegaez/# fdtdump kirkwood-lenovo-iomega-ez.dtb | |
# make directories for Kernel and Debian rootfs and uncompress them: | |
root@debian8vm:~/iomegaez/# mkdir linux-4.14.1-kirkwood-tld-1-bodhi Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi | |
root@debian8vm:~/iomegaez/# tar -jxvf linux-4.14.1-kirkwood-tld-1-bodhi.tar.bz2 -C linux-4.14.1-kirkwood-tld-1-bodhi | |
root@debian8vm:~/iomegaez/# tar -jxvf Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2 -C Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi | |
# These are the files: | |
root@debian8vm:~/iomegaez/# ls -lht ./linux-4.14.1-kirkwood-tld-1-bodhi/ | |
# # total 32M | |
# # -rw-r--r-- 1 root root 141K Nov 25 19:59 linux-4.14.1-kirkwood-tld-1.patch | |
# # -rw-r--r-- 1 root root 1.3M Nov 24 02:48 linux-dtb-4.14.1-kirkwood-tld-1.tar | |
# # -rw-r--r-- 1 root root 8.4M Nov 23 20:56 linux-headers-4.14.1-kirkwood-tld-1_1.0_armel.deb | |
# # -rw-r--r-- 1 root root 18M Nov 23 20:38 linux-image-4.14.1-kirkwood-tld-1_1.0_armel.deb | |
# # -rw-r--r-- 1 root root 152K Nov 23 19:41 config-4.14.1-kirkwood-tld-1 | |
# # -rwxr-xr-x 1 root root 3.7M Nov 23 04:40 zImage-4.14.1-kirkwood-tld-1 | |
root@debian8vm:~/iomegaez/# ls -lht ./Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi/boot/ | |
# # total 36M | |
# # -rw-r--r-- 1 root root 39K Nov 30 03:02 uImage | |
# # -rw-r--r-- 1 root root 7.0M Nov 30 03:02 uInitrd | |
# # -rw-r--r-- 1 root root 39K Nov 30 02:58 zImage.fdt | |
# # -rw-r--r-- 1 root root 64 Nov 30 02:55 uInitrd.bak | |
# # -rw-r--r-- 1 root root 7.0M Jul 23 21:15 initrd.img-4.12.1-kirkwood-tld-1 | |
# # -rw-r--r-- 1 root root 3.7M Jul 20 05:11 uImage.bak | |
# # -rw-r--r-- 1 root root 8.1M Jul 16 05:06 linux-headers-4.12.1-kirkwood-tld-1_1.0_armel.deb | |
# # -rw------- 1 root root 2.4M Jul 16 04:43 System.map-4.12.1-kirkwood-tld-1 | |
# # -rw------- 1 root root 3.7M Jul 16 04:43 vmlinuz-4.12.1-kirkwood-tld-1 | |
# # -rwxr-xr-x 1 root root 3.7M Jul 16 01:42 zImage-4.12.1-kirkwood-tld-1 | |
# # -rw-r--r-- 1 root root 150K Jul 16 00:21 config-4.12.1-kirkwood-tld-1 | |
# # drwxr-xr-x 2 root root 4.0K Jul 15 19:14 dts | |
# Here there is a hardware descriptor table, but it has some problems, do not use. | |
root@debian8vm:~/iomegaez/# ls -lht ./Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi/boot/dts/ | grep 'iomega-ez' | |
# # -rw-r--r-- 1 root root 13K Jul 16 05:08 kirkwood-lenovo-iomega-ez.dtb | |
# Creating uImage & uInitrd and putting it to the disk | |
# We will work on boot directory from the rootfs dirtree | |
root@debian8vm:~/iomegaez/# cd ./Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi/boot/ | |
# we copy the zImage file to a zImage.fdt | |
root@debian8vm:~/(...)/boot# cp -a zImage-4.12.1-kirkwood-tld-1 zImage.fdt | |
# if we want to check it out (see the fdt data on the dtb file): | |
# root@debian8vm:~/iomegaez/# # fdtdump dts/kirkwood-lenovo-ix2-ng.dtb | |
# Do not use this file, use below instead: | |
# root@debian8vm:~/(...)/boot# # cat dts/kirkwood-lenovo-ix2-ng.dtb >> zImage.fdt | |
# Important: We must put dtb data AT THE END of the zImage.fdt file. | |
root@debian8vm:~/(...)/boot# cat ../../kirkwood-lenovo-iomega-ez.dtb >> zImage.fdt | |
root@debian8vm:~/(...)/boot# #cp -a uImage uImage.bak | |
root@debian8vm:~/(...)/boot# #cp -a uInitrd uInitrd.bak | |
# This are the name of the images, initrd image is the same name as the file we use as source | |
root@debian8vm:~/(...)/boot# INITRD_IMAGE="initrd.img-4.12.1-kirkwood-tld-1" | |
root@debian8vm:~/(...)/boot# LINUX_TLD="Linux-4.12.1-kirkwood-tld-1" | |
# Create initramfs image: | |
root@debian8vm:~/(...)/boot# mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n $INITRD_IMAGE -d $INITRD_IMAGE uInitrd | |
# # Image Name: initrd.img-4.12.1-kirkwood-tld-1 | |
# # Created: Thu Nov 30 03:02:50 2017 | |
# # Image Type: ARM Linux RAMDisk Image (gzip compressed) | |
# # Data Size: 7245632 Bytes = 7075.81 kB = 6.91 MB | |
# # Load Address: 00000000 | |
# # Entry Point: 00000000 | |
# Create kernel image | |
root@debian8vm:~/(...)/boot# mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n $LINUX_TLD -d zImage.fdt uImage | |
## Image Name: Linux-4.12.1-kirkwood-tld-1 | |
## Created: Thu Nov 30 03:02:58 2017 | |
## Image Type: ARM Linux Kernel Image (uncompressed) | |
## Data Size: 39273 Bytes = 38.35 kB = 0.04 MB | |
## Load Address: 00008000 | |
## Entry Point: 00008000 | |
# write the images to disk | |
root@debian8vm:~/iomegaez/# dd if=uImage of=/dev/sdb bs=1MiB seek=10 | |
root@debian8vm:~/iomegaez/# dd if=uInitrd of=/dev/sdb bs=1MiB seek=20 | |
# create partitions on the disk, using GPT since the disk is probably bigger than 2Tb | |
root@debian8vm:~/iomegaez/# parted -s /dev/sdb mklabel gpt \ | |
mkpart swap linux-swap 100MiB 8.1GiB \ | |
mkpart rootfs ext3 8.1GiB 24.1GiB \ | |
mkpart Data ext3 24.1GiB 100% | |
# this creates 100Mb unused space, 8gb for swap, 16gb for rootfs and rest of the disk for Data | |
# Chek out the partitions (we check using gdisk if it is correct swap should be code 82 and other two are 83) | |
root@debian8vm:~/iomegaez/# parted /dev/sdb print | |
root@debian8vm:~/iomegaez/# gdisk /dev/sdb -l | |
# IMPORTANT: don't bother if the virtual machine fails to recognize more than 1.6 or 1.8Tb, we can fix this later. | |
# we format and set label to 2nd partition | |
root@debian8vm:~/iomegaez/# mkfs.ext3 /dev/sdb2 -L rootfs | |
# Create mountpoint and mount partition | |
root@debian8vm:~/iomegaez/# mkdir /mnt/sdb2 && mount /dev/sdb2 /mnt/sdb2 | |
# Copy the rootfs dirtree to mountpoint | |
root@debian8vm:~/iomegaez/# tar -C ./Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi/ -cvf - . | tar -C /mnt/sdb2 -xf - | |
root@debian8vm:~/iomegaez/# sync; sync; sync | |
# unmount and remove mountpoint | |
root@debian8vm:~/iomegaez/# umount /mnt/sdb2 && rmdir /mnt/sdb2 | |
# IMPORTANT, if we Forget to set proper label as 'rootfs' the label is has to be on the filesystem | |
# it is not enough that if it was set as label on the GPT table | |
root@debian8vm:~/iomegaez/# e2label /dev/sdb2 | |
root@debian8vm:~/iomegaez/# e2label /dev/sdb2 rootfs | |
root@debian8vm:~/iomegaez/# e2label /dev/sdb2 | |
# Now we can disconnect the harddrive and put in the Iomega EZ box | |
# We must connect a Serial TTL Cable as described here: https://forum.lede-project.org/t/lenovo-iomega-ez-media-backup-center/5031/13?u=braian87b | |
# Original bootargs and bootcmd (I copy mine here since we are gonna modify it) : | |
Marvell>> printenv | |
# # bootargs=console=ttyS0,115200 root=/dev/ram0 mtdparts=spi_flash:0x7e000@0(u-boot),0x1000@0x7f000(env),0x1000@0x7e000(env2) :::DB88FXX81:eth0:none | |
# # bootcmd=ide reset; ide read 0x40000 0x800 0x1800; ide read 0x900000 0x2000 0x2000; setenv bootargs $(console) $(bootargs_root) $(bootargs_mtd) $(bootargs_end); bootm 0x40000 0x900000;run bootcmd2 | |
# # bootcmd2=ide dev 1;ide read 0x40000 0x800 0x1800; ide read 0x900000 0x2000 0x2000; bootm 0x40000 0x900000; | |
# Commands to boot, must be used with a USB-Serial-TTL cable | |
Marvell>> setenv bootargs 'root=/dev/sda2 init=/bin/systemd fsck.mode=force fsck.repair=yes console=ttyS0,115200 mtdparts=spi_flash:0x7e000@0(u-boot),0x1000@0x7f000(env),0x1000@0x7e000(env2)' | |
Marvell>> setenv bootcmd 'ide read 0x40000 0x5000 0x2000; ide read 0x2100000 0xA000 0x4000; bootm 0x40000 0x2100000' | |
# To persist chages to flash chip on the PCB (you could try to boot first to see if everything is working | |
Marvell>> saveenv | |
# try to boot (to see if it works) | |
Marvell>> boot | |
# Now it must boot properly, check the IP of the box and connect using SSH or continue using serial | |
# username: root | |
# password: root | |
# If the vm didn't recognize all the capacity of the harddrive, now we could fix that easily | |
# If we run: | |
root@debian:~# parted /dev/sda print | |
# Wil say: | |
# # Warning: Not all of the space available to /dev/sda appears to be used, you can | |
# # fix the GPT to use all of the space (an extra 8589934592 blocks) or continue | |
# # with the current setting? | |
# We put: | |
Fix | |
# This will align a little the end of the last partition, now we must resize completely the last partition | |
root@debian:~# parted -s /dev/sda resizepart 3 100% | |
# Another way it could be to remove the 3rd partition and create it again, but I do not recommend it, I didn't try it by myself | |
root@debian:~# parted -s /dev/sda rm 3 mkpart Data ext3 24.1GiB 100% | |
# now data partition it should fill the rest of the disk | |
root@debian:~# parted /dev/sda print | |
# Enable Swap partition | |
root@debian:~# mkswap /dev/sda1 | |
# # Setting up swapspace version 1, size = 8 GiB (8592445440 bytes) | |
# # no label, UUID=c37d2e4c-dd32-40e5-9d4a-cea151d02389 | |
root@debian:~# free -h | |
# # total used free shared buff/cache available | |
# # Swap: 0B 0B 0B | |
root@debian:~# swapon /dev/sda1 | |
root@debian:~# free -h | |
# # total used free shared buff/cache available | |
# # Swap: 8.0G 0B 8.0G | |
cat<<'EOF' >> /etc/fstab | |
/dev/sda1 none swap sw 0 0 | |
EOF | |
# TODO: try LEDE, try USB boot, apt-get upgrade, LEDS and buttons, auto spindown disk, etc, etc | |
# ------------------------------------------------------------------------------------------ | |
Special thanks and acknowledgmentto: Ein (thanks for your dedication on this!), | |
bobafetthotmail for be the first to push me to try, Bodhi, armik, Mijzelf and all the help on the Doozan and Lede-Project Forums | |
This comment has been minimized.
This comment has been minimized.
is this the final instructions up above? |
This comment has been minimized.
This comment has been minimized.
@tylerhoot yes |
This comment has been minimized.
This comment has been minimized.
@braian87b , would it be possible to install Debian on EZ Iomega via usb using commands via serial ttl? |
This comment has been minimized.
This comment has been minimized.
I recommend the easy way, following the steps on this gist... If you try via serial ttl you will accesss to the bootloader and later to the stock firmware console (it is like a debian console) in there you could do something but I don't know if you could achieve the same... |
This comment has been minimized.
This comment has been minimized.
Hy @braian87b , I almost got it right, I had a problem with / dev / sda2 does not exist. |
This comment has been minimized.
This comment has been minimized.
There is a first section of steps where you must run with the hard drive connected to a debian/ubuntu/linux maquine or virtual machine, so if your boot drive is later, if you put the harddrive on the Iomega Ez Box you should use your serial-ttl cable and later connect using SSH, there the harddrive will be on /dev/sda because it is the only harddrive attached in the Iomega Ez Box. Please if im wrong interpreting your problem help me to understand better in which line of the instructions you started to see inconsistence on your side to help you better. Don't worry, it wasn't easy for me neither when I need to do that. I spend several hours from many days to get it working right. Keep trying! |
This comment has been minimized.
This comment has been minimized.
@braian87b , I managed to correct the previous error and now I'm stopping here ... mount: mounting /dev on /root/dev failed: No such file or directory Please see if the path is correct ... setenv bootargs 'LABEL=rootfs=/dev/sda2 init=/bin/systemd fsck.mode=force fsck.repair=yes console=ttyS0,115200 mtdparts=spi_flash:0x7e000@0(u-boot),0x1000@0x7f000(env),0x1000@0x7e000(env2)' |
This comment has been minimized.
This comment has been minimized.
Maybe I am missing this:
--------------more remarks just in case:
please keep in mind the instructions of:
those messages are probably the bootloader complaining about not being capable of boot to /dev/sda2 Basically, the steps involves the need to connect a hard drive to a linux box. |
This comment has been minimized.
This comment has been minimized.
if you run
|
This comment has been minimized.
This comment has been minimized.
if you run
|
This comment has been minimized.
This comment has been minimized.
and this is the bootlog that you should see something alike:
|
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
Solution works perfectly for kernel 4.12... Is it possible to update it based on latest Linux Kernel 5.5.1 ? 4.12 is 5 years old. I tried do to with some "mirror" steps but I failed. First problems were with CRC checksum (I tried 5 times). uImage / initrd are bigger and maybe some env values should be changed. |
This comment has been minimized.
This comment has been minimized.
@koczaj please start a new gist and post in there the steps that you follow and we will try to continue from there. Thanks! |
This comment has been minimized.
This comment has been minimized.
braian87b #```
|
This comment has been minimized.
This comment has been minimized.
please see that
you should run only the line accordingly to your hardware... see that line has a "#" at the beggining |
This comment has been minimized.
This comment has been minimized.
there, the first line have a "#" at the beginning, one is from the prompt and the other one is a "comment" one |
This comment has been minimized.
This comment has been minimized.
Another thing, try to do it using a x86 virtual machine and connecting the hd using usb-sata cable or booting your computer from a live-cd or pendrive using rufus, with the sata drive connected. |
This comment has been minimized.
This comment has been minimized.
braian87b
I think using a x86 machine shouldn't be the solution. I've followed via your solution on rpi and I was able to install Debian-4.12.1 but I would like to have updated version. |
This comment has been minimized.
This comment has been minimized.
Yeah, try again, that dtb worked fine for me with the steps above, but I had no tryed the v5 linux kernel, about the mkimage, I said that because maybe there is a bug with mkimage on rasbbian arm and the x86 debian it may work, check if there are different versions, just to be sure. |
This comment has been minimized.
This comment has been minimized.
This time I've put only one target from dts directory and I've used linux on my laptop to create uImage and uInintrd the same issue. bad CRC. |
This comment has been minimized.
This comment has been minimized.
Hi! I had that same bad CRC problem with newer kernels and solved it by changing the bootcmd. The problem was uBoot wasn't loading the entire kernel image, just the first 4.2MB. Try changing bootcmd environment variable from |
This comment has been minimized.
This comment has been minimized.
so, you changed the third value from |
This comment has been minimized.
This comment has been minimized.
yes. As i understand it, this parameter tells uBoot how many sectors to copy from disk to memory. Before changing it, uBoot loaded 8192 sectors, or 4,194,304 bytes. This is enough for 4.12 kernel, but 5.6.5 is bigger than that. Since uBoot wasn't loading the whole kernel, CRC check failed. Now it loads 5,505,024 bytes.
|
This comment has been minimized.
This comment has been minimized.
nice.
|
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
One more comment: I little bit changed bootenv settings to below:
Now I don't see CRC issue but there is other problem:
I will be very happy if someone can help me with this case. I can organize quick sharing session on skype, can even give the control to get this hardware working with the new kernel. dferrg , Any ideas ? clues ? |
This comment has been minimized.
This comment has been minimized.
Looks like your kernel couldn't find a valid rootfs. Is your rootfs in /dev/sda2? if it is, please try mounting it and chrooting.
if it works, check your fstab
|
This comment has been minimized.
This comment has been minimized.
Bingo !!
and it started!
|
This comment has been minimized.
This comment has been minimized.
nice :) |
This comment has been minimized.
This comment has been minimized.
definitely! |
This comment has been minimized.
This comment has been minimized.
@braian87b, a very big thank you! your instructions work perfectly (for 4.12) and my device is up and running now! I almost threw it into the garbage bin because i was very frustrated with the original firmware and interface. super minor suggestions (for a noob like me, first time using USB to Serial TTL):
Other than that, it's perfect... Thank you once again, |
This comment has been minimized.
This comment has been minimized.
To avoid the boot-fault of missing drive, replace /dev/sda2 to root=LABEL=rootfs I'm booting it with a usb and works well. But changing the boot orders.
|
This comment has been minimized.
This comment has been minimized.
Good afternoon. My Iomega HM EZ worked correctly after following the instructions presented here. |
This comment has been minimized.
This comment has been minimized.
For me samba is enough. Additionally vsftp as FTP serwer. |
This comment has been minimized.
This comment has been minimized.
Take a look at openmediavault also, if you need more than just samba. It's not straightforward to install on the Iomega, but it can be done with some effort. |
This comment has been minimized.
This comment has been minimized.
happy that some of you were able to give a new life to your boxes... Please if you have additional steps to install useful features post the links to gists or github to be able to give a try... will be very grateful. Thanks! |
This comment has been minimized.
This comment has been minimized.
A lot of resources for a 128mb arm device. Its bestest a smb/NFS share configured by SSH. If you want a lowest use of resources, use Arch Linux. Debían 10 use 70-80mb of RAM, with systemd.. and a lot of things. With Arch only use 30-40mb. Rest are for mdadm and smb/nfs |
This comment has been minimized.
This comment has been minimized.
Como faço para instalar o Arch Linux no IOMEGA EZ? |
This comment has been minimized.
This comment has been minimized.
Use this procedure. Ignore the uboot update. Only need the 11 and 12 step. Do It with a debían/Arch environment Only need to build the kernel and initramfs and does the steps by braian. Flash into a USB Drive and use the hard disk for the rest. One step that i've practiced are create four partitions. One initramfs 10M, two kernel 32M, three systemdata 2GiB, and four userdata. When you update the kernel, create a hook with apt or Pacman and dd in the hard Drive partitions Pd. I'm spanish, but the most helpful that i've learned are from english community |
This comment has been minimized.
Possible problems:
Bad Magic Number
You should put the new variables using
setenv bootargs
,setenv bootcmd
and then run againboot
Continuous:
Begin: Running /scripts/local-block ... done.
you should wait, it is trying to read the rootfs with no success, it will fail soon or late.You should label the filesystem as rootfs in order to work properly! read again the steps!
Starting kernel ...
This is fine, it seems that the kernel was read and will be loaded.We fix this, see final instructions.