[GUIDE] Build a Custom Firmware

AS ALWAYS, STAY AWAY UNLESS YOU KNOW WHAT YOU ARE DOING

I AM NOT RESPONSIBLE FOR YOU BRICKING YOUR MYBOOKLIVE

I have found a better way to create a custom firmware.

(GUIDE 1) Create a custom rootfs.img that is installable via the custom resetButtonAction.sh script

(GUIDE 2) Package the custom rootfs.img file to a .deb file that is installable via the dashboard

______________________________________________________________________________________________________

(GUIDE 1)

  1. Install your mods to the MyBookLive from PuTTY, Terminal, and or WinSCP

  2. Once you have your MyBookLive setup the way you want it, login via PuTTY and issue one of the following commands

    dd if=/dev/md1 of=/DataVolume/shares/Public/rootfs.img

 If you get “dd: opening `/dev/md1’: No such file or directory” issue

dd if=/dev/md0 of=/DataVolume/shares/Public/rootfs.img
  1. You should end up with a file that is 1,999,808 KB (2,047,803,392 bytes)

  2. Copy rootfs.img from your Public share to your computer

  3. Use the following Guide to write your custom OS to your drive at anytime to go back to the exact state it was in when you took the snapshot

http://community.wd.com/t5/My-Book-Live/GUIDE-How-to-write-a-custom-firmware-to-your-MBL/td-p/575563

  1. If you want to create a .deb file that is installable from the dashboard then please continue on to guide 2

If you have created any new shares since you created your custom firmware and ever need to restore your custom firmware, you will have to recreate those share names in the MyBookLive Dashboard to get back access to the data.

A reboot will be required to get the share usage numbers to show correctly
______________________________________________________________________________________________________

(GUIDE 2)

If you wish to create a custom installable .deb firmware file from the rootfs.img file you just created

  1. Download WinSCP from http://winscp.net/download/winscp510setup.exe

  2. Use WinSCP to SSH into the MBL and copy your custom rootfs.img to /CacheVolume

  3. Download PuTTY from http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe

  4. SSH into the MBL from PuTTY and issue

    MYBOOKLIVE:~# cd /CacheVolumeMYBOOKLIVE:/CacheVolume# md5sum rootfs.img > rootfs.md5MYBOOKLIVE:/CacheVolume#

  5. This will create an .md5 checksum file which you will need for a successful firmware install from the dashboard

  6. Open WinSCP again and go to /CacheVolume and right click and edit rootfs.md5 and delete the text “rootfs.img” after the hash

  7. The hash needs to be followed by 2 spaces and a dash… See below for example

    f98fb042f14bd14596881c6755b9a4a5 -

  8. Close and save the edited file

  9. Copy a factory MyBookLive deb to /CacheVolume using WinSCP

http://download.wdc.com/nas/apnc-023205-046-20120910.deb

  1. SSH in with PuTTY again and

    MyBookLive:~# cd /CacheVolume
    MyBookLive:/CacheVolume# dpkg-deb -x apnc-023205-046-20120910.deb updateFile
    MyBookLive:/CacheVolume# dpkg-deb -e apnc-023205-046-20120910.deb updateFile/DEBIAN

  2. This will extract a factory rootfs.img file and system control files to /CacheVolume/updateFile

  3. SSH in with WinSCP again and go to /CacheVolume/updateFile/CacheVolume/upgrade and delete rootfs.img and rootfs.md5

  4. Go back to /CacheVolume and move your modified rootfs.img and rootfs.md5 to /CacheVolume/updateFile/CacheVolume/upgrade

  5. SSH into the MBL with PuTTY again

    MyBookLive:~# cd /CacheVolumeMyBookLive:/CacheVolume# mkdir tmp
    MyBookLive:/CacheVolume# export TMPDIR=/CacheVolume/tmp
    MyBookLive:/CacheVolume# dpkg-deb -b updateFile updateFile.deb
    dpkg-deb: building package apnc' inupdateFile.deb’.

This will create a file called updateFile.deb in /CacheVolume

This process takes a good 15 minutes, but once it is done, PuTTY will come back to

MyBookLive:/CacheVolume#
  1. SSH in with WinSCP and copy updateFile.deb from /CacheVolume to your computer

This file can be installed right from the Dashboard

The Custom firmware file (02.32.05-046) will also install over the top of the same firmware version (02.32.05-046)

If you have created any new shares since you created your custom firmware and ever need to restore your custom firmware, you will have to recreate those share names in the MyBookLive Dashboard to get back access to the data.

A reboot will be required to get the share usage numbers to show correctly

2 Likes

Placeholder for MyBookLive Mod links

How to write a custom firmware to your MyBookLive

http://community.wd.com/t5/My-Book-Live/GUIDE-How-to-write-a-custom-firmware-to-your-MBL/td-p/575563

Enable FXP (Ftp to Ftp) transfers from one mybooklive to another (No data passes through your PC)

http://community.wdc.com/t5/My-Book-Live/GUIDE-Enable-FXP-transfers-between-2-MyBookLives/m-p/535436#M18266

Install Webmin NAS manager

http://community.wdc.com/t5/My-Book-Live/GUIDE-Install-Webmin-NAS-manager/td-p/536107

Instal SABnzbd 0.7.11

http://community.wdc.com/t5/My-Book-Live/GUIDE-Install-SABnzbd-0-7-11/m-p/550724#M20009

Remotely administer MyBookLive

http://community.wdc.com/t5/My-Book-Live-Duo/Can-you-remotely-administer-MyBookLiveDuo/m-p/548822#M3889

Hide shares from FTP

http://community.wdc.com/t5/My-Book-Live/How-can-I-hide-shares-from-FTP/m-p/550450#M19956

Local HTTP access to MBL files

http://community.wdc.com/t5/My-Book-Live/http-access-to-Public-files/m-p/550893#M20054

Reset button script that enables SSH

http://community.wdc.com/t5/My-Book-Live/GUIDE-Reset-Button-script-that-enables-SSH/m-p/490580#M15534

Speed tweak for Realtek NICS (Firmware 02.32.05-044 and higher)

http://community.wdc.com/t5/My-Book-Live/New-Release-My-Book-Live-Firmware-Version-02-32-05-044-9-5-12/m-p/465514#M13966

Netboot Acronis/Parted Magic/ Windows from a MBL (Router needs to allow you to edit dnsmasq)

http://community.wdc.com/t5/My-Book-Live/Netboot-Acronis-Parted-Magic-Windows-from-from-MBL/m-p/552434#M20197

Guide updated with a method that makes much more sense.
Post your MyBookLive MODS to the forum and PM me the link and I will add it to post 2

Modified guide

Updated the guide with some more mods :slight_smile: