Can someone help me? My pr4100 cannot restore WD original firmware after writing dsm in emmc

Now I can’t recover with the USB recovery stick.
Should be emmc partition data is destroyed
Can anyone help me to export the entire emmc image with the dd command?
Thank you everyone
@dswv42 can you help me?

You understand it wrong. I have written the dsm system to the wd pr4100 flash memory. But I forgot to back up the original firmware of wd! How to recover now? Can you provide me with the emmc image of the original pr4100? thank you very much

[quote=“dswv42, post:4, topic:227631”]
No, I can’t/won’t. The PR4100 emmc flash memory has several partitions, some of which contain sensitive information unique to each NAS device, including the serial number.

The only way to fix your PR4100 is to rec and format each partition, then upload the appropriate files to each partition. One could also boot to USB and use the rescue firmware to restore the factory

sorry, I do not know. I tried to repair the firmware with the recovery USB stick but it failed. Now emmc has only three partitions and no raw data. Does this mean that I can’t restore the wd system?

As for what you said to create a partition, I can understand the size of each partition? You mean that I only need to create these nine empty partitions, can I restore the original firmware with the recovery USB flash drive? No need to write some files in the emmc partition



Follow the prompts and I have created these partitions.

I followed the guide and made a recovery USB stick. Set the BIOS boot entry, but it cannot be booted from the USB stick. There is no way

What you said: Upload the corresponding file to each partition. What are the documents?


Now use the USB flash drive to start this prompt

I can use the recovery USB stick to boot and enter the web interface, but I seem to put the firmware into the USB stick and can’t use emmc to boot.

Did you go through the rescue menu that reinstalls the firmware?
Enable SSH and provide full output of

blkid

Show gdisk info on /dev/mmcblk (careful, don’t wipe it again!)

gdisk /dev/mmcblk0
p    # print
q    # quit

Install Entware (see wdcommunity.com) and get output of lsblk

/opt/bin/opkg update
/opt/bin/opkg install lsblk
/opt/bin/lsblk -f

In the end, I’d be happy you’ve got the original firmware back. Well… if you like it :wink:

I tried it according to your method and the display is normal. I changed the BIOS setting Boot option filter to [UEFI only] and found that the startup item named emmc could not be found. Is this what is the reason? I have previously installed debian will be a problem with grub?



It can now be started with emmc, but the menu displayed is the same as the rescue USB flash drive. is this normal? Did you choose the first item to enter the system?
I choose to display any item
Error: no such partition.
Press any key to continue…

@dswv42 @Tfl
Thank you for your help, I will modify grub.cfg and pr4100 has completely resurrected. There is still a problem now that the serial number shows unknown. Can anyone tell me where the serial number should be entered? What kind of format is it?
Only enter the S/N number?

image

You wiped your serial number. Why would you need a new one?
Maybe you can retrieve it if you registered the device.

Why do you even need it? Your warranty is void anyway, it’s like you’re trying to cover up what you did.

I have a serial number, but I don’t know where to enter it.

image
My emmc was partitioned and formatted without saving the serial number. I created a new wd_serial.txt file in the mmcblk0p8 partition and entered the serial number. But still shows that the serial number is unknown. Is it because my format is incorrect?


Then there are these errors

These are the outputs


lsblk output

blkid

I looked at the following mmcblk0p1 and mmcblk0p2 and your display is different. Is there any way to modify it?

Do you mean that the serial number is in the BIOS?

Product name is empty Serial number is unknown
Same as dmidecode --type 1 output

thanks for your help. Did you mean that modifying wd_serial.txt didn’t help?