Jump to content

customize microcode early loading in unraid


Recommended Posts

I did some research, and did not found any exist solution/guide. so here's one working with Unraid 6.12.* (older version may also work, u need to try)

btw, im using N5105, which needs microcode revision 0x24000024, to have stable VM. and the one unraid packed with is old, 0x24000023.


#goto any working folder

cd /mnt/user/main/tmp


#extract bzroot
dd if=/boot/bzroot bs=512 count=$(cpio -ivt -H newc < /boot/bzroot 2>&1 > /dev/null | awk '{print $1}') of=/mnt/user/main/tmp/ucode.orig.cpio
dd if=/boot/bzroot bs=512 skip=$(cpio -ivt -H newc < /boot/bzroot 2>&1 > /dev/null | awk '{print $1}') of=/mnt/user/main/tmp/others

#extract microcode package

dd if=/mnt/user/main/tmp/ucode.orig.cpio bs=512 | cpio -i -d -H newc --no-absolute-filenames

#download https://slackware.pkgs.org/current/slackers/intel-microcode-20230512-noarch-1cf.txz.html

#extract zip and upload unzipped-folder/boot/kernel/x86/micorcode/GenuineIntel.bin to current folder

#overwrite the intel microcode
cp GenuineIntel.bin kernel/x86/microcode/


find kernel/ | cpio -o -H newc >ucode.cpio

cat ucode.cpio others > bzroot

#get sha256
sha256sum bzroot >bzroot.sha256

#backup old ones and put new ones in place 

mv /boot/bzroot /boot/bzroot.bak
mv /boot/bzroot.sha256 /boot/bzroot.sha256.bak
mv bzroot /boot/
mv bzroot.sha256 /boot/


#restart and check log, the new microcode should apply.




some knowledge if anyone wants to do more customization

  1. unriad only impletment early microcode load, which is also the recommended way. late load is usually more dangerous/unstable.
  2. for intel microcode package, GenuineIntel.bin is actually just a "raw-packed" file contains all microcode files in unzipped-folder/lib/firmware/intel-ucode . so in case you want customized microcode for certain cpu, just replace the files accoringly (https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files/releases has the mapping info) and repack the file to GenuineIntel.bin  I think this is usful for someone who has tricks to customize microcode to achive maximium performace for intel cpu
  3. i think it's also ok to split bzroot into micode and initrd, then make changes to http://unraid-ip/Main/Settings/Flash?name=flash


let me know if i missed anything. currently N5105 is working stable for me.

  • Like 2
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...