I figured out a way to mount the file system.
Boot the device and login via ssh:
Using dd write the first 512kb of each partition to a file
dd if=/dev/sdd of=sdd.512k bs=512 count=1024
Scp the file off the device
Turn off the device, take out the drive, and mount it in your dock
Get the last sector of the partition and the sector size of the device and write these down using fdisk
fdisk /dev/sdb
Using DD write the last 4gB to a file
dd if=/dev/sdb of=last4.img bs=512 skip=7805579264 status=progress
Open sdd.512k in hxd and copy the bytes it starts with
Open last4.img in hxd and search for those bytes
Take the offset the nulls in sdd.512k start at convert from hex to decimal, divide by 512, and add it to the last sector of the partition
This number can then be used to mount the partition with losetup.
My drive has 7814037168 sectors, my partition ended at 7805579263, and the /dev/sdd partition started at 7809775616. So in my case the /dev/sdd partition starts 4196353 sectors from the start or 4261552 sectors from the end.
losetup -P -v -f -o $((7809775616*512)) /dev/sdb
show the mounts
losetup -a
fdisk /dev/loopNUMBER
mount the drive
mkdir /mnt/a
mount /dev/loop8p1 /mnt/a
Here are some instructions for doing this whole process with Linux:
Use gdisk to purge your new disk of a partition table:
gdisk /dev/sdc
then press ā x ā z ā y ā y
Create a new partition table use fdisk:
fdisk /dev/sdc
then press ā g ā n ā Enter ā Enter ā (Calculate and Type in Default - 8457136) ā y ā n ā Enter ā Enter ā Enter ā w
mkfs.exfat /dev/sdc1
Overwrite the second partition with 0ās. Control+C when it gets > 4gB
dd if=/dev/zero of=/dev/sdc2 status=progress
Use fdisk to remove the extra partition
fdisk /dev/sdc
then press ā d ā 2 ā w
Remove the drive and put it back in your WDWP
Format an SD Card to Fat32, put the firmware on it, and put it in your WDWP
Press and Hold the Power Button and .25 second to a .5 second press and hold the SD card button. Hold for 5-10 seconds.
When the hdd starts flashing it is copying data to the new drive. After about 10 min if it shuts off something failed.
If your new driveās serial number is >= 12 characters it should have succeeded
Try logging in with the 5th-12th characters of your drives serial number
On login your capacity will be wrong, you need to go to Admin ā Factory Reset ā System and Disk
With one final reboot, it should be good.
Once the drives were prepped. I was not able to swap between the old and new drives. I had to reformat and rerun the firmware update.
I tried fixing the scripts referencing a serial number and setting a static one, changing the md5, and rebuilding a new firmware, but I was unable to make the firmware installer run. Iāll probably need a uart cable to do more debugging.