Curabitur ullamcorper sit amet dui quis congue. Suspendisse eget ante luctus, tincidunt nulla ut, elementum nunc. Fusce justo nunc, pulvinar ac efficitur ac, vestibulum id felis. Suspendisse rutrum ullamcorper odio in placerat.
This guide will be quite helpful to other Users in need. Thanks for sharing it.
I installed OMV (debian based) with a flash drive onto another flash drive.
The OMV grub bootloader is located in the /boot/grub directory instead /grub
I could modify the WD NAS grub to pick the OS on the USB drive, but maybe it’s better to create a symlink at /grub to /boot/grub. Any other tips before I go ahead?
Last night I loaded GRML, a debian based live system on my PR4100.
A live system lives in RAM memory so it doesn’t touch the WD flash firmware and doesn’t void your warranty.
You get a recent kernel, the apt package manager and a lot of handy tools, but the cooling fan whirling at full speed… I’ll see what I can do about that.
Get a pendrive of at least 512MB.
Find the device name of the pendrive. I’ll use /dev/sdX in this tutorial.
Format the pendrive and create a partition with a FAT32 filesystem.
sudo parted /dev/sdX
print mklabel msdos mkpart primary fat32 1M 100% set 1 BOOT ON quit
Change the partition label.
sudo fatlabel /dev/sdX USB_RESCUE
Download the grml64 iso of your choice. I chose the recent GRML prerelease.
Get grml2usb to install the iso.
sudo apt-get install grml2usb
As we can only do a headless install, we’ll add the SSH boot option with a password of your choice.
Install grml to the first partition of /dev/sdX as follows
sudo grml2usb --bootoptions='hostname=wdnas ssh=p1ck4s3cr3t' grml64-small-XXX.iso /dev/sdX1
Unmount and plug the pendrive in the NAS, then boot the NAS.
You can ssh into your box with your password, p1ck4s3cr3t in this case…
The full grml64 live ISO used only 500MB RAM of the 4GB present in the PR4100…
Another great Guide.
I haven’t tried it yet since I have couple of questions.
I understand it’s for testing, diagnosis, and recovery purposes. But I’m thinking to modify the firmware for my needs and boot the modified firmware from USB.
- Can we persistently boot from USB? (possibly from SSD)
- Will there be any performance issues?
- For regular boot (without rescue), are uLmage and uRamdisk files sufficient?
- In which circumstances NAS can be bricked?
Well, the rescue firmware didn’t work (On the NAS led screen, it was saying “Firmware update failure”), but uImage, uRamdisk worked
I successfully boot from USB, changed the corrupted firmware, and now NAS works normal.
As you pointed out, USB boot can be used to test custom firmware to make sure it’s booting as expected.
There was no internet connection. It was saying “Firmware update failed” on the led screen. Have you seen anything like that?
Current USB boot allows to update the kernel, and root level settings, but there are also WD config and modules, which are mounted from /dev/mmcblk0pX.
Have you figured it out how to by-pass those mounts so that config and other changes are possible without touching the original firmware?
I know you have a guide to update config.xml, but that may result to a brick nas.
#This one need the mount from util-linux, busybox’s one can’t handle LABEL
#echo “initramfs: mounting label=image.cfs partition”
#mount -t ext4 LABEL=image.cfs /usr/local/tmp
Here is the code from GPL firmware, ramdisk/root/etc/rc.sh.
They commented out mount commands, but similar mounting has been done in “chk_image”.
Have you tried mounting image.cfs from above commented code blocks? I think if it’s succefully, image.cfs can be mounted from USB Stick - just pointing to a USB partition or file inside the USB.
My PR2100 is not booting anymore - i dont know why acctually.
Maybe someone can help me here…
When i got the NAS i installed Debian on a 16GB USB Stick, then i’ve been in holiday two weeks.
when i came back the device didnt stared anymore correctly and it is not (!) booting from the installing USB Stick anymore, neither from the debian usb Stick (from the guide thread here), nor from any other USB Stick (i tried the rescue stick, a freenas stick and a grml stick)
i already tried to boot in the normal wd OS, making the 5s and 40s reset…
in every case the NAS is not getting an IP Adress and i cannot ping it or access via SSH
OK, i just soldered a wire to the UART Port and connected it to my pc, over screen i came to the bios and was able to set my booting device to the USB Stick. The second option was some unknown device (i just connected the usb stick)…
could maybe someone upload the images of the original boot partition or can i find this online?
thank you for sharing but I have come across issues so far and just want to share. My unit is a DL4100 so not sure if that could be a reason but here are big ones:
1: The USB drive must have a GPT partition table and must have it’s boot flag set. That might have been implied but I saw the grub config set root and assumed it had to be msdos.
2: Because of this previous step, the grub config had to have a different set root location
also, DL4100 has hd0 enumerated for internal flash, where hd1 was the plug in usb drive.
3: I might have misread this but this got me too…
My DL4100 will only load with the bootx64.efi and grub.cfg in the /EFI/BOOT folder structure. I read the post as delete the folders and put all files all in the root. That didn’t work, but post above also shows the folder structure so it could be read as correct. I just wanted to clarify because this took me some time…
I have spent about 6 hrs on this **** box and I finally got the grub to pull the kernel and ramdisk. still a ways to go for a full minimal ubuntu or debian (my end goal)…
gotcha, the guide was very helpful and got me in a better direction for sure.
From my testing, 3 usb drives that are proven working if set to GPT and boot flags set. I couldn’t get any of them to work with MSDOS partition table, boot flags set or not.
Is there a YouTube video that can help with this. The file attached did not contain Grub file.
I have a DL4100 too that just flashes blue power led and powers off then on in a vicious cycle. NOTHING seems to change that.
Could you clarify what you mean about setting a different root location? So what did you change or add in the grub.cfg file? I made the correct folder layout on my flash drive with partition set to GPT but then you also said to set boot flag. Since I’m doing this in Windows 10 how am I supposed to do that? There’s option to make it bootable or active since my OS already did that on its disk.
Lastly, did you have the same problem with your DL4100 as I have (blinking blue power button led) and it kept recycling its power?
Thanks for sharing the information FaceTime
Naturally. Nice find. You’re probably right. Thanks for sharing.