How to Hack WD My Book Live

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

63 thoughts on “How to Hack WD My Book Live

  1. Hi,

    Can this be done in an already updated WD MyBook Live 2Tb?
    I want to use it to host my web page while I learn to program and to configure PostFix mail server

    1. Hi, elmany. Yes, as long as you can get root login, you can setup your web server on it. Let me know if you need any help.

    1. Hi, ubuntu

      Yes, it is normal for 800Mhz machine with 256MB RAM to backup and compress 1,2GB of data. It will take an hour.

      1. I do not know what’s being backed up, so my question is, what if I’ve already stored hundreds of Gb on the My Book, will this data too be backed up and compressed? That is, will it take days to complete step 3?

  2. When I attempt to do the apt-get install mysql-server mysql-client php5-mysql I get the following:
    Reading package lists… Done
    Building dependency tree
    Reading State information… Done
    Note, selecting mysql-server-5.0 instead of mysql-server
    Package mysql-server-5.0 is not available, but is refferred to by another package.
    This may mean that the package is missing, has been obsoleted, or is only available from another source
    E: Package mysql-server-5.0 has no installation candidate

    Its a MyBook Live 2TB and all the commands prior worked fine. Any ideas on how to get this to work?

          1. Yes. This tutorial is not using squeeze. Don’t do the sed command if you are using squeeze.

          2. I was following the Tutorial exactly. The sources.list file has the three lines above with # in front (Commented out)

            Its been a while since I did anything with Linux, so pardon my confusion.

            Should there indeed be a non commented line in the sources.list file and if so, what should its contents contain ?

          3. Just remove # character in sources.list file and run apt-get update.

            So sorry if my article make a confusion.
            Maybe I have to update my article to avoid this problem.
            Thanks.

  3. Hi!
    How do I reste MyBook to it’s original state after doing all of this (I am tryin gto learn more about Debian OS etc. hacking).

    1. Also have another question; I got the same error as chkstar when running “apt-get install mysql-server mysql-client php5-mysql”

      I took away the # before the three lines in the sources.list file.

      It upgraded but I got an error. (will post later)

      I can’t access my MyBook via http://www.wd2go.com, is this normal?

      1. I also can’t access my device via wd2go.com.
        Having problem in loading Java interface.
        I’m using Firefox browser. I haven’t try to use another browser.

  4. I am not using any of the other features of my 3rd generation MBL except the share creation. I need access to the share through a mapped drive, which has been accomplished in setup, but I also want intranet web access to the share for music and video streaming that needs to be able to see directories and files i.e. ht tp ://192.168.1.100/Media/ to give a listing of files and folders in the media share folder, without any authentication. I am ok with disabling the UI through SSH and only turning it on when needed.

    1. I needed the same thing. This is how I did it.

      ‘set up a share using UI’

      ‘go to http://device/UI/ssh to enable ssh’

      ‘ssh in’
      Username root
      Password welc0me

      cd /etc/apache2/sites-available/
      nano webshare
      ‘add this to the file and save’

      ServerAdmin webmaster@localhost

      DocumentRoot /DataVolume/shares/

      RewriteLog /var/log/apache2/rewrite.log
      RewriteLogLevel 0

      RewriteEngine On

      Options FollowSymLinks
      AllowOverride None

      Options Indexes FollowSymLinks MultiViews
      AllowOverride None
      Order allow,deny
      allow from all

      ErrorLog /var/log/mywebsite_error.log

      LogLevel warn

      cp wdnas wdnasbakup
      cp webshare wdnas
      a2enmod autoindex
      /etc/init.d/apache2 restart

      That’s it. Remember that your share is case sensitive.

      1. That just derped all my code for the webshare file, but it is the same as the tutorial, with the directory pointing to DataVolume/shares/ instead of DataVolume/shares/mywebsite

  5. Got apache and php successfully working (able to display a page with .

    However, having trouble with mysql. Specifically, the mysql_install_db command fails with the following:

    —–

    # mysql_install_db –user=mysql –basedir=/usr –datadir=/DataVolume/www/mysql_data
    Installing MySQL system tables…
    ERROR: 1 Can’t create/write to file ‘/DataVolume/www/mysql_data/mysql/db.MYI’ (Errcode: 13)
    120425 21:42:26 [ERROR] Aborting

    120425 21:42:26 [Note] /usr/sbin/mysqld: Shutdown complete

    —–

    Installation of system tables failed! Examine the logs in
    /DataVolume/www/mysql_data for more information.

    I checked permissions of mysql_data and the owner is mysql with group root. Attempted setting permissions to 777 with no success.

    Any ideas?

    1. Hi, Mark.
      Can you check mysql log for any error message?
      Maybe can check on /DataVolume/www/mysql_data or /var/log

      1. Late, but a follow up.

        Did not ever figure out what was wrong.

        But, a full reset back to factory settings and then resetting everything resulted in a successful install.

        Apache, MySQL, and PHP all working flawlessly now.

  6. hello
    My Book Live – New firmware 02.11.09-0?53 (4/23/12)

    i can’t install mysql, i have error.

    English is not my native
    Best regard

  7. Hello
    I again tried an installation with nas delivered in original configuration with the latest firmware02.11.09-0?53 (4/23/12) .
    Here is the message in Putty ..

    with section 1

    delcne:~# sed -ie “s/deb .* squeeze/#&/g” /etc/apt/sources.list
    delcne:~# apt-get update
    Reading package lists… Done
    delcne:~# apt-get install mysql-server mysql-client php5-mysql
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    E: Couldn’t find package mysql-server

    with section 2

    delcne:~# apt-get update
    Get:1 http://ftp.us.debian.org squeeze Release.gpg [1672B]
    Get:2 http://ftp.us.debian.org squeeze Release [111kB]
    Ign http://ftp.us.debian.org squeeze Release
    Get:3 http://ftp.us.debian.org squeeze/main Packages [6494kB]
    Fetched 6606kB in 28s (228kB/s)
    Reading package lists… Done
    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
    W: You may want to run apt-get update to correct these problems
    delcne:~#

    I still install mysql with the above error

    Unpacking php5-suhosin (from …/php5-suhosin_0.9.32.1-1_powerpc.deb) …
    Processing triggers for man-db …
    Errors were encountered while processing:
    /var/cache/apt/archives/php5-common_5.3.3-7+squeeze8_powerpc.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    delcne:~#

    Merci beaucoup de votre Aide/Thank you very much for your help

  8. Hi. I am using lenny. Source list as follow:

    deb http://archive.debian.org/debian-archive/debian/ lenny main contrib non-free
    deb-src http://archive.debian.org/debian-archive/debian/ lenny main contrib non-free
    deb http://archive.debian.org/debian-archive/debian-security/ lenny/updates main
    deb-src http://archive.debian.org/debian-archive/debian-security/ lenny/updates main
    #deb http://ftp.us.debian.org/debian/ squeeze main
    #deb http://ftp.us.debian.org/debian/ sid main
    #deb http://ftp.us.debian.org/debian/ experimental main

    I have errors in php5-mysql. Errors as below:

    The following packages have unmet dependencies:
    libapache2-mod-php5: Depends: php5-common (= 5.2.6.dfsg.1-1+lenny16) but 5.2.6.dfsg.1-1+lenny9 is to be installed
    php5-cli: Depends: php5-common (= 5.2.6.dfsg.1-1+lenny16) but 5.2.6.dfsg.1-1+lenny9 is to be installed
    php5-curl: Depends: php5-common (= 5.2.6.dfsg.1-1+lenny16) but 5.2.6.dfsg.1-1+lenny9 is to be installed
    php5-mysql: Depends: php5-common (= 5.2.6.dfsg.1-1+lenny16) but 5.2.6.dfsg.1-1+lenny9 is to be installed
    php5-sqlite: Depends: php5-common (= 5.2.6.dfsg.1-1+lenny16) but 5.2.6.dfsg.1-1+lenny9 is to be installed
    E: Unmet dependencies. Try ‘apt-get -f install’ with no packages (or specify a solution).

    How can I fix this?

    Thanks

      1. Hello. I tried adding the link, however, there are errors. I’ve browse the link but can’t find lenny. See errors below.

        Ign http://ftp.us.debian.org lenny Release.gpg
        Hit http://archive.debian.org lenny Release.gpg
        Hit http://archive.debian.org lenny/updates Release.gpg
        Ign http://ftp.us.debian.org lenny Release
        Hit http://archive.debian.org lenny Release
        Ign http://ftp.us.debian.org lenny/main Packages
        Hit http://archive.debian.org lenny/updates Release
        Ign http://ftp.us.debian.org lenny/main Packages
        Err http://ftp.us.debian.org lenny/main Packages
        404 Not Found [IP: 128.30.2.36 80]
        Ign http://archive.debian.org lenny/main Packages/DiffIndex
        Ign http://archive.debian.org lenny/contrib Packages/DiffIndex
        Ign http://archive.debian.org lenny/non-free Packages/DiffIndex
        Ign http://archive.debian.org lenny/main Sources/DiffIndex
        Ign http://archive.debian.org lenny/contrib Sources/DiffIndex
        Ign http://archive.debian.org lenny/non-free Sources/DiffIndex
        Ign http://archive.debian.org lenny/updates/main Packages/DiffIndex
        Ign http://archive.debian.org lenny/updates/main Sources/DiffIndex
        Hit http://archive.debian.org lenny/main Packages
        Hit http://archive.debian.org lenny/contrib Packages
        Hit http://archive.debian.org lenny/non-free Packages
        Hit http://archive.debian.org lenny/main Sources
        Hit http://archive.debian.org lenny/contrib Sources
        Hit http://archive.debian.org lenny/non-free Sources
        Hit http://archive.debian.org lenny/updates/main Packages
        Hit http://archive.debian.org lenny/updates/main Sources
        W: Failed to fetch http://ftp.us.debian.org/debian/dists/lenny/main/binary-powerpc/Packages 404 Not Found [IP: 128.30.2.36 80]

        E: Some index files failed to download, they have been ignored, or old ones used instead.

      2. Hi. Adding to my previous reply. It looks to me php5-common cannot be overridden for some reason or another. I have the .deb file for php5 lenny16, but it doesn’t seem to replace the previous version. See system feedback below:

        Reading package lists… Done
        Building dependency tree
        Reading state information… Done
        Correcting dependencies… Done
        The following extra packages will be installed:
        php5-common
        The following packages will be upgraded:
        php5-common
        1 upgraded, 0 newly installed, 0 to remove and 46 not upgraded.
        11 not fully installed or removed.
        Need to get 0B/374kB of archives.
        After this operation, 0B of additional disk space will be used.
        Do you want to continue [Y/n]? Y
        (Reading database …
        dpkg: warning: files list file for package `ramlog’ missing, assuming package has no files currently installed.

        dpkg: warning: files list file for package `libparted0′ missing, assuming package has no files currently installed.
        (Reading database … 23834 files and directories currently installed.)
        Preparing to replace php5-common 5.2.6.dfsg.1-1+lenny9 (using …/php5-common_5.2.6.dfsg.1-1+lenny16_powerpc.deb) …
        Unpacking replacement php5-common …
        dpkg: error processing /var/cache/apt/archives/php5-common_5.2.6.dfsg.1-1+lenny16_powerpc.deb (–unpack):
        trying to overwrite ‘/etc/cron.d/php5’, which is also in package wd-nas 01.00.01-69399
        Errors were encountered while processing:
        /var/cache/apt/archives/php5-common_5.2.6.dfsg.1-1+lenny16_powerpc.deb
        E: Sub-process /usr/bin/dpkg returned an error code (1)

          1. You probably need to force the previous (non-lenny) php5-common to install. Try this:

            dpkg -i –force-overwrite /var/lib/cache/archives/php5-common_5.3.3-7+squeeze8_powerpc.deb

            Then do:

            apt-get update
            apt-get -f install

            That may get you fixed up.

  9. hello it works but if I restart mysql mybook not working anymore I have the following error

    delcne:~# mysql_install_db –user=mysql –basedir=/usr –datadir=/var/lib/mysql
    Installing MySQL system tables…
    120816 18:30:20 [ERROR] /usr/sbin/mysqld: Table ‘./mysql/db’ is marked as crashe d and should be repaired
    120816 18:30:20 [Warning] Checking table: ‘./mysql/db’
    120816 18:30:20 [ERROR] 1 client is using or hasn’t closed the table properly
    120816 18:30:20 [ERROR] /usr/sbin/mysqld: Table ‘./mysql/user’ is marked as cras hed and should be repaired
    120816 18:30:20 [Warning] Checking table: ‘./mysql/user’
    120816 18:30:20 [ERROR] 1 client is using or hasn’t closed the table properly
    OK
    Filling help tables…
    OK

    To start mysqld at boot time you have to copy
    support-files/mysql.server to the right place for your system
    thank you again

    1. Hello after various handling I locked my My Book Live.
      Reinstalling Firmware and Restore factory default setting does not work.
      I saved on my PC 3 file Step 3 “3. System Backup and protect the udev update”.
      Can you help me restore my backups.
      Thank you again, then I do not touch anything and is more original

  10. Do you how to install gcc on MBL, though I was attempting several time, still no success. I want install gcc in order to get some packages installed on MBL.

  11. I am currently on PHP Version 5.2.6-1+lenny16 (using a western digital mybooklive)
    I’m trying to install GD support and did the following:
    apt-get install php5-gd
    /etc/init.d/apache2 restart
    Also tried apt-get update and then repeated the above with no luck.

    My knowledge is extremely limited so I’ve pretty much just tried pasting in a bunch of fixes I’ve found around the web but none of them have worked.

    Please help! I’m really stuck and not sure what else to try other than trying to reformat the drive and try again.

    What information should I provide to help troubleshoot?

    When I do apt-get install php5-gd
    ——————————————–
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    You might want to run `apt-get -f install’ to correct these:
    The following packages have unmet dependencies:
    libapache2-mod-php5: Depends: php5-common (= 5.2.6.dfsg.1-1+lenny16) but 5.2.6.dfsg.1-1+lenny9 is to be installed
    perl: Depends: perl-modules (>= 5.10.1-17) but 5.10.0-19lenny5 is to be installed
    php5-cli: Depends: php5-common (= 5.2.6.dfsg.1-1+lenny16) but 5.2.6.dfsg.1-1+lenny9 is to be installed
    php5-curl: Depends: php5-common (= 5.2.6.dfsg.1-1+lenny16) but 5.2.6.dfsg.1-1+lenny9 is to be installed
    php5-gd: Depends: libgd2-xpm (>= 2.0.36~rc1~dfsg) but it is not going to be installed
    Depends: php5-common (= 5.2.6.dfsg.1-1+lenny16) but 5.2.6.dfsg.1-1+lenny9 is to be installed
    php5-sqlite: Depends: php5-common (= 5.2.6.dfsg.1-1+lenny16) but 5.2.6.dfsg.1-1+lenny9 is to be installed
    E: Unmet dependencies. Try ‘apt-get -f install’ with no packages (or specify a solution).

    When I do apt-get -f install
    ——————————–
    (Reading database …
    dpkg: warning: files list file for package `ramlog’ missing, assuming package has no files currently installed.

    dpkg: warning: files list file for package `libparted0′ missing, assuming package has no files currently installed.
    (Reading database … 17255 files and directories currently installed.)
    Preparing to replace php5-common 5.2.6.dfsg.1-1+lenny9 (using …/php5-common_5.2.6.dfsg.1-1+lenny16_powerpc.deb) …
    Unpacking replacement php5-common …
    dpkg: error processing /var/cache/apt/archives/php5-common_5.2.6.dfsg.1-1+lenny16_powerpc.deb (–unpack):
    trying to overwrite ‘/etc/cron.d/php5’, which is also in package wd-nas 01.00.01-69399
    Errors were encountered while processing:
    /var/cache/apt/archives/php5-common_5.2.6.dfsg.1-1+lenny16_powerpc.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)

    When I do apt-get update
    —————————–
    Hit http://archive.debian.org lenny Release.gpg
    Hit http://archive.debian.org lenny/updates Release.gpg
    Hit http://archive.debian.org lenny Release
    Hit http://archive.debian.org lenny/updates Release
    Ign http://archive.debian.org lenny/main Packages/DiffIndex
    Ign http://archive.debian.org lenny/contrib Packages/DiffIndex
    Ign http://archive.debian.org lenny/non-free Packages/DiffIndex
    Ign http://archive.debian.org lenny/main Sources/DiffIndex
    Ign http://archive.debian.org lenny/contrib Sources/DiffIndex
    Ign http://archive.debian.org lenny/non-free Sources/DiffIndex
    Ign http://archive.debian.org lenny/updates/main Packages/DiffIndex
    Ign http://archive.debian.org lenny/updates/main Sources/DiffIndex
    Hit http://archive.debian.org lenny/main Packages
    Hit http://archive.debian.org lenny/contrib Packages
    Hit http://archive.debian.org lenny/non-free Packages
    Hit http://archive.debian.org lenny/main Sources
    Hit http://archive.debian.org lenny/contrib Sources
    Hit http://archive.debian.org lenny/non-free Sources
    Hit http://archive.debian.org lenny/updates/main Packages
    Hit http://archive.debian.org lenny/updates/main Sources
    Get:1 http://us.archive.ubuntu.com lucid-updates Release.gpg [198B]
    Get:2 http://us.archive.ubuntu.com lucid-updates Release [58.3kB]
    Get:3 http://security.ubuntu.com lucid-security Release.gpg [198B]
    Get:4 http://security.ubuntu.com lucid-security Release [57.3kB]
    Ign http://us.archive.ubuntu.com lucid-updates Release
    Ign http://us.archive.ubuntu.com lucid-updates/main Packages
    Ign http://us.archive.ubuntu.com lucid-updates/restricted Packages
    Ign http://us.archive.ubuntu.com lucid-updates/main Packages
    Ign http://us.archive.ubuntu.com lucid-updates/restricted Packages
    Err http://us.archive.ubuntu.com lucid-updates/main Packages
    404 Not Found [IP: 91.189.91.25 80]
    Err http://us.archive.ubuntu.com lucid-updates/restricted Packages
    404 Not Found [IP: 91.189.91.25 80]
    Ign http://security.ubuntu.com lucid-security Release
    Ign http://security.ubuntu.com lucid-security/main Packages
    Ign http://security.ubuntu.com lucid-security/restricted Packages
    Ign http://security.ubuntu.com lucid-security/main Packages
    Ign http://security.ubuntu.com lucid-security/restricted Packages
    Err http://security.ubuntu.com lucid-security/main Packages
    404 Not Found [IP: 91.189.92.190 80]
    Err http://security.ubuntu.com lucid-security/restricted Packages
    404 Not Found [IP: 91.189.92.190 80]
    Fetched 116kB in 6s (18.4kB/s)
    W: GPG error: http://us.archive.ubuntu.com lucid-updates Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5
    W: GPG error: http://security.ubuntu.com lucid-security Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5
    W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/lucid-updates/main/binary-powerpc/Packages 404 Not Found [IP: 91.189.91.25 80]

    W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/lucid-updates/restricted/binary-powerpc/Packages 404 Not Found [IP: 91.189.91.25 80]

    W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/lucid-security/main/binary-powerpc/Packages 404 Not Found [IP: 91.189.92.190 80]

    W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/lucid-security/restricted/binary-powerpc/Packages 404 Not Found [IP: 91.189.92.190 80]

    E: Some index files failed to download, they have been ignored, or old ones used instead.

    1. Your apt source contains repository of debian and ubuntu. Maybe this cause a problem. You can try remove ubuntu repo and try reinstall the package.

      apt-get update
      apt-get install php5-gd

      1. I tried again and made sure to only include lenny packages. I still get a lot of errors like this one:

        Depends: php5-common (= 5.2.6.dfsg.1-1+lenny16) but 5.2.6.dfsg.1-1+lenny9 is to be installed

        I kept trying different .deb files and doing apt-get clean && apt-get update but it wasn’t helping.

        Then I noticed the following error said something about a file used in the “wd-nas” package. So that got me thinking all of my problems (which none of the forums like this one seem familiar with) might have something to do with my firmware version.

        trying to overwrite ‘/etc/cron.d/php5?, which is also in package wd-nas 01.00.01-69399

        I downloaded a much older firmware and VOILA all of my packages installed successfully (mySQL server, client, phpadmin, php5-gd). BUT — the WD UI no longer functions properly. It loads but then none of the menu links take me to the menu pages, it just keeps redirecting me back to the UI homepage.

        I’m going to try other firmware versions and see if I can find the sweet spot. Any thoughts on my theory or plan?

  12. I followed these instructions exactly except my sources.list was empty except for the 3 commented-out squeeze lines. I added the following line per instructions from wikidot:
    deb http://archive.debian.org/debian/ lenny main

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

    But then I got many unmet dependencies errors (for example):
    php5-mysql: Depends: php5-common (= 5.2.6.dfsg.1-1+lenny16) but 5.2.6.dfsg.1-1+lenny9 i s to be installed

    So then I added:
    deb http://ftp.us.debian.org/debian/ lenny main
    # apt-get update

    But then the following errors:
    Ign http://ftp.us.debian.org lenny Release.gpg
    Ign http://ftp.us.debian.org lenny Release
    Ign http://ftp.us.debian.org lenny/main Packages
    Ign http://ftp.us.debian.org lenny/main Packages
    Err http://ftp.us.debian.org lenny/main Packages
    404 Not Found [IP: 64.50.233.100 80]
    Get:1 http://archive.debian.org lenny Release.gpg [1034B]
    Hit http://archive.debian.org lenny Release
    Err http://archive.debian.org lenny Release

    Get:2 http://archive.debian.org lenny Release [99.6kB]
    Ign http://archive.debian.org lenny Release
    Ign http://archive.debian.org lenny/main Packages/DiffIndex
    Hit http://archive.debian.org lenny/main Packages
    Fetched 101kB in 1s (60.7kB/s)
    W: GPG error: http://archive.debian.org lenny Release: The following signatures were inva lid: KEYEXPIRED 1337087218 The following signatures couldn’t be verified because the publ ic key is not available: NO_PUBKEY AED4B06F473041FA
    W: Failed to fetch http://ftp.us.debian.org/debian/dists/lenny/main/binary-powerpc/Packag es 404 Not Found [IP: 64.50.233.100 80]

    E: Some index files failed to download, they have been ignored, or old ones used instead.

    Any suggestions?

  13. Hi! Thanks for the guide.

    I think I did something wrong and now the UI is acting very weird. The SSH/FTP access is working great, but when I try to access any sub-page on the Web-UI I get the error: “33166 – Error retrieving share information: Internal server error. Retry your last operation. If the error persists, contact WD Support for assistance.”

    I cannot access utilities to do a factory reset, but i’ve got the backup from this guide – any chance to get it back to normal? Or do a factory reset from SSH?

      1. Still menu errors, do you know where to find a .deb file? Looks like the .deb files is removed from WD page

        1. OMG! You’re right. WD has removed the firmware download. Are you able to access upgrade page from web UI? If yes, execute this command before hand:

          # echo “02.01.06” > /etc/version

          1. I executed:
            echo “02.01.06? > /etc/version

            and the web UI shows:
            Version:MyBookLive .02.01.06. : Core F/W

            but I’m getting the message: Your firmware is up to date when i’m trying to update.

  14. Nice work.
    Sorry my question and my english too, all this work is done or can be done with the disc via USB adapter ?
    Thkz.

  15. budy if you dont mind here is my skype name: ariel.enr i really need help, im like lost in the space about it.
    thkz any way.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.