"MyLenny" firmware

This firmware upgrade installs Debian Lenny on a 1st generation MBWE.
Credits for generating the root filesystem go to Mario Pascucci (Thank you for the great job you have done!). I modified it to work on both one-disk and two-disk versions.

Known issues:

  • Power button won't work despite power_button kernel module being loaded.

Status: persists. If you have Debian Lenny installed with a working power button or some ideas on making it work, please let me now. Thanks.

Install Procedure

As usual, the firmware is shared "as-is" without guarantee of any kind.
The procedure is simple:
1. Download a firmware from here.
2. Unpack the firmware upgrade files:

# sh debfirmware*.sh

3. You should stop whatever programs, daemons running, may also unmount your data partition just in case:
# /etc/init.d/samba.sh stop
# /etc/init.d/lighttpd.sh stop
# ....
# umount /dev/md4

4. Launch the upgrade:
# /var/upgrade/upgrade1.sh

When the firmware is installed and drive boots up again, access your drive via SSH as root with 'mybook' password. (Note that your box will be reverted to DHCP, so your router should be configured to support it. Lookup 'DHCP leases' in your router's status page or manually assign some IP address to your MyBook's mac. You can as well use AngryIP or whatever means necessary.)
After logging in, you should:
1. If you have a two-disk version, edit /etc/modules: change 'negative_led_logic=0' to 'negative_led_logic=1' and 'invert_leds=1' to 'invert_leds=0'
2. You should also edit /usr/sbin/temperature_monitor: change
DISK1=
DISK2=
if [ -e /dev/sda ] ; then
        DISK1=sda
fi
if [ -e /dev/sdb ] ; then
        DISK2=sdb
fi

to
DISK1=sda
DISK2=sdb

or
DISK1=sda
DISK2=

for two-disk and one-disk versions, respectively.
3. Check the file /etc/network/interfaces: ethernet interface is configured for DHCP. If you want a static IP address, you must change this file accordingly.
4. Check the file /etc/apt/sources.list to choose the Debian mirror next to you.
5. Optional, but suggested: delete SSH keys in /etc/ssh and generate new keys. Delete ssh_host_dsa_key, ssh_host_dsa_key.pub, ssh_host_rsa_key and ssh_host_rsa_key.pub files from /etc/ssh directory and give the command:
# dpkg-reconfigure openssh-server

that proceed to generate new keys. Do not delete keys without generate new pairs: you cannot anymore access to Mybook via SSH.
6. Change root password and reboot:
# passwd root
# reboot

That's it, you have your "MyLenny" box ;)

Since v1.2, MyLenny comes with optware preinstall in /opt. There're two things you have to remember while using it:

  • It won't work without uclibc-opt optware package installed (comes preinstalled in v1.2)
  • Both ipkg and apt-get use update-alternatives executables in /opt/bin and /usr/sbin, respectively, therefore, make sure the respective paths are in the right order in PATH environmental variable before running one of them (e.g., by running `export PATH=/opt/bin:$PATH` or `export PATH=/usr/sbin:$PATH`)

If you have an older MyLenny release installed, here are the steps to manually install optware:

# wget http://mybookworld.wikidot.com/local--files/mylenny-firmware/opt-lenny.v1.tar.gz
# tar -xzvf opt-lenny.v1.tar.gz -C /

References

1. http://www.ismprofessional.net/pascucci/documenti/mybook/mybook-hacking-en.html#id2929614 - the original HowTo
2. http://kyyhkynen.net/stuff/mybook/temperature_monitor.php - Alternative temperature monitor and fan control by kyyhkynen
3. http://support.wdc.com/product/download.asp?groupid=107&sid=64 - WD GPL sourcecode

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License