SHARE
TWEET

hp-linux-bios-installer.sh

aaditya Feb 3rd, 2015 764 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/sh
  2.  
  3. #Check to see if user is root
  4. if [[ $(/usr/bin/id -u) -ne 0 ]]; then
  5.     echo "Not running as root"
  6.     exit
  7. fi
  8.  
  9. # Get current directory
  10. CURR_DIR=`pwd`
  11.  
  12. # Create a temporary mount point
  13. mkdir ${CURR_DIR}/hp_linuxbios_temp 2> /dev/null
  14.  
  15. # Mount HP_TOOLS partition
  16. mount -L HP_TOOLS ${CURR_DIR}/hp_linuxbios_temp
  17. if [ $? != 0 ]; then
  18. {
  19.    echo " "
  20.    echo "Failed mounting HP_TOOLS partition."
  21.    echo " "
  22.    echo "Please create a FAT32 partition with the label HP_TOOLS in order to update the BIOS."
  23.    echo " "
  24.    rmdir ${CURR_DIR}/hp_linuxbios_temp
  25.    exit 1
  26. } fi
  27.  
  28. # Extract BIOS files to HP_TOOLS partition
  29. for i in `ls *.gz`; do
  30.         tar zxf $i -C  ${CURR_DIR}/hp_linuxbios_temp
  31. done
  32.  
  33. # Unmount HP_TOOLS partition
  34. umount ${CURR_DIR}/hp_linuxbios_temp
  35.  
  36. # Remove tempoeary directory
  37. rmdir ${CURR_DIR}/hp_linuxbios_temp
  38.  
  39. echo "Bios files have been transferred to local drive successfully."
  40. echo "To complete the final phase of the Bios Installation, please follow steps below."
  41. echo "1. Upon reboot press the F10 key to boot into your BIOS menu"
  42. echo "2. Check the UPDATE SYSTEM BIOS checkbox"
  43. echo "3. Save the changes and exit. The system will then perform the flashing of the bios"
  44.  
  45.  
  46. #####Edit for Linux Bios flashing
  47. #####
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top