Skip to content

mxgrub: Include microcode updates in initramfs #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pmenzel
Copy link
Contributor

@pmenzel pmenzel commented Jun 30, 2017

Unfortunately, sudo also clears the environment variable $TMPDIR, so that this needs to be fixed.

@pmenzel
Copy link
Contributor Author

pmenzel commented Jun 30, 2017

Tested with sudo TMPDIR=/scratch/local ./create_initramfs initramfs.igz.

Suggestions welcome. Probably, just a check if TMPDIR is set.

mxgrub/mxgrub Outdated
@@ -252,7 +252,7 @@ sub cmd_update {
}

sub cmd_initramfs {
sys('bash','-c','cd /project/admin/initramfs;find .|cpio -H newc -o | gzip > /boot/grub/initramfs.igz');
sys('/project/mxtools/mxgrub/create_initramfs', 'initramfs');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/project/mxtools ? Currenty the "mxtools" are manually spread into /usr/sbin and friends. Perhaps then "manually" should be changed perhaps mxtools should have a Makefile with install target or a bee package, but some of the tools need to be on a local disk.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I changed that to look for that script in the path.

find .|cpio -H newc -o | gzip > "$TMPDIR"/"$INITRDNAME"

#
cat ucode.cpio $INITRDNAME > /boot/grub/"$INITRDNAME"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should /boot/grub/"INITRDNAME" be "$INITRDPATH" to include the ".igz" ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, I was unsure about that, if I should pass the name with or without suffix. Probably without, because it’s gzipped above in line 33.

cd ..

# Clean up
rm -rf "$INITRDDIR"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A little bug in the lines above above or called without TMPDIR and the argument "/" or "." and the system is dead. I don't like rm -rf $SOMETHING.

@pmenzel pmenzel force-pushed the mxgrub-include-microcode-updates-in-initramfs branch from 2e08507 to 0bad22b Compare July 3, 2017 13:10
Copy link
Collaborator

@donald donald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove ls -lr

Sign in to join this conversation on GitHub.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants