NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
fastfwd
Jan 16, 2017Virtuoso
Problem getting Intel microcode to load early on my Frankenstein NAS
So... After running multiple legacy ReadyNAS boxes on OS4 for 5+ years, I've decided to upgrade to OS6. I wish I knew who made the decision to include software support for legacy devices in OS6 (and...
- Jan 18, 2017
Ok, I've answered my own question. It is NOT necessary to lzma-compress the initramfs file on the boot flash.
As described in my previous post, I created a cpio archive just like the one inside initrd.gz, except that it also contains the /kernel/x86/microcode/GenuineIntel.bin file with my CPU's microcode update. Copied it to the boot flash without lzma-compressing it first (called it "initrduc"), edited SYSLINUX.CFG to load it along with my new kernel ("k4-1-30.uc") as a boot-menu option, and boom:
root@NAS3:~# dmesg | head [ 0.000000] microcode: CPU0 microcode updated early to revision 0xd0, date = 2010-09-30 [ 0.000000] Initializing cgroup subsys cpuset [ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Initializing cgroup subsys cpuacct [ 0.000000] Linux version 4.1.30.x86_64.1 (root@NAS3) (gcc version 4.9.2 (Debian 4.9.2-10) ) #2 SMP Tue Jan 17 01:33:26 PST 2017 [ 0.000000] Command line: initrd=initrduc reason=normal BOOT_IMAGE=k4-1-30.uc [ 0.000000] KERNEL supported cpus: [ 0.000000] Intel GenuineIntel [ 0.000000] Disabled fast string operations [ 0.000000] e820: BIOS-provided physical RAM map:
Now my NAS not only has a CPU updated to the latest microcode, it's also running a kernel built specifically for its hardware (Core2 Duo CPU, Yukon2 Ethernet chip) and with a few other optimizations for that hardware.
If everything's still running fine a few days from now, I'll make this kernel/initramfs combo the default, and make the original combo a boot-menu option. Then I'll run through the process again for my main NAS, and maybe also for the Atom D525 in my little Ultra 2 Plus.
fastfwd
Jan 17, 2017Virtuoso
Thanks, Sandshark. I guess I should have been clearer about my setup: My 6-bay ReadyNAS devices have been running on Core2 Duo E6600 SL9ZL CPUs with the 07/26/2010 BIOS since early 2013. They're functional, but the BIOS only brings them up to update "cb" while Intel's microcode-update package will bing them to "d0".
More news on my progress:
I now know just enough about initramfs and the syslinux loader to be really dangerous. Yesterday I discovered that syslinux since version 3.71 has had the ability to load multiple initramfs files specified in the SYSLINUX.CFG file, so I planned to use that facility. Unfortunately, I later discovered that syslinux on my boot flash is only version 3.31:
root@NAS3:/media/INT_FLASH# strings ./LDLINUX.SYS SYSLINUX 3.31 v1.07 Tue Feb 15 11:31:02 PST 2011 fBf9 Load error - Debug Serial Port Enabled ....
So that idea's a non-starter.
My current plan is to modify a copy of the existing initrd.gz to include kernel/x86/microcode/GenuineIntel.bin so everything can be loaded at once, in the single file that syslinux 3.31 supports. I've unpacked the existing LZMA-compressed initrd.gz into a cpio achive, unpacked that into the initramfs directory tree, added the kernel directory, and repacked the tree into a cpio archive. But now I'm stuck because lzma has a ton of options and I haven't found the right ones to replicate what Netgear used for their initrd.gz.
So I have two new questions:
1. Executing "file" on Netgear's original initrd.gz produces "initrd.gz: LZMA compressed data, streamed", and 7-Zip identifies the compression method as "LZMA:26". Does anyone know what lzma options will produce that format?
2. Alternatively, does the initramfs file on the boot flash even need to be compressed with lzma, or will syslinux load a raw cpio archive?
fastfwd
Jan 18, 2017Virtuoso
Ok, I've answered my own question. It is NOT necessary to lzma-compress the initramfs file on the boot flash.
As described in my previous post, I created a cpio archive just like the one inside initrd.gz, except that it also contains the /kernel/x86/microcode/GenuineIntel.bin file with my CPU's microcode update. Copied it to the boot flash without lzma-compressing it first (called it "initrduc"), edited SYSLINUX.CFG to load it along with my new kernel ("k4-1-30.uc") as a boot-menu option, and boom:
root@NAS3:~# dmesg | head [ 0.000000] microcode: CPU0 microcode updated early to revision 0xd0, date = 2010-09-30 [ 0.000000] Initializing cgroup subsys cpuset [ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Initializing cgroup subsys cpuacct [ 0.000000] Linux version 4.1.30.x86_64.1 (root@NAS3) (gcc version 4.9.2 (Debian 4.9.2-10) ) #2 SMP Tue Jan 17 01:33:26 PST 2017 [ 0.000000] Command line: initrd=initrduc reason=normal BOOT_IMAGE=k4-1-30.uc [ 0.000000] KERNEL supported cpus: [ 0.000000] Intel GenuineIntel [ 0.000000] Disabled fast string operations [ 0.000000] e820: BIOS-provided physical RAM map:
Now my NAS not only has a CPU updated to the latest microcode, it's also running a kernel built specifically for its hardware (Core2 Duo CPU, Yukon2 Ethernet chip) and with a few other optimizations for that hardware.
If everything's still running fine a few days from now, I'll make this kernel/initramfs combo the default, and make the original combo a boot-menu option. Then I'll run through the process again for my main NAS, and maybe also for the Atom D525 in my little Ultra 2 Plus.
- mdgm-ntgrJan 18, 2017NETGEAR Employee Retired
If you want to use this modification you're going to have to redo this work for every firmware update you wish to install.
The reason we compress the initrd cpio archive using lzma rather than gzip is to keep the size of the download as small as we can. It also allows for more potential growth in the size of the firmware over time whilst still being able to fit it on the internal flash.
Devices that shipped with OS6 have a newer syslinux bootloader.- fastfwdJan 19, 2017Virtuoso
mdgm wrote:If you want to use this modification you're going to have to redo this work for every firmware update you wish to install.
The reason we compress the initrd cpio archive using lzma rather than gzip is to keep the size of the download as small as we can. It also allows for more potential growth in the size of the firmware over time whilst still being able to fit it on the internal flash.
Devices that shipped with OS6 have a newer syslinux bootloader.Fortunately, it'll only take a few minutes now that I know how to do it. And at least on my old boot flash, there's plenty of free space -- two copies of the kernel plus two copies of initramfs (one uncompressed) only uses half of the flash.
- SandsharkJan 19, 2017Sensei - Experienced User
OK, so what do you gain with the additional microcode? I've not been having any problems with OS 6.6.0 (haven't moved up to 6.6.1 yet).
Related Content
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!