Boot Priority Issues with UEFI supported ASUS boards

UEFI increases the complexity of setting up a dual/ multi-boot OS system. For OEM systems, it might make sense since Windows is often the only OS there, but for custom built systems, this is a farce. Something which should be simple is made complex so as to deter the user from installing other OS than Windows. But there are workarounds, so it has not actually fulfilled the original purpose of UEFI.

In ASUS H97/ Z97/ H170/ Z170 boards, to enable dual boot, we must do a few things:

1. Enable Compatibility Support Module (CSM)
Advanced Menu (F7) > Boot > CSM > Enable

2. Select ‘Other OS’ in Secure Boot in place of ‘Windows UEFI’
Advanced Menu > Boot > Secure Boot > OS Type > Other OS

Here, under default settings, usually ‘Windows UEFI’ will be selected. OEM equipment manufacturers ship with Windows, and OEM is a big market, so ASUS by default assumes Windows UEFI will be used, which is obviously not the case with custom built PCs.

Selecting this will also make the ‘Platform Key State’ as ‘Unloaded’, which is otherwise ‘Loaded’.

At this point, we should be able to install multiple OS on the HDD and boot into any without a problem. Of course, it is recommended to install Windows first then other OS.

Hard Drive BBS

ASUS motherboards also seem to be smart enough to group bootable devices by type and when it comes to HDD, show only one among many (if exists). So if you have multiple bootable drives, then only one will show up on the ‘Boot Priority’ menu in BIOS opening screen. The others will be ‘Disabled’, which we can see in Boot Menu (F8) and select from there, but cannot rearrange the order by drag and drop as in Boot Priority.

We can select which HDD among the bootable ones to run the bootloader at startup without bothering to open the BIOS menu and selecting it everytime through Boot Menu manually. This is done by specifying that disk in ‘Hard Drive BBS’ setting under Boot menu:

Advanced Menu (F7) > Boot > Hard Drive BBS > select the disk from dropdown.

Once selected, the others will become disabled and won’t show up on the Boot Priority menu, though the same can be selected from Boot Menu.

This is not much of a botheration, because the motherboard anyway can only run one bootloader among multiple if available; and it is natural to go to the BIOS to change it. Note that if the disk selected has the ‘latest’ bootloader, then we can always boot into other OSes installed in same or even another disk than the one where bootloader is run from. For example, GRUB usually adds entries for all existing OSes, and we should be able to boot into any of them through the GRUB menu.


github reference

For home projects, the most likely workflow is to first create the project in some computer, then modify it continuously until it becomes fit enough to publish. At this stage, we have a project in the local machine and we wish to upload it in a new repository on

For people coming from different version control systems, git offers some challenge as the terminology is different for same functions. The following steps will push local changes to a remote repository.

1. On, create a new repository (empty) using the web interface, without specifying any files.┬áNote the URL for repository once created. Say for example, the URL is for the repository ‘project-name’.

2. On the local machine, navigate to the project folder and run

$ git init

This will create a blank repository in the folder, whose details are stored in .git subfolder.

3. Now, create a readme file and add files of the project to the repository:

$ echo "# project-name" >>
$ git add pom.xml src/

4. Add files to the local branch by running

$ git commit -m "initial commit message"

5. Hook up the local repository to the remote one (created on

$ git remote add origin

where user is the username on git, and URL is the same as the one mentioned by git at the end of creating the repository in the first step.

6. Push the local changes to remote repository:

$ git push origin master

Now the local changes will be available on the remote repository to be used by others.

Quick fstab reference

The /etc/fstab file is used to set permissions on disk drives when mounted at boot. Based on this, one is able to read/ write/ execute files on the disk. The /etc/fstab is general permissions file for disk partitions, so it works on any Linux distribution.

Below is the typical contents of /etc/fstab for a 2-disk setup (OS installed on primary, applications/ media on secondary, both internal), which enables the user to run executable files. [Note that UUID values have been removed; actual fstab entries should have these values].

# /etc/fstab: static file system information.
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
# / was on /dev/sda5 during installation
UUID= / ext4 errors=remount-ro 0 1
# /home was on /dev/sda6 during installation
UUID= /home ext4 defaults 0 2
# swap was on /dev/sda8 during installation
UUID= none swap sw 0 0
# s33 on /dev/sdb5 (Secondary Drive)
UUID= /media/user/s33 ntfs-3g defaults 0 0
# s34 on /dev/sdb6 (Secondary Drive)
UUID= /media/user/s34 ntfs-3g defaults 0 0

The last 2 entries (lines starting with ‘#’ are comments) are for 2 NTFS partitions (/dev/sdb5, /dev/sdb6) on a secondary internal hard drive. These were added manually after the OS install on primary, which automatically added the first 3 entries (root, home, swap).

The options column above decides which permissions to be set for the drive. The value defaults contains the options rw, suid, dev, exec, auto, nouser, and async. This is a typical usage of a file system, where the user will be able to read, write, execute files. The contents specified by defaults can be checked in the manual for mount, towards the end:

$ man mount

For more restrictive permissions, we can individually set permissions via fmask (for files), dmask (for directories), and umask (for both) by providing the bitwise inverse of the actual chmod permission number we want to set, since these are bit masks. More details can be found in the community guide for fstab in Ubuntu here.

One thing to note is the UUID for these drives, which for a partition can be obtained by running

$ sudo blkid

as suggested in the fstab header above.

fix linux mint audio stuttering

With certain Intel HD audio cards, Linux Mint is found to stutter when sound volume is high. The exact threshold of the volume varies with the application/ media being played, but the stuttering is definite and bad enough to the point of being unusable. The issue is similar to what we often get in a sound system when we try to insert a audio jack to a socket, with the speaker volume set high. It may also occur in other Linux systems.

The problem is that in case the motherboard has a front headphone socket, the Linux audio driver tries to send output to that channel also (even though that socket is not connected to any audio jack, and the only output is the speakers connected to the back). If we disable this socket, then the issue is resolved. This is an issue with Linux only, since the same motherboard/ audio setup works fine with Windows.

To resolve the issue, we need to install hda-jack-retask, and override the front audio socket to disable it.

1. Install alsa-tools-gui package, which contains hda-jack-retask:
sudo apt-get install alsa-tools-gui

2. Open hda-jack-retask (Menu > Sound & Video > HdaJackRetask) and scroll down to ‘Green Headphone – front side’. Select ‘Override’ and from the choice list, select ‘Not Connected’. This means we override the front audio socket using a front end of the audio driver.

3. Apply the settings and test whether the audio issues are resolved – e.g. play a Youtube video at very high volume. The stuttering should be gone now.

4. Install boot override (in the same UI) to persist the setting across reboots.

setup mysql on linux

To use MySQL DB on a linux system, we need the MySQL server, client, and optionally, a UI client. For the UI Client, we will use DBeaver, which is a free universal DB client supporting MySQL, SQLite, Postgres, Oracle, and many more. We will create the DB using command line MySQL client, then connect to it using the UI client.

To setup MySQL GA (General Availability version) on Linux (Ubuntu and derivatives), below are the simple steps. Currently, the GA version is 5.6.

1. Download and install the .deb that adds MySQL repository to APT sources:
Download the .deb that corresponds to the version of Ubuntu. While installing the .deb, select the latest versions for all MySQL components (like Server, Workbench, Utilities), then select Apply from the same component list to end the selection.

2. Update the repository
$ sudo apt-get update

3. Install MySQL server and client
$ sudo apt-get install mysql-server mysql-client-core-5.6

Add root password when prompted during the installation. Also, MySQL server is automatically started at the end of installation. To stop it,
$ sudo service mysql stop

To start/ restart,
$ sudo service mysql start

To check whether started,
$ sudo service mysql status

4. Open MySQL client to create a database. We’ll later connect to this DB from DBeaver.
$ mysql -u root -p

Enter root password when prompted (the same one specified in the previous step).

5. Create the DB. In this example, we create the admissions DB that is used in Stanford’s Databases course.
mysql> create database admissions

Note that the database name is case sensitive in Unix.

6. Quits the MySQL prompt
mysql> \q

7. Install DBeaver as MySQL UI-based client
Download the 64-bit archive (assuming 64-bit OS), not the .deb file, because the .deb requires JRE 7 in PATH, whereas there may be a more recent version of Java in the system (say Java 8). Extract the archive, then add to PATH the base directory (which contains the dbeaver executable).

8. Open DBeaver
$ dbeaver

9. In DBeaver UI, create new MySQL connection with all defaults, user = root, and pwd = root pwd (for MySQL given in step 3). Put database name as the one created in step 5.

10. Connect to the DB, then run any scripts to create schema and data using the SQL Editor inside DBeaver (right-click on connection -> SQL Editor)

Now we are ready to run any queries against this database.