[HOW TO] recover/unbrick/reset the WD Mybook (While Light) - Possible scenarios
Forum » Forum / My Book World Edition (white light) » [HOW TO] recover/unbrick/reset the WD Mybook (While Light) - Possible scenarios
Started by: anpe008anpe008
On: 1250273507|%e %b %Y, %H:%M %Z|agohover
Number of posts: 5
rss icon RSS: New posts
Summary:
reboot / general webgui reset / soft reset (reset button on the back) / hard reset (soft reset while powering up) / manual webgui firmware upgrade / forced manual firmware upgrade via console / default webgui reset / Recovery outside of the box (External recovery)
[HOW TO] recover/unbrick/reset the WD Mybook (While Light) - Possible scenarios
anpe008anpe008 1250273507|%e %b %Y, %H:%M %Z|agohover

Actual Version: v 1.1

Version History:

  • v1.1 - Added "simple Unbrick Tool" option for the White Light Mybook Single Drive (thanks TeinturMan).
  • v1.0 - Initial guide

The background:
I had the following 2 errors when I have tried to log-in in the web admin interface (webgui) in the white light mybook:

XML error: no wixnas object found!

—> Thread: http://mybookworld.wikidot.com/forum/t-165054/default-webserver-error

XML error: no wixnas object found! Warning: Unknown(): write failed: No space left on device (28) in Unknown on line 0 Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0.

—> Thread: http://mybookworld.wikidot.com/forum/t-171648/xml-error:no-wixnas-object-found

It turned out that the root of the problem was that i have run out of space in the NAS and the webgui config.xml corrupted (size became 0 byte) and the worst was that it seemed that the my shares folders were 0 byte as well. I though i lost all my data.
—> Post: http://mybookworld.wikidot.com/forum/t-171648/xml-error:no-wixnas-object-found#post-556972

I have tried many things to recover the share folders and access to the webgui again. Thanks frater and TeinturMan for helping out. I am writing this guide based on my experience to help out others that have the same problem.


Table of Content:

  • I) Different reset types/levels and their impact
  • II) Possible scenario table to indentify what reset types you can use in your current situation
  • III) Extra info: admin password reset, Useful commands in telnet

I) Different reset types/levels and their impact
Generally, the higher the reset level is, the more impact and more modification you have on the current NAS configuration, settings. It is recommended to fix your problem by going from reset level 1 to level 8, after each other, and go one step ahead if the current level could not fix your problem. (I went up till level 6. :) )

3821168614_ee75202d9a.jpg

I/1) Reboot: This is the easiest one. Simply reboot the NAS. This is the same as you would go to Start/Restart Windows. Two ways to execute it:
a) in console type:

reboot

b) in webgui: Shoutdown/Reboot icon then Reboot

I/2 General webgui reset: Advanced mode/Restore Configuration/”General Restore” button
Selecting General Restore will restore all features to previously saved settings (data volume and shares settings excepted). All current system configurations will be lost (shares are untouched) and the device automatically reboots after the restore process. Do not mixed it up with the "Restore Default Configuration " option in the page!

3820363777_106a948d08.jpg

I/3 Soft reset (reset button on the back): Same as "I/2: general webgui reset" just it is executed by holding down the reset button at the back of the NAS at least for 10 sec when it is running. If the soft reset was successful the NAS reboots.

3820363887_bcdf7823bc.jpg

I/4 Hard reset (soft reset while powering up): Shutdown the NAS. Unplug the ethernet and the power cable. Plug in the power cable. While the NAS is powering up hold the reset button at the back for at least 40 sec. Plug the ethernet cable back. Start the NAS.

I/5 Manual webgui firmware upgrade: go to my other guide to Point 1 "Update firmware”
http://mybookworld.wikidot.com/forum/t-165210/how-to-set-up-wd-mbwe-white-light-properly-transmission-1-72-automate-and-manage-torrents

I/6: Forced manual firmware upgrade via console:
This is what i missed in the forum the most: to upgrade the firmware from console if weggui can not be accessed and want to keep my shares content as well.
Thread: http://mybookworld.wikidot.com/forum/t-163874/manual-firmware-upgrade

Steps:

wget -O unpack_fw http://wd.mirmana.com/unpack_fw.sh
sh unpack_fw

This will download firmware from WD's site.
To start the upgrade process you enter the command:

nohup /var/upgrade/upgrade1.sh &

and wait……

I/7 Default webgui reset (Restore Default Configuration): Advanced mode/Restore Configuration/” Restore Default Configuration” Button
Restoring the device to the Factory Default will destroy all data on the device, including all configuration setup, all shares, and all user data and media files. After the restore is complete, the device configuration will be identical to its state at purchase (“virgin”). To use the device, the initial setup will have to be performed again. The LAN settings (including port settings) are not changed. After the reset, the administrator login/password will be changed to “admin/admin.”

3821168458_5e8d1639be.jpg

I/8: Recovery outside of the box (External recovery): If worst come to the worst and neither of the previous points solved your problem you have to perform external recovery. You will need to take the hdd out of your mybook, connect it to a PC/laptop,
1) run a ubuntu live cd and recovery/fix the errors in linux. Thread: http://mybookworld.wikidot.com/forum/t-171834/my-book-world-edition-white-unbrick-guide
2) use "Unbrick Tool" for the White Light Mybook Single Drive under XP to rewrite the 3 system partitions of the Mybook with new ones (using the windows dd version) and keep the Data partition (4th) untouched.
Post: http://mybookworld.wikidot.com/forum/t-171834#post-577456
Detailed description: http://highlevelbits.free.fr/index.php?option=com_content&view=article&id=107

II) Possible scenario table to identify what reset types you can use in your current situation

3821168548_1950b08e79.jpg

III) Extra info:
III/1 admin password reset: http://mybookworld.wikidot.com/forum/t-175057/can-not-log-in-into-webadmin-gui-w-admin-admin-after-hard-reset

III/2 Useful commands in telnet:

cat /var/log/messages – check system log
cat /etc/group – list groups
cd /ect/init.d
cat /etc/version – list current firmware version
ncdu – disk usage
/opt/bin/ipkg update - Update list of available packages
/opt/bin/ipkg upgrade - Upgrade all installed packages to latest version
/opt/bin/ipkg/install <pkg> - Download and install <pkg> (and dependencies)
ls –lah - List information about the FILEs (the current directory by default), -lah=use long listing format. show all files, sizes in human readable format
pwd – list current path
reboot - reboot
top – list running process
df -h – list mounted filsystems to check their size/used%
sfdisk -l - list partitions of each device
ps -efu root – list all processes, full output format, by effective user ID (supports names)
rm -rf [dir] – delete folder
passwd – change admin password
dmesg – prints the message buffer of the kernel

Endword:
If you know another way then the above-mentioned options or if something is not correct please free to post it .

last edited on 1252258544|%e %b %Y, %H:%M %Z|agohover by anpe008 + show more
Re: [HOW TO] recover/unbrick/reset the WD Mybook (While Light) - Possible scenarios
tomas123tomas123 1251922809|%e %b %Y, %H:%M %Z|agohover

Some comments to point
I/6: Forced manual firmware upgrade via console

Here is my full console output. I must start the script with "sh unpack_fw" not "unpack_fw.sh".

/ # wget -O unpack_fw http://wd.mirmana.com/unpack_fw.sh
--21:59:52--  http://wd.mirmana.com/unpack_fw.sh
           => `unpack_fw'
Resolving wd.mirmana.com... 85.191.0.241
Connecting to wd.mirmana.com|85.191.0.241|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1,500 (1.5K) [application/octet-stream]

100%[============================================================================>] 1,500         --.--K/s

21:59:52 (192.31 KB/s) - `unpack_fw' saved [1500/1500]

/ # ls
CacheVolume    bin            linuxrc        opt            sbin           trustees       var
Configuration  dev            lost+found     proc           shares         twonky
DataVolume     etc            mnt            proto          sys            unpack_fw
ExtendVolume   lib            nfs            root           tmp            usr
/ # sh unpack_fw.sh
sh: Can't open unpack_fw.sh
/ # sh unpack_fw
--22:01:28--  http://cache.websupport.wdc.com/wdhxnc-01.00.16.img
           => `/var/upgrade_download/test_fw.img'
Resolving cache.websupport.wdc.com... 81.22.37.106
Connecting to cache.websupport.wdc.com|81.22.37.106|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 48,864,982 (47M) [text/plain]

100%[============================================================================>] 48,864,982   660.94K/s    ETA 00:00

22:02:40 (666.28 KB/s) - `/var/upgrade_download/test_fw.img' saved [48864982/48864982]

Now run "nohup /var/upgrade/upgrade1.sh &"
/ # nohup /var/upgrade/upgrade1.sh &
/ # nohup: appending output to 'nohup.out'

The script works fine.
After the reconnect I found a clean mybook.

For the reason, that wd.mirmana.com is offline - Here is the full listing of unpack_fw.sh

#!/bin/sh

UPGRADE_DIR="/var/upgrade"
fw_dir="/var/upgrade_download"
fw_img="test_fw.img"
tmp_img1="$fw_dir/img.tmp.1"
tmp_img2="$fw_dir/img.tmp.2"

# Make the download directory
mkdir $fw_dir
cd $fw_dir

# download the latest firmware - also see /proto/SxM_webui/admin/fw_chk.php
wget http://cache.websupport.wdc.com/wdhxnc-01.00.16.img -O $fw_dir/$fw_img

# "decode" the firmware image
dd skip=0 count=1 bs=5120 if=$fw_dir/$fw_img of=$tmp_img1 2>/dev/null
dd skip=15 count=1 bs=5120 if=$fw_dir/$fw_img of=$tmp_img2 2>/dev/null
cp $fw_dir/$fw_img $fw_dir/$fw_img.orig
dd seek=0 count=1 bs=5120 if=$tmp_img2 of=$fw_dir/$fw_img 2>/dev/null
dd skip=1 seek=1 bs=5120 if=$fw_dir/$fw_img.orig of=$fw_dir/$fw_img 2>/dev/null
cp $fw_dir/$fw_img $fw_dir/$fw_img.orig
dd seek=15 count=1 bs=5120 if=$tmp_img1 of=$fw_dir/$fw_img 2>/dev/null
dd skip=16 seek=16 bs=5120 if=$fw_dir/$fw_img.orig of=$fw_dir/$fw_img 2>/dev/null
# clean up the "decoding"
rm $tmp_img1
rm $tmp_img2
rm $fw_dir/$fw_img.orig
# unpack the image
tar zxf $fw_img -C $fw_dir
# check if md5sum matches
md5sum -c upgrd-pkg-1nc.wdg.md5 > /dev/null 2>&1
if [ "$?" -ne 0 ]; then
    echo "md5sum of upgrd-pkg-1nc.wdg does not match"
    exit 3
fi
# execute the file - it unpacks itself to /var/upgrade
$fw_dir/upgrd-pkg-1nc.wdg
# check md5sums
cd $UPGRADE_DIR
md5sum -c md5sum.lst > /dev/null 2>&1
if [ "$?" -ne 0 ];then
    echo "some checksum error in md5sum.lst"
    exit 5
fi
# then run upgrade script
echo "Now run \"nohup $UPGRADE_DIR/upgrade1.sh &\""

Thanks to the great work of bleep!!
last edited on 1251923326|%e %b %Y, %H:%M %Z|agohover by tomas123 + show more
Re: [HOW TO] recover/unbrick/reset the WD Mybook (While Light) - Possible scenarios
anpe008anpe008 1252005757|%e %b %Y, %H:%M %Z|agohover

thanks the feedback and the console.
i corrected the command

Re: [HOW TO] recover/unbrick/reset the WD Mybook (While Light) - Possible scenarios
tomas123tomas123 1258455803|%e %b %Y, %H:%M %Z|agohover

bleep wrote a improved unpack_fw.sh script with a firmware autodetect feature:

http://zeroone.homeunix.net/~blip/comp/mbwe/

#!/bin/sh
# unpack_fw.sh    - written by blip@zeroone.homeunix.net
# Changelog:
# 21.09.2009: Added autodetect of newest firmware version - Blip
# 04.09.2009: Corrected the bug mentioned my frater. Thank you, frater.

# Uncomment this if you want to force a specific URL
#FIRMWARE_URL="http://cache.websupport.wdc.com/wdhxnc-01.00.16.img"

# only change if you know what you are doing. upgrade1.sh relies on this.
UPGRADE_DIR="/var/upgrade"

fw_dir="/var/upgrade_download"
fw_img="test_fw.img"
tmp_img1="$fw_dir/img.tmp.1"
tmp_img2="$fw_dir/img.tmp.2"

# Make the download directory
if [ ! -d $fw_dir ]; then
    mkdir $fw_dir
    if [ "$?" -ne 0 ]; then
        exit 1
    fi
fi
cd $fw_dir

# If no firmware URL is given, try autodetect as in /proto/SxM_webui/admin/fw_chk.php
if [ -z $FIRMWARE_URL ]; then
    echo "Firmware URL is not set, trying autodetect"
    MODNUM=`cat /etc/modelNumber`
    FWVERS=`cat /etc/version`
    URL="http://websupport.wdc.com/firmware/list.asp?type="$MODNUM"&fw="$FWVERS
    wget -o /dev/null -O $fw_dir/upgrade_link $URL
    if [ $? -ne 0 ]; then
        echo "Fetching firmware upgrade url failed"
        exit 1
    fi
    export FIRMWARE_URL=`cat upgrade_link |grep "upgrade file" |cut -d "\"" -f 2`
    if [ -z $FIRMWARE_URL ]; then
        echo "No upgrade found for firmware $FWVERS"
        exit 1
    fi
    rm $fw_dir/upgrade_link
fi

# download the latest firmware - also see /proto/SxM_webui/admin/fw_chk.php
wget $FIRMWARE_URL -O $fw_dir/$fw_img
if [ "$?" -ne 0 ]; then
    echo "firmware download failed"
    exit 2
fi
# "decode" the firmware image
dd skip=0 count=1 bs=5120 if=$fw_dir/$fw_img of=$tmp_img1 2>/dev/null
dd skip=15 count=1 bs=5120 if=$fw_dir/$fw_img of=$tmp_img2 2>/dev/null
cp $fw_dir/$fw_img $fw_dir/$fw_img.orig
dd seek=0 count=1 bs=5120 if=$tmp_img2 of=$fw_dir/$fw_img 2>/dev/null
dd skip=1 seek=1 bs=5120 if=$fw_dir/$fw_img.orig of=$fw_dir/$fw_img 2>/dev/null
cp $fw_dir/$fw_img $fw_dir/$fw_img.orig
dd seek=15 count=1 bs=5120 if=$tmp_img1 of=$fw_dir/$fw_img 2>/dev/null
dd skip=16 seek=16 bs=5120 if=$fw_dir/$fw_img.orig of=$fw_dir/$fw_img 2>/dev/null
# clean up the "decoding"
rm $tmp_img1
rm $tmp_img2
rm $fw_dir/$fw_img.orig
# unpack the image
tar zxf $fw_img -C $fw_dir
# check if md5sum matches
md5sum -c upgrd-pkg-1nc.wdg.md5 > /dev/null 2>&1
if [ "$?" -ne 0 ]; then
    echo "md5sum of upgrd-pkg-1nc.wdg does not match"
    exit 3
fi
# execute the file - it unpacks itself to /var/upgrade
$fw_dir/upgrd-pkg-1nc.wdg
# check md5sums
cd $UPGRADE_DIR
md5sum -c md5sum.lst > /dev/null 2>&1
if [ "$?" -ne 0 ]; then
    echo "some checksum error in md5sum.lst"
    exit 5
fi
# then run upgrade script
echo "Now run \"nohup $UPGRADE_DIR/upgrade1.sh &\""

Any idea, how we can format a clean (new) HDD with this decoded parts of firmware?

last edited on 1258456056|%e %b %Y, %H:%M %Z|agohover by tomas123 + show more
Re: [HOW TO] recover/unbrick/reset the WD Mybook (While Light) - Possible scenarios
bleepbleep 1258468893|%e %b %Y, %H:%M %Z|agohover

Hi tomas123,

yeah, I am working on this… currently I am stuck on figuring out how exactly to install a
kernel on the HDD, maybe someone can help:
- I know how to compile the kernel and kernel modules
- However, it seems we need a "uImage" but "make uImage" fails because there is no "mkimage" command
- I found the source for "mkimage" in kernel/kernel-source/vendor/u-boot/tools but did not manage to compile it yet
Yes, I know there allready is a kernel image in the unpacked upgrade, but I need to know this anyway.
I further would like to know if u-boot also would accept a modified kernel image (lets say, a more recent kernel version with some bugs fixed) without the need
to modify the u-boot loader itself. Any help on this will be very appreciated.

Bleep

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