Skip to content

Instantly share code, notes, and snippets.

@braian87b
Last active April 27, 2023 11:46
  • Star 11 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save braian87b/b5a4c5f20d1112473c470b096df766a3 to your computer and use it in GitHub Desktop.
How to Install pure Debian on Iomega EZ Media and Backup Center
# 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
@xickwy
Copy link

xickwy commented Feb 4, 2021

Muitos recursos para um dispositivo de braço de 128 MB. Seu melhor é um compartilhamento smb / NFS configurado por SSH. Se você deseja um uso mínimo de recursos, use o Arch Linux. Debían 10 usa 70-80mb de RAM, com systemd .. e um monte de coisas. Com o Arch, use apenas 30-40 MB. O resto é para mdadm e smb / nfs

Como faço para instalar o Arch Linux no IOMEGA EZ?
In english, please. ;)

Use this procedure.
https://archlinuxarm.org/platforms/armv5/seagate-goflex-net

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

@ricoberlim
Copy link

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!

Hey, thanks very much for what you have done. I just got one of these for free, but unfortunately it doesn't get an IP or anything. I'm trying to connect thru serial, but I don't know the parameters (speed, etc) to connect it.

@braian87b
Copy link
Author

@ricoberlim
the board on the box has an uBoot configuration (like the bios on a PC) and that has a string with the configuration of where to find in the disk the boot program, so probably that is the reason because is not working, you may have a corrupted boot on the drive or a drive without the boot program.
I recommend you to try with a USB-TTL cable to see if you can see there the boot process and if you can interrupt it and enter commands there. you can either use a raspberry pi to do that or a usb-ttl cable like those with chip FT232, cp2102, ch340, pl2303.
if you buy a cheap or conterfeit cable you may have to use alternative (not original) driver on windows in order to make it work or use it on linux.

@toddmax
Copy link

toddmax commented Sep 28, 2022

The links for kernels in Dropbox arent working for me. Alternate?

@koczaj
Copy link

koczaj commented Sep 28, 2022

The links for kernels in Dropbox arent working for me. Alternate?
rootfs link is working but kirkwood-tld-1-bodhi is here:
https://www.dropbox.com/s/y2rd35yqeo5o381/linux-4.12.1-kirkwood-tld-1-bodhi.tar.bz2?dl=0

@ziprasidone146939277
Copy link

I was able to follow the guide. Unfortunately I don't have a serial cable to track the boot process. The Iomega-EZ got an IP address from the network, but SSH returns refused. (BTW; what is the root default password?)

Starting Nmap 7.80 ( https://nmap.org ) at 2023-04-22 18:43 -03
Initiating ARP Ping Scan at 18:43
Scanning 192.168.1.22 [1 port]
Completed ARP Ping Scan at 18:43, 0.08s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 18:43
Completed Parallel DNS resolution of 1 host. at 18:43, 0.04s elapsed
Initiating Connect Scan at 18:43
Scanning 192.168.1.22 [1000 ports]
Completed Connect Scan at 18:43, 1.21s elapsed (1000 total ports)
Nmap scan report for 192.168.1.22
Host is up (0.21s latency).
All 1000 scanned ports on 192.168.1.22 are closed
MAC Address: 00:D0:B8:1D:1B:90 (Iomega)

Read data files from: /usr/bin/../share/nmap
Nmap done: 1 IP address (1 host up) scanned in 1.39 seconds
           Raw packets sent: 1 (28B) | Rcvd: 1 (28B)

What can I do to access the device via SSH o similar; without a USB-Serial cable? Is this possible?

Than You for this.

@ziprasidone146939277
Copy link

ziprasidone146939277 commented Apr 23, 2023

I am new and a noob on this.
After some research, is it possible to track the boot process using netcat? I tried some things like uEnv.txt and /etc/fw_env.config without success.

Thank you in advance

EDIT: I am going, meanwhile, to try to get a USB-Serial cable.

@braian87b
Copy link
Author

braian87b commented Apr 24, 2023

@ziprasidone146939277

try password root
is recommended to use the usb-ttl cable, much easier.

@koczaj
Copy link

koczaj commented Apr 24, 2023

the password was toor or root. One of them :)

@ziprasidone146939277
Copy link

Thank You, @braian87b @koczaj .
I got a USB-TTL cable. Based on what i've read on the web, this have to be connected to the NAS board at 3.3v right? But by "default" the cable delivers 5v. (is this a risk?) I have to open it (the USB-Serial adapter) and switch it to 3.3 if what I am saying is correct.

@ziprasidone146939277
Copy link

This is the adapter:

[Mon Apr 24 19:02:20 2023] usb 2-2: new full-speed USB device number 6 using xhci_hcd
[Mon Apr 24 19:02:20 2023] usb 2-2: New USB device found, idVendor=067b, idProduct=2303, bcdDevice= 4.00
[Mon Apr 24 19:02:20 2023] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[Mon Apr 24 19:02:20 2023] usb 2-2: Product: USB-Serial Controller D
[Mon Apr 24 19:02:20 2023] usb 2-2: Manufacturer: Prolific Technology Inc. 
[Mon Apr 24 19:02:20 2023] usbcore: registered new interface driver usbserial_generic
[Mon Apr 24 19:02:20 2023] usbserial: USB Serial support registered for generic
[Mon Apr 24 19:02:20 2023] usbcore: registered new interface driver pl2303
[Mon Apr 24 19:02:20 2023] usbserial: USB Serial support registered for pl2303
[Mon Apr 24 19:02:20 2023] pl2303 2-2:1.0: pl2303 converter detected
[Mon Apr 24 19:02:20 2023] usb 2-2: pl2303 converter now attached to ttyUSB0

@ziprasidone146939277
Copy link

I connected the adapter to NAS (without any VCC pin to the PCB), i saw a strange behavior; it seems that the NAS it not booting the correct image.

Here is a gist with the boot process: iomega_ez.out

I guess that I done something wrong, but I can realize what.

@ziprasidone146939277
Copy link

Done!

boot.out

The USB-TTL cable came failed; the pins were incorrect inside. (no TX). Once i've got TX (to interrupt boot proccess) i done:

Marvell>> setenv bootcmd 'ide read 0x40000 0x5000 0x2A00; ide read 0x2100000 0xA000 0x5000; bootm 0x40000 0x2100000'
Marvell>> saveenv 
Marvell>> setenv bootargs 'root=/dev/sda2 init=/bin/systemd fsck.mode=force fsck.repair=yes console=ttyS0,115200 
Marvell>> saveenv
Marvell>>boot

The root password is "root".

I attach a picture showing how I connected de PL2303 to NAS board.

IMG_20230424_234411464

@braian87b
Copy link
Author

@ziprasidone146939277

Correct, for TTL you should only connect TX, RX and GND, never connect VCC.

did you wrote the kernel and initramfs images to this two locations on the HD ?

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

or you are trying to boot using USB? for USB you need also to change the boot args. default ones won't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment