How to Hack WD My Book Live

My Book Live

WD My Book Live is network storage installed with Debian Linux operating system. We can setup this device to be our web server at home. Here are the steps how I did it.

SECTION 1

Follow this Section 1 if you haven’t upgrade the firmware and you don’t want to use Debian Squeeze. If you just upgraded your My Book Live to latest firmware and you want to use Squeeze, go to Section 2.

1. Activate SSH

Open browser, and go to http://device_ip/UI/ssh and then enable SSH service.

2. Login to SSH

username: root
default password: welc0me

3. Backup the system and protect udev update

Backup system:

# dd if=/dev/sda bs=15728640 count=1 | bzip2 > /DataVolume/shares/Public/SDA_MBR_FREESPACE.bz2
# dd if=/dev/sda1 | bzip2 > /DataVolume/shares/Public/SDA1_IMA.bz2
# dd if=/dev/sda2 | bzip2 > /DataVolume/shares/Public/SDA2_IMA.bz2

Protect udev update:

# aptitude hold udev

4. Disable load cycle count (http://wdc.custhelp.com/app/answers/detail/a_id/5357)

WD drives are designed to reduce power consumption, in part by positioning the heads in a park position (unloading the heads) and turning off unnecessary electronics, resulting in substantial power savings. WD defines this mode as Idle 3.

Some utilities, operating systems, and applications, such as some implementations of Linux, for example, are not optimized for low power storage devices and can cause our drives to wake up at a higher rate than normal. This can negatively impact some of the power savings associated with WD Green Power drives and artificially increases the number of load-unload cycles. The increase in load/unload cycles for a typical desktop user are within design margins (drive has been validated to 1 million load/unload cycles without issue).

Affected Models:

WD20EADS, WD20EARS, WD15EADS, WD15EARS, WD10EADS, WD10EARS, WD8000AARS, WD7500AADS, WD7500AARS, WD6400AADS, WD6400AARS, WD5000AADS, WD5000AARS

Run this command to check your model:

MyBookLive:~# dmesg|grep WDC
ata2.00: ATA-8: WDC WD10EURS-630AB1, 80.00A80, max UDMA/133
scsi 1:0:0:0: Direct-Access     ATA      WDC WD10EURS-630 80.0 PQ: 0 ANSI: 5

If your model is included in the affected list, download idle3 tool from http://mybookworld.wikidot.com/local–files/mybook-live/idle3ctl.tar.gz

# wget http://mybookworld.wikidot.com/local--files/mybook-live/idle3ctl.tar.gz

Extract, execute and reboot.

# tar zxvf idle3ctl.tar.gz
# ./idle3ctl -d /dev/sda
# reboot

5. Install mysql-server

Comment out debian squeeze references from packaging list

# sed -ie "s/deb .* squeeze/#&/g" /etc/apt/sources.list

Update aptitude and install mysql

# apt-get update
# apt-get install mysql-server mysql-client php5-mysql

Create symlink of /etc/init.d/mysql in /etc/rc2.d/ to autostart the mysql server

# ln -s /etc/init.d/mysql /etc/rc2.d/

Initialize mysql data dir and create system tables

# mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql

Restart apache

# /etc/init.d/apache2 restart

6. Create apache virtual host

Go to apache vhost folder:

# cd /etc/apache2/sites-available/

Copy current vhost configuration file:

# cp wdnas mywebsite

Edit mywebsite vhost file:

# nano mywebsite

Modify to the following:

<VirtualHost *:80>
ServerName mywebsite.mooo.com
ServerAlias www.mywebsite.mooo.com
ServerAdmin webmaster@localhost

DocumentRoot /DataVolume/shares/mywebsite/

<IfModule mod_rewrite.c>
RewriteLog /var/log/apache2/rewrite.log
RewriteLogLevel 0

RewriteEngine On

</IfModule>

<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>

<Directory /DataVolume/shares/mywebsite/>
Options -Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>

ErrorLog /var/log/mywebsite_error.log

LogLevel warn

</VirtualHost>

Create document root folder:

# mkdir /DataVolume/shares/mywebsite

Enable virtual host file:

# a2ensite mywebsite

Rename wdnas virtualhost:

# mv /etc/apache2/sites-enabled/000-wdnas /etc/apache2/sites-enabled/wdnas
# mv /etc/apache2/sites-enabled/000-wdnas-ssl /etc/apache2/sites-enabled/wdnas-ssl

Restart apache:

# /etc/init.d/apache2 restart

7. Create your domain mywebsite.mooo.com using free DNS service by afraid.org. Follow this article on step no. 4, 5, 6.

8. Make cron running when in standby mode

Kill monitorio.sh script:

# killall monitorio.sh
# nano /usr/local/sbin/monitorio.sh

Comment out the following line:

#/etc/init.d/cron start > /dev/null
#/etc/init.d/cron stop > /dev/null

9. You can access your website at http://mywebsite.mooo.com. My Book Live UI also available at http://device_ip

SECTION 2

Use this section if you are just upgrading your My Book Live to latest firmware. Below is my firmware after upgraded.

MyBookLive:~# cat /etc/version
02.32.05-046

1. Activate SSH

Open browser, and go to http://device_ip/UI/ssh and then enable SSH service.

2. Login to SSH

username: root
default password: welc0me

3. Backup the system and protect udev update

Backup system:

# dd if=/dev/sda bs=15728640 count=1 | bzip2 > /DataVolume/shares/Public/SDA_MBR_FREESPACE.bz2
# dd if=/dev/sda1 | bzip2 > /DataVolume/shares/Public/SDA1_IMA.bz2
# dd if=/dev/sda2 | bzip2 > /DataVolume/shares/Public/SDA2_IMA.bz2

Protect udev update:

# aptitude hold udev

4. Disable load cycle count (http://wdc.custhelp.com/app/answers/detail/a_id/5357)

 WD drives are designed to reduce power consumption, in part by positioning the heads in a park position (unloading the heads) and turning off unnecessary electronics, resulting in substantial power savings. WD defines this mode as Idle 3.

Some utilities, operating systems, and applications, such as some implementations of Linux, for example, are not optimized for low power storage devices and can cause our drives to wake up at a higher rate than normal. This can negatively impact some of the power savings associated with WD Green Power drives and artificially increases the number of load-unload cycles. The increase in load/unload cycles for a typical desktop user are within design margins (drive has been validated to 1 million load/unload cycles without issue).

Affected Models:

WD20EADS, WD20EARS, WD15EADS, WD15EARS, WD10EADS, WD10EARS, WD8000AARS, WD7500AADS, WD7500AARS, WD6400AADS, WD6400AARS, WD5000AADS, WD5000AARS

Run this command to check your model:

MyBookLive:~# dmesg|grep WDC
ata2.00: ATA-8: WDC WD10EURS-630AB1, 80.00A80, max UDMA/133
scsi 1:0:0:0: Direct-Access     ATA      WDC WD10EURS-630 80.0 PQ: 0 ANSI: 5

If your model is included in the affected list, download idle3 tool from http://mybookworld.wikidot.com/local–files/mybook-live/idle3ctl.tar.gz

# wget http://mybookworld.wikidot.com/local--files/mybook-live/idle3ctl.tar.gz

Extract, execute and reboot.

# tar zxvf idle3ctl.tar.gz
# ./idle3ctl -d /dev/sda
# reboot

5. Install mysql-server

Update aptitude and install mysql

# apt-get update
# apt-get install mysql-server mysql-client php5-mysql

And then I got this error:

Errors were encountered while processing:
/var/cache/apt/archives/php5-common_5.3.3-7+squeeze14_powerpc.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

To fix above error, run this command:

# dpkg -i –force-overwrite /var/cache/apt/archives/php5-common_5.3.3-7+squeeze14_powerpc.deb

And then another error came:

W: GPG error: http://ftp.us.debian.org squeeze Release: The following signatures couldn't be verified because
the public key is not available: NO_PUBKEY AED4B06F473041FA NO_PUBKEY 64481591B98321F9
W: You may want to run apt-get update to correct these problems

To fix, run below commands:

$ gpg --keyserver subkeys.pgp.net --recv AED4B06F473041FA

$ gpg --export --armor AED4B06F473041FA | sudo apt-key add -

$ gpg --keyserver subkeys.pgp.net --recv 64481591B98321F9

$ gpg --export --armor 64481591B98321F9| sudo apt-key add -

Replace the key number “AED4B06F473041FA” and “64481591B98321F9” with the one included in your error message.

Then do:

# apt-get update
 # apt-get -f install

Restart apache

# /etc/init.d/apache2 restart

6. Create apache virtual host

Go to apache vhost folder:

# cd /etc/apache2/sites-available/

Copy current vhost configuration file:

# cp wdnas mywebsite

Edit mywebsite vhost file:

# nano mywebsite

Modify to the following:

<VirtualHost *:80>
ServerName mywebsite.mooo.com
ServerAlias www.mywebsite.mooo.com
ServerAdmin webmaster@localhost

DocumentRoot /DataVolume/shares/mywebsite/

<IfModule mod_rewrite.c>
RewriteLog /var/log/apache2/rewrite.log
RewriteLogLevel 0

RewriteEngine On

</IfModule>

<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>

<Directory /DataVolume/shares/mywebsite/>
Options -Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>

ErrorLog /var/log/mywebsite_error.log

LogLevel warn

</VirtualHost>

Create document root folder:

# mkdir /DataVolume/shares/mywebsite

Enable virtual host file:

# a2ensite mywebsite

Rename wdnas virtualhost:

# mv /etc/apache2/sites-enabled/000-wdnas /etc/apache2/sites-enabled/wdnas
# mv /etc/apache2/sites-enabled/000-wdnas-ssl /etc/apache2/sites-enabled/wdnas-ssl

Restart apache:

# /etc/init.d/apache2 restart

7. Create your domain mywebsite.mooo.com using free DNS service by afraid.org. Follow this article on step no. 4, 5, 6.

8. You can access your website at http://mywebsite.mooo.com. My Book Live UI also available at http://device_ip

Reference: http://mybookworld.wikidot.com/mybook-live

Keywords:

  • my book live hack
  • wd my book live hack
  • mybook live hack
  • my book live hacks
  • hack my book live
  • hacking my book live
  • western digital my book live hack
  • hack mybook live
  • my book live hacking
  • hacking wd my book live
Comments
  1. elmany Reply
    • kumkum Reply
  2. ubuntu Reply
    • kumkum Reply
      • raequin Reply
  3. chkstar Reply
    • kumkum Reply
      • chkstar Reply
        • chkstar Reply
          • kumkum
          • chkstar
          • kumkum
  4. Alex Reply
    • kumkum Reply
  5. Karl Reply
    • Karl Reply
      • kumkum Reply
    • kumkum Reply
  6. the_lumpster Reply
    • joboborab Reply
      • joboborab Reply
  7. Mark Reply
    • kumkum Reply
      • Mark Reply
  8. stevens.kevin123@hotmail.com Reply
  9. didier-e Reply
  10. didier-e Reply
    • kumkum Reply
  11. ats Reply
    • kumkum Reply
      • ats Reply
      • ats Reply
        • Kari Reply
          • hoggernick
  12. didier-e Reply
    • didier-e Reply
  13. ram Reply
  14. Kari Reply
    • kumkum Reply
      • kandiyohiv Reply
        • kumkum Reply
  15. kandiyohiv Reply
  16. Jan Fredrik Reply
  17. Jan Fredrik Reply
    • kumkum Reply
      • Jan Fredrik Reply
        • kumkum Reply
          • Jan Fredrik
          • kumkum
    • kumkum Reply
  18. Ariel Reply
    • kumkum Reply
      • Ariel Reply
  19. Ariel Reply
    • kumkum Reply
  20. Morten Reply
  21. Jose Miguel Reply

Leave a Reply

Your email address will not be published. Required fields are marked *