Backup Images Of Mybook

Discuss this here

Before starting, the MBR included in the files are incorrect, for the mbr, please use the link at the bottom of this post.

What is this
These are backups of a brand new, never booted, Western Digital MyBook World Edition 500GB (single drive not II) Since the only way people as of creating these have to restore a bricked MB WE is to rebuild a Debian edition using the sources available which takes a long time and is confusing to many. I decided to open up an brand new one and rip the hard disk images, partition table, master boot record, and complete file systems keeping all permissions. The Firmware is 01.01.18. I used System Rescue CD, to obtain access to the drives. Running PartImage fails, so I used DD.


Disclaimer
I have not tested that these work to restore a bricked system or if they will work on other sizes or the two disk version. So in essence, you screw it up by using any part of this… it's your fault, I take no blame. I would suggest you have Linux knowledge prior to using or attempting to use these. Of course, if you took the risk of hacking your MyBook World, then you should have already known this. I guestimate that these should be able to recreate a fresh out of the box MyBook World Edition. I am not your tech support, so don't try to contact me for it. Post to the forum, and if I can I will try to help.


Conversion Table from Mounted Drive to Actual WD FS

Name Partition Type Partition Size File System Mounted On
sda1 ext3fs 2.80 GiB /dev/root and rootfs /
sda2 swap (v1) 101.98 MiB
sda3 ext3fs 964.84 MiB /dev/md3 /var
sda4 ext3fs 461.89 GiB /dev/md4 /shares/internal

Files
- Master Boot Record -

  • SDA_MBR

This was acquired by running "dd if=/dev/sda of=sda_mbr bs=512 count=1"
You would restore this by "dd if=sda_mbr of=/dev/sda bs=512 count=1"

- Partition Table -

  • SDA_PTAB

This was acquired by running "sfdisk -d /dev/sda > sda_ptable"
You would restore this by "sfdisk /dev/sda < sda_ptable"

- BitByBit Disk Copies -
(These are exact copies of the partitions and will extract to be the partition size)

  • SDA1_IMA.BZ2
  • SDA2_IMA.BZ2
  • SDA3_IMA.BZ2
  • SDA4_IMA.BZ2

These were acquired by running "dd if=/dev/sda1 | bzip2 > sda1_image.bz2" on each partition where sda1 is sda1-sda4
You would restore this by "dd if=sda1_ima of=/dev/sda1", however since I piped them out as bzip2 files you will need to pipe in the std out of bzip into dd. I can't remember the command line options at this time.
WARNING: SDA4_IMA.BZ2 will extract to 461.89 GiB, as each file will extract to its original partition size.

- File System Dump Containing Permissions -
(These contain the file system for each partition while keeping full fs permissions)

  • SDA1FILE.TAR.gz
  • SDA3FILE.TAR.gz
  • SDA4FILE.TAR.gz

This is acquired by mounting each partition as read-only as ext3 and tar/gzipping them with permissions. I can't quite remember which command options I did at the time.
You would restore these by mounting the partition and just extracting and writing over your files in your partition as root. You may need to delete other files you have created that are not in the archive, especially in your init.d.
You can also grab the files you may have corrupted individually as this is a copy of the files and structure. When mounting the FS you need to specify the type as ext3. Auto will detect the raid configuration and is unable to mount.


File Downloads
The files are packaged as 7Zip Archives, use 7-Zip or WinRar

Since I am not positive about storing these files and Western Digital's EULA, I posted them on rapidshare.

Please mirror and post here. Posting back to rapidshare is pointless unless you reencode them in another compression format, as once a file is deleted, so is it's hash.


This first link is probably the one everyone will probably use. It contains the file structures (with the files) with the mbr and partition table.

  • SDA1FILE.TAR.gz
  • SDA3FILE.TAR.gz
  • SDA4FILE.TAR.gz
  • SDA_MBR
  • SDA_PTAB
  • ReadMe.pdf
  • ReadMe.txt

WD_MYBOOK_WE_500GB_FILE.7z (59MiB)


This link will probably not be used by many. It contains the raw disk images with the mbr and partition table.

  • SDA1_IMA.BZ2
  • SDA2_IMA.BZ2
  • SDA3_IMA.BZ2
  • SDA4_IMA.BZ2
  • SDA_MBR
  • SDA_PTAB
  • ReadMe.pdf
  • ReadMe.txt

WARNING: These expand to the 500GB, mostly of empty space.
WD_MYBOOK_WE_500GB_IMA.7z (57MiB)
I forgot to include SDA3_IMA.BZ2… please get it from here SDA3_IMA.BZ2 (19k)


The Master Boot Record of the above files might be wrong. It is probably from a /dev/hda device since this paramater was also used in the description and the MD5 sum was not the same as that of another MyBook WE 500GB device (see discussion in forum). Added to this page is a separate sda_mbr file from an out of the box 500GB harddisk from a WD MyBook WE 500GB firmware 01.01.18. (md5sum sda_mbr : be250799bf981aec0fc38a76b5a404b7_.
sda_mbr

(Since wikidot tells browsers this is a text file, please save the file directly from the link or use wget to download it.)


It is possible to restore a bricked MBWE from these files. A step-by-step guide to how I did mine:

  1. Download the "Image" files from above (the one ending in IMA).
  2. Decompress the "7z" file into a new folder, and transfer these over to your Linux box somewhere.
  3. Attach the S-ATA drive from the MBWE to the Linux system (some older systems will require drivers, etc., for S-ATA, but certainly OpenSuse10.3 supports common adapters right from the install DVD). You will probably find using dmesg that it is named sda or similar.
  4. use fdisk to alter the partition types to 83 - this allows them to be mounted and read. Make NO other changes using fdisk. You may need to reboot the system at this point as the types have changed. If data recovery from the data partition is your objective, you may well be able to do this at this point by mounting /dev/sda4 (or whatever it's called in your system)
  5. if you need to replace the MBR of the disk, do it now, as described in the readme within the archive above.
  6. transfer the image from the downloaded file to the appropriate partition - on mine I only needed to replace sda1 (it was corrupted and wouldn't boot), but you may need to do all 4. Use a command such as this one: bzip2 -cd SDA1_IMA.BZ2 | dd of=/dev/sda1 (-c is to force stdout and d is to force decompression. Then it is just passed to dd that writes bit by bit into the partition) Remember to make sure that you're writing to the correct disk (as seen in dmesg above), and that you're using the correct input file and output partition.
  7. Once you have done that for the partitions you need, use fdisk to alter the partition types back to fd (linux raid), and save the changes back to the disk.
  8. Shut the system down, refit the drive to the MBWE and you should have a "fresh" MBWE ready to boot.

I used this last MBR (be250799bf981aec0fc38a76b5a404b7) to restore my bricked WD (v01.01.18). However, since the MBR was not the problem anyway I also had to restore the whole sda1 from the bit by bit copy. Here's the command I used as it is not given here:

bzip2 -cd SDA1_IMA.BZ2 | dd of=/dev/sda1

-c is to force stdout and d is to force decompression. Then it is just passed to dd that writes bit by bit into the partition.

I can tell you that both files (MBR and SDA1_IMA.BZ2) did work smoothly.


Rather than use fdisk to change the partition types from fd to 83, why not just mount -t ext3 /dev/sda ~/RecoveryFolder?

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