-
-
Save braian87b/b5a4c5f20d1112473c470b096df766a3 to your computer and use it in GitHub Desktop.
# 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 [email protected] | |
# 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 [email protected] | |
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 | |
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!
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.
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
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?
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
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.
@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.
The links for kernels in Dropbox arent working for me. Alternate?
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
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.
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.
try password root
is recommended to use the usb-ttl cable, much easier.
the password was toor or root. One of them :)
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.
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
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.
Done!
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.
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.
lol, I managed to get it working with kernel version 6, I'll clean up all these steps at some moment on a new gist, but for the moment:
# to use the partition number
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)'
# to use the partition label
Marvell>> setenv bootargs 'root=LABEL=rootfs 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)'
# Linux Kernel 4:
Marvell>> setenv bootcmd 'ide read 0x40000 0x5000 0x2000; ide read 0x2100000 0xA000 0x4000; bootm 0x40000 0x2100000'
# Linux Kernel 5:
Marvell>> setenv bootcmd 'ide read 0x40000 0x5000 0x2A00; ide read 0x2100000 0xA000 0x4000; bootm 0x40000 0x2100000'
# Linux Kernel 6:
Marvell>> setenv bootcmd 'ide read 0x800000 0x5000 0x3200; ide read 0x2100000 0xA000 0x4000; bootm 0x800000 0x2100000'
using a higher position 0x800000 made the trick.
works: Debian-6.5.7-kirkwood-tld-1-rootfs-bodhi
@braian87b , will you update the solution and links to get it worked with Debian-6.5.7-kirkwood-tld-1-rootfs-bodhi ?
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.