"MyLenny" firmware

This firmware upgrade installs Debian Lenny on a 1st generation MBWE only (i.e. Bluerings edition).

Since 02.05.2011, firmwares come in 2 editions: v1x and v2x - OABI (arm) and EABI (armel), respectively.

OABI and EABI are two kinds of ABI (Application Binary Interface).

I highly recommend to install EABI edition, mainly since it features better performance. If you want to learn more, there's a lot of information available concerning OABI vs. EABI in the net: e.g., you can look here. Additionally, many packages at http://backports.debian.org are unavailable for "arm" architecture (OABI).

Now that v2x has been verified to work fine, v1x is deprecated and not maintained anymore.

Credits for generating the original OABI root filesystem go to Mario Pascucci (Thank you for the great job you have done!). Also huge thanks go to ilovemynas for his modified power button script, Da_n00b and aviadra for the fixes they suggested and everyone else for your feedback and patience!

Additional thanks go to nl_amun for hosting firmware files free-of-charge :-)

Known issues:

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

Status: fixed in v1.3.

  • Various issues with v1.2 and earlier.

Status: fixed in v1.3. Check out support thread for details

Look here for instructions on fixing the above ("Power button" and "Various") issues on installed v1x MyLenny versions <=1.2

Install Procedure

As usual, the firmware is shared "as-is" without guarantee of any kind.
The procedure is simple:
(0.5) This is an additional step for those who don't have /dev/md3 mounted on /var (e.g., if you're already running Debian; run # mount to see whether you need to do this or not):

# mkdir /var.old # we'll use this dir to mount /dev/md3 here, naturally, you may use some other dir if you like
# mount /dev/md3 /var.old
# mkdir -p /var.old/upgrade # just to be 100% sure the upgrade dir exists
# rm -rf /var/upgrade
# ln -s /var.old/upgrade /var/upgrade

1. Download and unpack the firmware upgrade files:

# wget http://classictrail.nl/mybookworld/mylenny/debfirmware.v2.1.1.sh
# sh debfirmware.v2.1.1.sh # this will unpack firmware files to /var/upgrade

(in case the server is down a mirror is available here)

2. You should stop whatever programs, daemons running, may also unmount your data partition just in case:

# killall smbd nmbd lighttpd
# ....
# umount /dev/md4

3. 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

to generate new keys. Do not delete keys without generating new pairs: you won't be able to access your box if you do so.
6. Change root password and reboot:
# passwd root
# reboot

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

Attention! whenever editing /etc/fstab, make sure each mounting line's last digits are set to 0 0 to prevent fsck from being launched at boot time, since it may request user's attention if it finds some serious problems and therefore make the box unaccessible for those without serial connection.

You should note that 2-drive unit owners will have to manually edit /etc/init.d/halt if they agree to automatically update it on upgrade for the box to shut down properly:
comment out these lines

       if grep -qs '^md.*active' /proc/mdstat
       then
               hddown=""
       fi

like this
#       if grep -qs '^md.*active' /proc/mdstat
#       then
#               hddown=""
#       fi

v2x and v1x since v1.2 MyLenny firmwares come with optware pre-install in /opt. There're two things you have to remember while using it:

  • MyLenny v1x uses mbwe-bluering feed, which won't work without uclibc-opt optware package installed (comes pre-installed since v1.2)
  • MyLenny v2x uses cs08q1armel feed
  • 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`)

Note that v2x and v1x since v1.3.proper MyLenny firmwares provide a workaround for the update-alternatives issue: the /opt/bin/ipkg binary is moved to /opt/bin/ipkg.bin and /opt/bin/ipkg is a bash script created to call "PATH=/opt/bin:$PATH /opt/bin/ipkg.bin $@", thus eliminating the need to worry about this issue.

v2x and v1x since v1.3 MyLenny firmwares come with a working power button with additional functionality (source code available here). It will respond as follows:
- button press >= 3sec: execute /sbin/halt
- button press < 3sec: execute /etc/init.d/power_button_short_press

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
4. http://mybookworld.wikidot.com/modified-power-button-script

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