Rescue ramdisk for TFTP needed (White Solid LED) or new barebox

Hi, 

I know I voided all warranty :slight_smile:

I soldered the UART cable to the correct pins so I can access the barebox.

Unfortunately after the last update my system went bust (misaligned libraries installed) and now the system will not reach the login prompt though the system is alive in some ways. No SSH access, I can provide console uart session dump.

My data is still all there but I would need to reinstall all the system (without loosing my data and my share settings).

If anyone could generate a rescue ramdisk image that could enable mounting of the md0 (sda1,sda2) etc… partitions and installation of a new mostly everything (not the parittion settings ( I am not sure where these are stored ) rootfs, that would be of great help to me in order to unbrick my unit.

Alternatively a new version of barebox could be a solution with all the nfs and tftp mount options

that have been removed from the WD barebox version.

Any other suggestions are welcome too of course.

Why not plug the drive into a linux system, grab ur files, and do the system restore via reset button?

tnynyn wrote:

Why not plug the drive into a linux system, grab ur files, and do the system restore via reset button?

I would if I could , however when trying with ubuntu 14.04 it claims the disk has an unknown filesystem 

if you know how to get passed that problem please let me know how. 

I did try a mdadm --assemble --scan  without success.

I now could reach the shell prompt by passing the “single” single user mode option to the linux kernel.

However the upgrade script complains there is not enough space to process with upgrade

I’ve got the unknown partition table problem too, the GPT (the partition table) written onto the HDD is simply invalid to most modern Linux distributions. You could try to recover a more or less valid GPT thanks to TestDisk and then mount the partition containing your files.

While I did not succeed yet in making a ramdisk or obtaining one I did the following things: 

  1. I opened the box
  2. I found serial ttl UART port on the motherboard
  3. I soldered a FTDI 3.3V TTL serial cable to it. 
  4. I started up a terminal with Default setting of serial port are 115200,8,n no hardware handshake
  5. I started the WD MyCloud up
  6. I stopped the barebox boot process to gain access to the barebox prompt (CTRL-C)
  7. I started a tftp server on another machine
  8. I put the uImage (kernel image) in there
  9. I issued the following command to barebox:
  10. dhcp
  11. tftp uImage-mycloud /dev/mem bootargs=“console=ttyS0,115200n8, init=/sbin/init”
  12. bootargs=“$bootargs root=/dev/md0”
  13. bootargs=“$bootargs rootfstype=ext3 raid=autodetect rw noinitrd single debug initcall_debug swapaccount=1 panic=3”
  14. bootargs=“$bootargs mac_addr=$eth0.ethaddr”
  15. bootargs=“$bootargs model=$model serial=$serial board_test=$board_test btn_status=$btn_status”
  16. bootm /dev/mem
  17. this enables the linux kernel to boot in single user mode.
  18. I could then see that my disk was OK and that everything was still there.
  19.  I used the /etc/init.d/mountDataVolume.sh in order to mount all partitions.
  20. I put the update.deb (sq) file into /CacheVolume/
  21. I issued the following command /usr/local/sbin/updateFirmwareFromFile.sh /CacheVolume/update.deb
  22. The system was then restored and it now works but I can not see the existing shares in the UI , however I can see them in the SMB/CIFS world (network shares) and I can access them.

How can I make them appear in the WEB UI / Shares ?

original shares are located in /DataVolume and should be symlink to /shares

I had several occasions soft-bricking. Usually after dumping a fresh rootfs.img I would just do a factory restore (system only) to fix the webUI…

Yes they are linked already

lrwxrwxrwx 1 root root 18 Aug 1 18:24 shares → /DataVolume/shares

I am not using a fresh rootfs.img from Linux

I worked my way from a single user mode kernel booted loaded from TFTP server

@{ I found serial ttl UART port on the motherboard

I soldered a FTDI 3.3V TTL serial cable to it. }

Do you have a link or pict to share ? I plan do do that , btw do you also have SW1 missing on your board too ?

I made one:

The lines are soldered on the back (disk side) of the board, but you can see the order etc:

(The image was missing in my first edit:I expect it requires approval, didn’t know that…)

I soldered an CD-ROM Audio cable to the board, to the disk-side of the board:

(Gap)

Ground

White

Red

(Gap)

(nc)

And connected that to a 3,3V RS232 USB adapter labeled:

GND

Rx (White cable)

Tx( Red cable)

If the image works, it looks like this:

serial.jpg

About UART:  https://drive.google.com/file/d/0B_6OlQ_H0PxVYnhlc0dUU1NFQ1k/view?usp=sharing

Need ttl adaptor (Max232 chip for COM port or CP2102 for USB connection)

If you need - i prepare InitRD and all tools for unbricking device. (Tftpd can make all, what we need)

Thanks I was looking for a way to avoid soildering the board

So designed my own socket by recycling a PCI socket :slight_smile:

I documented it

For serial you also an other board like RPI and just wire Tx to Rx etc …

Will report how if you want

I did the same for my other box (as written in my other thread about the serial port):

Sadly I didn’t take any photos. The cable is still connected, but the box is closed already. I can alway connect the serial interface now, but currently it is just working…

Anyway:

If one get setup a TFTP Server and can compile the kernel, one can also compile a busybox, and then you don’t need to open the device at all: In the long term this is something that should avoid a lot of problems.

But of course it is easier to know what went wrong if one can see the messages on the serial port.

PS:

If you would like to take my pieces to your documentation I found out already or have written you can contact me directly.

There is waht you need

Works fine.

Further plans:
* To Make this emergency image loaded by default if the reset button is pressed.
* To Divide the MD raid and use 2nd partition as backup copy (Replace main (1th) partition with partition 2 if reset pressed more than once)

* Partition 6 not used, so i can use it for store my recovery image. Just need edit some bootscripts for autoload recovery image when reset button preseed)