HACKING WD My World Hard Drive
HACKING WD My World Hard Drive
HACKING WD My World Hard Drive
com/install-clean-hdd-in-white-light-my-book-world-edition
Summary
• this tutorial is for white light single disc drives WDH1NCxx000E only (for WDH2NCxx000E see
footnote)1
• Build a firmware image from scratch: you need only a file of 945-Byte and a online connection to
the update server from Western Digital!!
• From an WD_MyBook_Firmware_download_V 1.00.16 extract the stuff that counts
• Connect your new disk to a Linux-PC (I'm using Windows with Vmware "Ubuntu 9.10") and copy
the stuff you extracted to the new disk
• You must only copy the scripts to your terminal (root). Nothing must be changed (except /dev/sd?)
• Take the new disk and stick it in the MyBook
• While first booting the Mybook goes to factory reset and make the XFS file system on sda4 with all
shares!
Attention:
• This way works with disk of every size and disk of every vendor.
• this script kills all data on sdb4!!
• You get a fantasy MAC address. Don't simple change the MAC address. The kernel bootcmd is
protected by a check sum (you need fw_printenv with fw_env.config to change the mac).
I reverted to rev 14 and killed the changes of user sorinacke (see history). Two weeks ago I wrote him a
private message about his changes but he don't answered me. Please use the discuss thread at the end of this
page before you make major changes!
edit 14. Febr 2011: New offsets in part2 with firmware >= 01.01.18 !!
read in discussion feed the post from mikeywikey 13 Feb 2011
http://mybookworld.wikidot.com/forum/t-207498/install-clean-hdd-in-white-light-my-book-world-edition
2. If you build your arrays under ubuntu 10.10 (possibly anything with a 2.6 kernel)
then the
md superblock can be later than 0.90 (1.x, or 0.91 in some circumstances), this depends
on
your mdadm.conf, but forcing -e 0.90 will ensure an older superblock - you would not
get this
issue under the version of unbuntu in the guide.
http://websupport.wdc.com/firmware/list.asp?type=WDH1NC&fw=01.00.02
# check md5sums
cd ./fw
md5sum -c md5sum.lst
cd ..
part2: build the boot partition
# download 945 extra Bytes with the MBR, the stage1 and the MAC-address (kernel
bootcmd)
wget http://mybookworld.wikidot.com/local--files/install-clean-hdd-in-white-light-my-
book-world-edition/mbr_mac.tar.gz
tar -xzf ./mbr_mac.tar.gz -C ./fw
# remove UPGRADE_FLAG
echo -ne '\x00\x00\x30' | dd of=/dev/sdb seek=255
sync
# mount
mkdir ./sdb1
mkdir ./sdb3
mkdir ./rootfs
mount -o rw,noatime /dev/md0 ./sdb1
mount -o rw,noatime /dev/md3 ./sdb3
mount -o loop,ro,noatime ./fw/rootfs.arm.ext2 ./rootfs
# set the factory_restore flag -> thats rebuild a clean (=deleted!!!) md2/sda4 after
reboot
touch ./sdb1/etc/.factory_restore
Here is a part for user of non WD disk. You must hack the factoryDefault.sh
… and if your disk size not 1TB then correct the MBR…
# if you use not the original WD 1TB disk now correct the size of sda4
# fdisk reads lines of the form <start> <size> <id> <bootable>
# When a field is absent or empty, a default value is used.
# The default value of size is as much as possible
# (until next partition or end-of-disk).
echo 4,244,fd>DSKPART
echo 248,32,fd>>DSKPART
echo 280,123,fd>>DSKPART
echo 403,,fd>>DSKPART
/sbin/sfdisk --force /dev/sdb <./DSKPART
sync
Footnotes
1. For upgrading white-light dual disk drives WDH2NCxx000E http://mybookworld.wikidot.com/forum/t-
311495/success-report-upgrading-mbweii-white-light-from-2tb-to-4tb#post-1011695 or Ultra Fast Install for
My Book World Edition I and II (White Light) of any disk size