Debian Linux on the My Cloud PR4100 / PR2100

I don’t use wifi myself on NAS but I know people who do in the context of home video servers.

I’m reading this thread with great interest. But I don’t think I want to be the first tester! But if someone is running the PR4100 as a Debian box for say 6 months or so and it’s solid, well I think there could be quite a bit of interest.

Is there a vaapi driver in there? On my phone it’s hard to see…
Thanks!

Thank you for your work. I would be willing to test on my machine as I still have to fill the drives, but I have a DL4100. I am still in the process to get this working and will be trying this tutorial tomorrow.

I agree, I also have no use for the wifi drivers, webcams, printers etc…I just want a minimal linux box (no webserver, thisthatcloud, etc.)

very cool thank you again

and sure I have SSH and serial console access and can scp files from the machine. I’m not sure what is the rescue firmware but if you have some baisc instructions I can probably figure it out.

I can provide what ever you need from my personal webserver so you can grab them.

I think these devices more different than I thought. The internal flash isn’t showing up as a mmc device.
Here is my DL4100 output of blkid -o list

root@mypool/ # blkid -o list
device     fs_type label    mount point    UUID

/dev/loop0 squashfs         /usr/local/modules 
/dev/loop1 ext4             (in use)       a4044ce4-7e3a-472b-af0b-aad44c58a554
/dev/sda1  linux_raid_member  (in use)     bc0dd6ed-54c4-901a-0a16-b7a57f1f9841
/dev/sda2  ext4             /mnt/HD/HD_a2  94d51763-0ad5-4a65-931b-c325d91c5620
/dev/sda4  ext4             /mnt/HD_a4     79f2a0a9-aa2e-4bd3-8b49-9c3c2ab259ab
/dev/sdb1  vfat    wdnas_efi (not mounted) FEE7-81D8
/dev/sdb2  ext4    wdnas_kernel (not mounted) 8872180b-981d-461f-b60c-051964b219f2
/dev/sdb3  ext4    wdnas_initramfs (not mounted) 38516909-d42a-4f43-891a-9a952c685abe
/dev/sdb4  ext4    wdnas_image.cfs (not mounted) a7dad975-54d5-4c19-9b81-6b82d2e01dd4
/dev/sdb5  ext4    wdnas_rescue_fw (not mounted) fa9ecefc-f3f6-4743-bfcd-e4ca7ce6c1dc
/dev/sdb6  ext4    wdnas_config (not mounted) 9d91e01b-bf29-4ad9-b2f4-f157ad80a697
/dev/sdb8  ext4    wdnas_reserve2 (not mounted) 6bb99cd7-187a-4e08-96e0-bf8b0dcb53e5
/dev/md0   swap             <swap>         d5461dae-57c9-4a34-bd8d-4e1b196ba161
/dev/mapper/docker-8:2-37748742-pool
           ext4             (not mounted)  a4044ce4-7e3a-472b-af0b-aad44c58a554

my wdnas_rescue_fw only has the kernel and ramdisk in it.
Also, I dont see a wdnas_reserve1.
There are some other differences too.

Everything from /dev/sdb on my DL4100 I have zipped and put up here

I think it still having issues. I have removed all hard disks and it’s just the board to keep it cleaner. Here is my output (note: onboard flash device has switched to sda)

root@mypool /tmp # mknod /dev/sda7 b 179 7 >/dev/null 2>&1;
root@mypool /tmp # blkid -o list
device     fs_type label    mount point    UUID

/dev/loop0 squashfs         /usr/local/modules 
/dev/sda1  vfat    wdnas_efi /tmp/wdnas_efi FEE7-81D8
/dev/sda2  ext4    wdnas_kernel /tmp/wdnas_kernel 8872180b-981d-461f-b60c-051964b219f2
/dev/sda3  ext4    wdnas_initramfs /tmp/wdnas_initramfs 38516909-d42a-4f43-891a-9a952c685abe
/dev/sda4  ext4    wdnas_image.cfs /tmp/wdnas_image.cfs a7dad975-54d5-4c19-9b81-6b82d2e01dd4
/dev/sda5  ext4    wdnas_rescue_fw /tmp/wdnas_rescue_fw fa9ecefc-f3f6-4743-bfcd-e4ca7ce6c1dc
/dev/sda6  ext4    wdnas_config /tmp/wdnas_config 9d91e01b-bf29-4ad9-b2f4-f157ad80a697
/dev/sda8  ext4    wdnas_reserve2 /tmp/wdnas_reserve2 6bb99cd7-187a-4e08-96e0-bf8b0dcb53e5

Also, this errors:

# dd if=/dev/sda7 of=/tmp/sda7.img
dd: can't open '/dev/sda7': No such file or directory

But I plugged in a USB drive and mounted, then copied the whole sda on to a file on the USB

mount /dev/sdb1 /mnt/USB/
dd if=/dev/sda of=/mnt/USB/DL4100_sda.img
978944+0 records in
978944+0 records out
501219328 bytes (478.0MB) copied, 87.380880 seconds, 5.5MB/s

I have put that img here (md5sum here).

Here is a capture of the serial port at boot. The bios option has “UEFI: Built-in EFI Shell” as first boot device as it might give some other important info.

Sorry I didnt see your response before I posted. my DL4100 doesn’t have fdisk. Actually, it doesn’t have alot of things which is another reason I cant wait to ditch the factory install.

That is a good tip about the offsets thank you. I’m still learning here so I appricate the tips.

Wow excellent find! I didn’t think to check for it at boot and missed where it got removed. How/where did you find that 2nd block of code where it gets removed? They didn’t remove part8 as wdnas_reserve2 is visible for me. Do you know why they would want to protect them?

They look to be all there…

stat -c 'major: %t minor: %T' /dev/sda
major: 8 minor: 0

However no luck with making the node…

mknod /dev/sda7 b 8 10 >/dev/null 2>&1;
blkid -o list
device     fs_type label    mount point    UUID

/dev/loop0 squashfs         /usr/local/modules 
/dev/sda1  vfat    wdnas_efi (not mounted) FEE7-81D8
/dev/sda2  ext4    wdnas_kernel (not mounted) 8872180b-981d-461f-b60c-051964b219f2
/dev/sda3  ext4    wdnas_initramfs (not mounted) 38516909-d42a-4f43-891a-9a952c685abe
/dev/sda4  ext4    wdnas_image.cfs (not mounted) a7dad975-54d5-4c19-9b81-6b82d2e01dd4
/dev/sda5  ext4    wdnas_rescue_fw (not mounted) fa9ecefc-f3f6-4743-bfcd-e4ca7ce6c1dc
/dev/sda6  ext4    wdnas_config (not mounted) 9d91e01b-bf29-4ad9-b2f4-f157ad80a697
/dev/sda8  ext4    wdnas_reserve2 (not mounted) 6bb99cd7-187a-4e08-96e0-bf8b0dcb53e5

Awesome thank you so much. I was able to mount the wdnas_reserve1 with command and the offset you provided. How did you get that offset by the way?

Also, do you have any suggestion for should be the next step on my end?

As an aside, Upon looking at the board the major flash device seems to be a micron 29F4G08ABAEA, which is a 4Gb/500MB device. Major lame as I thought this should have a 1GB onboard.

Ok gotcha, I have some more work to do. I’ve had the device sitting for 6 months and now desperately want to transfer away from my other server and just use this.

Trying to make the node, still no luck…

root@mypool/ # mknod /dev/sda7 b 8 0 >/dev/null 2>&1;
root@mypool/ # blkid -o list
device     fs_type label    mount point    UUID

/dev/loop0 squashfs         /usr/local/modules 
/dev/loop1 ext4    wdnas_reserve1 /tmp/wdnas_reserve1 96f0b8b1-4c6f-4e19-bf5a-3ea72852ac3b
/dev/sda1  vfat    wdnas_efi (not mounted) FEE7-81D8
/dev/sda2  ext4    wdnas_kernel (not mounted) 8872180b-981d-461f-b60c-051964b219f2
/dev/sda3  ext4    wdnas_initramfs (not mounted) 38516909-d42a-4f43-891a-9a952c685abe
/dev/sda4  ext4    wdnas_image.cfs (not mounted) a7dad975-54d5-4c19-9b81-6b82d2e01dd4
/dev/sda5  ext4    wdnas_rescue_fw (not mounted) fa9ecefc-f3f6-4743-bfcd-e4ca7ce6c1dc
/dev/sda6  ext4    wdnas_config (not mounted) 9d91e01b-bf29-4ad9-b2f4-f157ad80a697
/dev/sda8  ext4    wdnas_reserve2 (not mounted) 6bb99cd7-187a-4e08-96e0-bf8b0dcb53e5

root@mypool / # stat -c 'major: %t minor: %T' /dev/sda
major: 8 minor: 0

Understood, I will work on the making a USB that works. The last step I was at, the USB would appeared to start to boot after grub and it loaded kernel/ramdisk. However, every time I would loose serial terminal output (booting in blind mode) so no idea what’s going on. I will try with the DL4100 recovery kernel/ramdisk now.

That is correct. If you need anything else please let me know. I can provide SSH and Serial access to the DL4100 if want to verify anything.

Sounds good. If you need something tested on native DL4100 hw let me know.
Here is requested output:

root@mypool / # ls -l /dev/sd?
brwxrwxrwx    1 root     root        8,   0 Jan  6 21:07 /dev/sda

That’s certainly a good tip! I wasn’t confident enough that device name handoffs work from grub to kernel would stick like that. As in, grub assigns one thing but when kernel gets loaded, it re-enumerates it to whatever it wants (e.g. something else).
I have tested this on one of my USB with stock kernel/rd and think its working…but will confirm tomorrow. The boot process is visible but need to inspect the logs if it actually booted from the USB or bios jumped to the internal flash.

Nice thank you. It’s awesome of WD for putting that out there, including some instruction for environment setup. I am checking these out now to see if it’s actually legit. If I can set up the environment and build this factory image as instructed, I should be good shape for the next step (bare debian install).

That does look very very tempting…

It‘s good to see that working, it‘s one of the main things that would worry me as I leave the PR4100s for long periods (weeks) unattended in a very variable non controlled environment.
I am very hyped about this but at the same time nervous :wink:

Well Im interested and following your progress !
I think if you can get this all going, there could even be a commercial market for it.

I’m also interested. The only reason I visit this forum everyday is to check on your progress. I know you’re not doing this for the compliments, but I think it’s amazing the amount of work that you’ve put into this. I just wish I wasn’t such a pu**y and wasn’t so afraid to try out what you’ve been doing :sweat:

Great work on all of this. I am wondering if you have this working on a DL4100? I would like in theory, based on this work, run debian with OMV on an external usb ssd, and have my 4 bays available for data. This is a great NAS, with software setbacks, i havent even been able to get docker to function properly.
Thanks

I continuously get an error that I just don’t manage to get rid of… the last step:

 ~/kbuild/linux-source-4.19# sudo modprobe 8250_lpss
modprobe: ERROR: could not insert '8250_lpss': Exec format error

I follow the instructions posted here to install debian on my cloud pro 4100. How long does it take to boot for the first time? I’m using a USB stick 125gb drive

Great work! @Tfl & @dswv42
What features of the wdhwd are supported at the DLx100 platform?
My fan works but not the lcd and lcd buttons.

And I would be in favor of uploading the guides to github as well to have a second collection of knowledge if this gets deleted sometimes

@Tfl or anyone, is it possible to install the wdnas hwtools or hwdaemon (to get the lcd working), in DSM 7 on a PR4100? Can anyone assist me?

@PhoneGuy there’s a python2.7 branch for the hwtools that can be used.
The alternative starting point is the script from the FreeNAS build.
I’ve got the former working 3 years ago but don’t have time to support you any further.