fvdw-sl on WD My Cloud

Re: fvdw-sl on WD My Cloud

Postby matt_max » Sun Aug 21, 2022 8:14 pm

I've done all the steps:
Code: Select all
mdadm --stop /dev/md127 (because array was autoassemble on my linux machine)
mdadm --assemble --update-minor /dev/md0 /dev/sdb1 /dev/sdb2 (to recreate metadata with correct md0)
mkefs -t ext3 -m 1 /dev/md0 (to format partition)
mount -t ext3 /dev/md0 /mnt/wd
tar -xvf /p10rootfs.tar.gz -C /mnt/wd (to extract all files and directories)

Then I've checked that there was link /sbin/init -> /bin/busybox (and it has execute permissions). After that I've unmount partition
Code: Select all
umount /mnt/wd

...and stop array with
Code: Select all
mdadm --stop /dev/md0

After I reconnect disc to wd and start it - nothing has changed. There is still same error. Here is the output from terminal.
matt_max
Donator VIP
Donator VIP
 
Posts: 124
Joined: Fri Apr 03, 2015 9:56 am
Location: Warsaw, Poland

Re: fvdw-sl on WD My Cloud

Postby fvdw » Sun Aug 21, 2022 8:23 pm

Your tar command is wrong you should use
Code: Select all
tar -xzvf ...
as it is a gz compressed archive.
As result the archive is not extracted properly
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: fvdw-sl on WD My Cloud

Postby matt_max » Sun Aug 21, 2022 8:33 pm

It doesn't really matter. When I repeat all steps and extract file with tar -xzvf ... the output from console looks the same.
matt_max
Donator VIP
Donator VIP
 
Posts: 124
Joined: Fri Apr 03, 2015 9:56 am
Location: Warsaw, Poland

Re: fvdw-sl on WD My Cloud

Postby fvdw » Sun Aug 21, 2022 8:45 pm

odd... :scratch

Then we need to verify if my binaries can run on this kernel.

For that you need to put back the root fs of WD on /dev/md0
Also put the p10rootfss.tar.gz file in the root folder of the root file system of WD

Boot the the wdcloud and when it succeeds look if you can find the p10rootfs.tar.gz file.
If found make a folder with name /chroot
Extract the p10rootfs archive in this folder /chroot
Then perform this command
Code: Select all
chroot /chroot /etc/init.d/rcS

This should start a chrooted linux system. The output you get should be something like this
Code: Select all
root@fvdwsl-sg-pc:/ # chroot /chroot /etc/init.d/rcS
start rcS base wdcloud p10
mount proc
remount root file system rw
mount: can't find / in /proc/mounts
mount sysfs
start boot log
no boot partition sda1 or sda2 defined cannot load firmware
prepare telnet access
start telnet
------------------------
rcS-wdcloud base finished
------------------------
 list p10 boot.log file
start boot log
no boot partition sda1 or sda2 defined cannot load firmware
prepare telnet access
start telnet
rcS-wdcloud base finished
root@fvdwsl-sg-pc:/ #


If you don't get this output or error report goto folder /chroot/bin and execute
Code: Select all
./busybox --help
and see if it list the build in modules.
If that fails we have an issue..
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: fvdw-sl on WD My Cloud

Postby fvdw » Sun Aug 21, 2022 8:47 pm

I modified the command

Code: Select all
chroot /chroot /etc/init.d/rcS

I mentioned /ets/init.d/rcS this must be /etc/init.d/rcS
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: fvdw-sl on WD My Cloud

Postby matt_max » Sun Aug 21, 2022 9:03 pm

I'm sorry but still no luck:
Code: Select all
WDMyCloud:/# chroot /chroot /etc/init.d/rcS
Killed
WDMyCloud:/# chroot /chroot
chroot: failed to run command `/bin/bash': No such file or directory
matt_max
Donator VIP
Donator VIP
 
Posts: 124
Joined: Fri Apr 03, 2015 9:56 am
Location: Warsaw, Poland

Re: fvdw-sl on WD My Cloud

Postby fvdw » Sun Aug 21, 2022 9:09 pm

that is a problem from wd firmware not finding bash
Lets first test the binary
Did you try the command
Code: Select all
cd /chroot/bin
./busybox --help
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: fvdw-sl on WD My Cloud

Postby matt_max » Sun Aug 21, 2022 9:12 pm

It is some problem with binary:
Code: Select all
WDMyCloud:/# cd /chroot/bin/
WDMyCloud:/chroot/bin# ./busybox --help
Killed
WDMyCloud:/chroot/bin#
matt_max
Donator VIP
Donator VIP
 
Posts: 124
Joined: Fri Apr 03, 2015 9:56 am
Location: Warsaw, Poland

Re: fvdw-sl on WD My Cloud

Postby fvdw » Sun Aug 21, 2022 9:14 pm

mmm...lets see if you have ldd command
inside /chroot/bin
Code: Select all
ldd busybox


should give this
Code: Select all
root@fvdwsl-sg-pc:/chroot2/bin # ldd busybox
        libm.so.6 => /lib/libm.so.6 (0xb6f09000)
        libtirpc.so.1 => /usr/lib/libtirpc.so.1 (0xb6ee5000)
        libc.so.6 => /lib/libc.so.6 (0xb6da9000)
        /lib/ld-linux.so.3 (0xb6fb8000)
        libnsl.so.1 => /lib/libnsl.so.1 (0xb6d8d000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xb6d6d000)
root@fvdwsl-sg-pc:/chroot2/bin #
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: fvdw-sl on WD My Cloud

Postby matt_max » Sun Aug 21, 2022 9:19 pm

Even strace is not very helpful here:
Code: Select all
WDMyCloud:/chroot/bin# strace -f ./busybox
execve("./busybox", ["./busybox"], [/* 20 vars */] <unfinished ...>
+++ killed by SIGKILL +++
Killed

But this file looks ok to me:
Code: Select all
WDMyCloud:/chroot/bin# file busybox
busybox: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, stripped
WDMyCloud:/chroot/bin#

And ldd is even stranger:
Code: Select all
WDMyCloud:/chroot/bin# ldd  ./busybox
        not a dynamic executable
WDMyCloud:/chroot/bin#

What is going on here :dontknow
matt_max
Donator VIP
Donator VIP
 
Posts: 124
Joined: Fri Apr 03, 2015 9:56 am
Location: Warsaw, Poland

PreviousNext

Return to Development

Who is online

Users browsing this forum: No registered users and 6 guests