How to get into the BIOS menu on a Windows 10 computer.

When you select Shut down on a Windows 10 computer, your machine is really not shut down. When you turn the computer on again it executes a fast start, so you cannot open the BIOS menu.

Manufacturer Keyboard button
ASUS mother boards Del
  • Keep the keyboard button pressed and turn on the computer.

How to completely shut down a Windows 10 computer

Windows 10 does not really shut down the computer when you select Shut down. This enables the operating system to start quickly, but if you want to cold start your computer to enter the BIOS menu you need to turn off your computer. To really shut down your Windows 10 computer:

  • Right click the Windows logo in the lower left corner of the screen
  • Click Shut down or sign out
  • Keep the Shift button pressed on your keyboard and click Shut down

 

 

ASUS motherboard does not boot after BIOS update

The motherboard BIOS update can cause problems, it is possible that after the update the computer does not boot anymore.

The ASUS motherboards come with the USB BIOS Flashback feature to load the BIOS even if the computer does not boot anymore.

The process below is for the ASUS P8Z77-V PRO/THUNDERBOLT motherboard, but all modern ASUS motherboards provide the same functionality.

Before BIOS update make sure you load the optimized BIOS configuration, otherwise after the BIOS update the computer may not boot anymore

Load the optimized BIOS configuration before the BIOS update

  • Restart the computer,
  • During the startup press the Del button to enter the BIOS setup,
  • Press F5 to load the optimized configuration,
  • Press F10 to save the changes and exit.

To reload the BIOS after a failed update

To fix a corrupted BIOS, you need access to a working computer that is connected to the Internet and a USB stick (pen drive) that is formatted with the FAT file system. Older motherboards cannot read the NTFS file system during the BIOS Flashback process.

Download the “Bios Renamer for USB BIOS Flashback” utility

  • On the asus.com web site select Support in the menu,
  • Select Consumer,
  • In the search box enter the model of your motherboard,
  • In the sub-menu of the product page select Support,
  • Click Driver & Tools,
  • In the Please select OS drop down menu select Others,
  • In the BIOS-Utilities section download the Bios Renamer for USB BIOS Flashback.

Download the BIOS for your motherboard

  • In the Please select OS drop down menu select the operating system you use,
  • In the BIOS section download the latest BIOS file.

Rename the downloaded BIOS file

The USB BIOS Flashback searches for a specific file on the USB device that you insert into the BIOS FlashBack USB port (marked with green border). The Bios Renamer for USB BIOS Flashback utility will rename the downloaded BIOS file to the correct name for your mother board

  • Create a folder for the BIOS file,
  • Extract the BIOS file from the downloaded BIOS zip file and place it in the folder,
  • Extract the BRenamerl.exe utility from the zip file and place it in the same folder,
  • Double click the BRenamerl.exe file to execute it. The program will rename the BIOS file, so the Flashback utility can find it.
  • Copy the renamed file to the FAT formatted USB stick.

The BIOS file names

Motherboard model BIOS file name
P8Z77-V PRO/THUNDERBOLT Z77VPTB.CAP

Flash the BIOS of the unresponsive ASUS motherboard

  • Turn off the computer,
  • Open the computer case to get access to the component side of the motherboard,
  • Insert the USB stick into the green framed USB Flashback port,
  • Plug the computer into the wall outlet,
  • If the power supply has a switch, turn it on, but do not start the computer,
  • Keep the BIOS Flashback button pressed on the motherboard for 3 seconds,
    • If the BIOS Flachback LED keeps blinking, the update starts. When the LED goes dark, the update has completed.
    • If the BIOS Flachback LED blinks a few more times and stays lit, the USB drive is not inserted to the correct port, not readable, the BIOS file name is not correct, or the file is corrupted. Turn on the computer for a few seconds to clear the BIOS Flashback LED light.
  • If the BIOS Flashback light goes out in a few minutes, the BIOS flashback has succeeded.

Load the optimized BIOS configuration as described at the top of this post.

Delay updates in Windows 10

On more occasions Microsoft released Windows 10 updates that disabled the network connection, the webcam or caused other inconveniences. Windows 10 automatically downloads and installs the updates without asking for permission from the owner of the computer. In Windows professional you can delay the installation of updates, so your work is not interrupted with frequent recommended updates, and Microsoft can fix the update before your computer installs it. The important security updates are still installed when those are released.

To defer Windows 10 updates

Click the Windows icon in the lower left corner and select the gear (Settings)

Inline image 2

On the main Settings page select Update & security

Inline image 3

Under Update settings select Advanced options

Inline image 4

On the Advanced options page select Defer feature updates

Inline image 1

Keep multiple versions of applications on Macintosh

Most of the DevOps tools are still in beta versions, many times the new version is not compatible with your existing scripts or have an error that stops your scripts working. To be able to keep multiple versions of the applications and easily switch between them, create symbolic links and point to the version you want to execute.

Create version-specific locations

Create a folder for your optional applications.

mkdir /opt

Set you as the owner of the “opt” directory and its children.

YOUR_GROUP should be on:

  • MacOS: wheel
  • Ubuntu: your username 
sudo chown -R YOUR_USER_NAME:YOUR_GROUP /opt

Set the security of the folder.

sudo chmod 755 /opt

We will create a directory structure to place each version of the application into its own folder. This example uses Packer.

Create a symbolic link to point to the application in the appropriate version folder. These are the examples for Packer, Terraform, and Vagrant. Notice, that the Vagrant application is in the “bin” directory, so the symbolic link has to point there.

If there is an existing symbolic link that points to the latest version of the application, rename it to be able to quickly return to the prior version of the application. This can come handy when we need to destroy instances created with the prior version of Terraform.

cd /opt/terraform
mv terraform terraform_v_0.9.11
cd /opt/packer
mv packer packer_v_1.0.4

Create a new symbolic link that points to the latest version of the application.

# For Packer
cd /opt/packer
ln -s /opt/packer/packer_1.2.0/packer packer

# For Terraform
cd /opt/terraform
ln -s /opt/terraform/terraform_0.10.0/terraform terraform

# For Vagrant
cd /opt/vagrant
ln -s /opt/vagrant/vagrant_1.9.5/bin/vagrant vagrant #The vagrant application is in the bin folder

Add the main application folder to the path in the config file of your terminal

  • for iTerm2 with zterminal: ~/.zshrc
  • for other terminals: ~/.bash_profile
PATH=/opt/packer:$PATH
PATH=/opt/terraform:$PATH
PATH=/opt/vagrant:$PATH

Vagrant

For Vagrant installation see Vagrant


To change the version you want to execute

  • Delete the symbolic link,
    cd /opt/packer
    rm packer
  • Create a new symbolic link pointing to the other version of the application as above.

Variable ‘…’: duplicate found. Variable names must be unique.

Starting with Terraform version 0.7.3 you can only define a variable once within a directory or a module. Before that release you could copy variable definition files from other modules and did not throw an error if you had the same variable defined in multiple files within the module.

In the new version of Terraform if you define the same variable name multiple times within the module you will get the following error message,

Variable '...': duplicate found. Variable names must be unique.

Make sure a variable is only defined once in the module or directory.

Disable the Caps Lock key on the Macintosh

I am not sure who uses the Caps Lock button anymore. It was important in the age of typewriters to be able to type all uppercase titles without holding the shift key, but these days I don’t remember the last time I needed it. In fact I frequently press it accidentally and prevents me to log into my computer.

 

To disable the Caps Lock key on Sierra

  • In Settings open Keyboard,
  • Click the Modifier Keys… button,
  • Set the Caps Lock key to No Action.

Launch Windows instances locally with Chef Test Kitchen

Most Linux distributions are free, and do not require product keys to launch them.

The steps below are based on the great article at http://kitchen.ci/blog/test-kitchen-windows-test-flight-with-vagrant/

I have summarized the steps below to create a free Virtual Box Windows Server 2012R2 image on your workstation, so Test Kitchen can use Vagrant and Virtual Box to launch Windows instances and test cookbooks locally fast and free.


Install the Vagrant WinRm plugin

vagrant plugin install vagrant-winrm

Get BoxCutter

Create the Windows image with BoxCutter. This process will take 30 minutes or more to fully configure the Windows image. The download step may time out on slower VPN connections. In that case disconnect the VPN connection and try it again without it. In case of any error, just execute the last command again and if it can, the process will continue from the point of error.

cd ~/
mkdir boxcutter
cd boxcutter
git clone https://github.com/boxcutter/windows.git
cd windows

Modify the BoxCutter JSON file

Change the ~/boxcutter/windows/eval-win2012r2-standard.json file to avoid the error message:

virtualbox-iso: Removing floppy drive…
==> virtualbox-iso: Error removing floppy controller: VBoxManage error: VBoxManage: error: The machine ‘eval-win2012r2-standard’ is already locked for a session (or being unlocked)
==> virtualbox-iso: VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MachineWrap, interface IMachine, callee nsISupports
==> virtualbox-iso: VBoxManage: error: Context: “LockMachine(a->session, LockType_Write)” at line 1038 of file VBoxManageStorageController.cpp

  • Change “headless”: “false”, to “headless”: “true”,
  • Add under “headless”: “true”,
"shutdown_timeout": "60m",
"post_shutdown_delay": "120s",

 

  • Add under every occurrence of “headless”: “{{ user `headless` }}”,
"shutdown_timeout": "{{ user `shutdown_timeout` }}",
"post_shutdown_delay": "{{ user `post_shutdown_delay` }}",

Create the virtual machine

make virtualbox/eval-win2012r2-standard

Add the image to Vagrant

vagrant box add windows-2012r2 ./box/virtualbox/eval-win2012r2-standard-nocm-1.0.4.box

Test the virtual machine

Your .kitchen.yml file should look like this

---
driver:
  name: vagrant

provisioner:
  name: chef_zero

platforms:
  - name: windows-2012r2

suites:
  - name: MY_SUITE_NAME
  run_list:
  - recipe[MY_COOKBOOK::MY_RECIPE]

 

You may need to execute the kitchen converge commands as sudo to be able to launch the Windows instance.

How to migrate the DevOps development environment to another workstation

Git

Move the Git repositories to a new workstation

If you want to move Git repositories to your new workstation

  • Commit and push all repositories to GitHub on the old workstation,
  • Copy the folders from your old workstation to the new,
  • Execute the following command in all Git repositories on the new workstation.
    git reset --hard

Terraform

Copying Terraform scripts from a Windows workstation

If the Terraform scripts reference modules, terraform creates symbolic links to those modules in the .terraform/modules directories. When you try to copy those symbolic links on a Windows machine the copy process stops. To copy the Terraform scripts

  • Start Windows explorer in the folder above the Terraform script folders,
  • Search for .terraform,
  • In the search result list delete the .terraform folders.

Test Kitchen

If you migrate between Windows and Macintosh you need to update a few paths, because the two operating systems store user specific files at different places.

The ssh_key location in the .kitchen.yml file should start with

  • On Macintosh: ~/aws_keys/
  • On Windows: C:\Users\YOUR_USER_NAME\aws_keys\

DevOps Engineering part 1. (Mac) – Make your Macintosh easier to use

Enable the right-click

To be able the right-click on the mouse

  1. Open settings.
  2. Enable Secondary click for the mouse and the trackpad.

Disable caps lock

If you never write emails with all capital letters, and many times a day accidentally press the caps lock key, you can disable it.

  1. Open the Keyboard settings
  2. On the Keyboard tab click the Modifier Keys… button
     
  3. Assign the Caps Lock key to No action

Remove Siri from the control strip

If you don’t use Siri on your Mac, there is no reason for Siri to occupy space on the control strip above the keyboard.

  1. Open the Keyboard settings
  2. On the Keyboard tab click the Customize Control Strip button
  3. Move the mouse below the bottom of the screen to highlight the Siri icon on the control strip, and drag it from the control strip up to the screen.

How to lock the screen

On High Sierra ( macOS 10.13 ) and later

  1. Press the Cmd-Ctrl-q key combination to lock the screen.

On earlier macOS versions

To be able to lock the screen from the menu bar:

  1. In Finder search for Keychain Access and start it,
  2. In the Keychain Access menu select Preferences,
  3. Check the Show keychain status in menu bar checkbox,
    This will place a lock icon in the menu bar.

To lock your screen

  1. Click the lock icon in the menu bar
  2. Select Lock Screen

Show the full path in Finder

  1. Open Finder
  2. In the View menu select Show Path Bar
    Finder will show the full path of the current folder at the bottom of the window. 

To jump to a folder shown in the path bar just double click it.

Show hidden files and folders

  1. Open the terminal and execute the following line
    defaults write com.apple.finder AppleShowAllFiles YES
  2. For the change to take effect relaunch Finder.
    • Press the ‘Option/Alt’ key, right click on the Finder icon in the dock and click Relaunch

Show the battery charge percentage

Before Monterey ( macOS 12 )

  1. Click the battery icon in the toolbar
  2. Select Show Percentage

In Monterey or later

  1. In System Preferences select Dock & Menubar
  2. On the left side scroll down to Battery Menu Bar and select Show Percentage

Apple Id without credit card

If you don’t have an Apple Id, create one. To obtain one without a credit card, you need to create the account in an older version of iTunes. In version 12.7 Apple removed the access to the App Store.

  1. Downgrade iTunes on your Mac to version 12.6. Follow the instructions at http://osxdaily.com/2017/09/17/downgrade-itunes-12-7-to-itunes-12-6/
  2. Start iTunes 12.6 on your Macintosh,
  3. Click the drop-down menu in the upper left corner,
    apple-id-01
  4. If Apps is visible, select it, otherwise click Edit Menu
    • Select Apps, and click Done to display it in the drop down.
      apple-id-02
  5. Search for a free app in the App Store and start to download it,
    apple-id-03
  6. Create a new Apple Id and select None for credit card type.

Show the user home directory and drive root

  1. Open Finder
  2. In the Finder menu select Preferences
  3. Select the Sidebar tab
  4. In the Favorites section select the checkbox next to your user name
  5. In the Locations section select the name of the hard drive

Prevent Microsoft Outlook to send the message with Command-Enter

To prevent Outlook to send the email when you accidentally press Command-Enter, associate the Send action with a zero length character:

  • Quit Microsoft Outlook
  • Execute in the terminal
    defaults write com.microsoft.Outlook NSUserKeyEquivalents -dict-add "Send" "\U200B"

Stop Spotlight indexing the Time Machine drive

Spotlight helps to search for files by indexing drives. To speed up the Time Machine operations prevent Spotlight indexing the Time Machine drive.

  • Connect the Time Machine drive to the computer.
  • In System Preferences select Spotlight
  • On the Privacy tab click the Plus sign
  • In the locations section select the Time Machine drive and click the Choose button
  • The list should contain the Time Machine drive

Homebrew

Homebrew is a package manager, it can install packages on your Macintosh that apple does not provide, like a few utilities below.

Installation

Installation instructions are at http://brew.sh/

List outdated software

  1. To list installed software that has new versions available, execute
    brew outdated

Update installed software

  1. To update (upgrade) all software that has new versions, execute
    brew upgrade

Uninstallation

To uninstall Homebrew if you don’t need it later execute

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"

Limit battery charging to 80%

To prolong the life of the battery of your Macintosh, you can install a utility to stop battery charging at 80%.

  • Install BCLM from https://github.com/zackelia/bclm
    • If you don’t have ownership of Homebrew, before installation execute
      sudo chown -R $(whoami) /usr/local/var/homebrew
      sudo chown -R $(whoami) /usr/local/Homebrew/
    • The installation steps are currently
      brew tap zackelia/formulae
      brew install bclm
      sudo bclm write 77
      sudo bclm persist
    • Check the set value with
      bclm read
  • Turn off Optimized battery charging in System Preferences to give full control to the tool.

  • You may need to reboot the computer for the process to start monitoring the battery.
  • The charging will stop around 80%. It may goes above 80% with a few percents, but at least the battery is not fully charged.

After software update

The system software update usually resets the upper charging limit to 100%. After system update execute in a terminal

sudo bclm write 77
sudo bclm persist
bclm read

UTC Clock in the menu bar

xBar is a plugin manager that can display plugins in the menu bar. One of them is World Clock that can display multiple clocks in a drop down of the menu.

Install xbar

  1. Navigate to https://xbarapp.com/
  2. Click the Download xbar for macOS button
  3. Download and run the .dmg file to install the application
  4. Move the xbar application to the Applications folder

Add World Clock to BitBar

  1. Launch xbar form the Launcher
    • Click xbar in the tool bar
    • Select the Plugin browser
    • On the Time page select the World Clock

Customize World Clock

  1. To open the plugins folder click the UTC clock, select xbar, Open plugin folder…
  2. Open the 001-worldclock.1s.sh file in a text editor

To change the displayed timezones, edit the ZONES variable in the file:

ZONES="US/Pacific UTC Europe/London Europe/Berlin Asia/Kolkata Asia/Tokyo Australia/Sydney"

To change the display format, edit the data formats.

  1. To remove the seconds from the menu bar, delete the :%S from the format line
date -u +'%H:%M UTC'

To add the day of the week and date to the clocks in the World Clock drop down

add

  • %a for the day of the week
  • %Y for the four digit year
  • %b for the name of the month
  • %d for the date
  • %z for the time zone offset
echo "$(TZ=$zone date +'%H:%M - %a, %Y %b %d %z') $zone"

To refresh the dropdown formats after making changes in the config file

  1. Click the World Clock in the menu bar
  2. Select Preferences, Refresh all

Disk Inventory X

This utility displays the graphical representation of file sizes and helps to find the biggest files.

  1. Download it from http://www.derlien.com/

System information in the menu bar

Stats is a free open source software to display system information in the menu bar including

  • CPU usage and temperature
  • Memory usage
  • Network and hard drive usage

To install it, navigate to https://github.com/exelban/stats

Next:

Back:

to the Tutorials page