Skip to content

Instantly share code, notes, and snippets.

@evilscientress
Last active January 9, 2018 21:36
Show Gist options
  • Save evilscientress/8b033319fc350f4c1cc9ef2be46211fc to your computer and use it in GitHub Desktop.
Save evilscientress/8b033319fc350f4c1cc9ef2be46211fc to your computer and use it in GitHub Desktop.
Lenovo UEFI Update script for Linux

Lenovo UEFI Update with Linux

Howto

  1. Download the "Bios Update Utility for Windows" version of the UEFI update
  2. extrac the exe file using innoextract
  3. insert an usb flash drive and format it with a fat filesystem mkfs.vfat $path_to_flash_drive_devicenode
  4. mount the usb flash drive
  5. download mkusbkey.sh available from here
  6. change into the folder extracted by innoextract, it must contain a file called BootX64.efi
  7. run mkusbkey.sh /path/to/flashkey/mountpoint
  8. unmount the flash drive, reboot and boot from the usb flash drive
#!/bin/sh
if [[ ! -d "$1" ]]; then
echo "usage: $0 <mount point of eampty fat32 formated usb flash drive>"
exit 1
fi
set -e
DRIVE="$1"
mkdir -p "${DRIVE}/EFI/Boot"
mkdir -p "${DRIVE}/Flash"
cp BootX64.efi "${DRIVE}/EFI/Boot/BootX64.efi"
rsync -tr \
--exclude="*.[sS][hH]" \
--exclude="*.[bB][aA][tT]" \
--exclude="*.[eE][xX][eE]" \
--exclude="*.[tT][xX][tT]" \
--exclude="*.[cC][oO][nN][fF][iI][gG]" \
--exclude="32[bB][iI][tT]" \
--exclude="64[bB][iI][tT]" \
./ "${DRIVE}/Flash/"
# I know that the excludes up there a very ugly, but saddly they are kneeded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment