It used to be easy to manage grub. Simple changes to /boot/grub/menu.lst you were a-for-away. If you run a dual-boot environment (e.g, Ubuntu and Windows) and you want to change your Grub config to boot to a specific OS these days however (with the advent of newer versions of Grub) there are different steps to follow.

In this example, I’m running Windows 7 and Ubuntu 14.04 on the same machine in a dual-boot configuration. I need Windows to be the default menu entry.

Step 1: Find the menuentry for the operating system you want to make the default boot option

hendri@mercury:~$ grep 'menuentry ' /boot/grub/grub.cfg
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-531984cc-cdb4-4d22-9e98-2914966fd84e' {
        menuentry 'Ubuntu, with Linux 3.16.0-30-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.16.0-30-generic-advanced-531984cc-cdb4-4d22-9e98-2914966fd84e' {
        menuentry 'Ubuntu, with Linux 3.16.0-30-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.16.0-30-generic-recovery-531984cc-cdb4-4d22-9e98-2914966fd84e' {
menuentry 'Memory test (memtest86+)' {
menuentry 'Memory test (memtest86+, serial console 115200)' {
menuentry 'Windows 7 (loader) (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-A4AE5922AE58EE74' {
    menuentry "Memory Tester (memtest86+)" --class memtest86 --class gnu --class tool {

In the above output, copy/record the Windows 7 (loader) (on /dev/sda1) text.

Step 2: Edit /etc/default/grub using your preferred editor and make GRUB_DEFAULT the text above

GRUB_DEFAULT="Windows 7 (loader) (on /dev/sda1)"
#save and exit

Step 3: Update grub

hendri@mercury:~$ sudo update-grub

That’s it. You should now have your Windows host boot by default

Microsoft introduced a handy new command in Windows 7 to help you figure out your battery health.

To use it, do the following:
• Open a command prompt (as ‘administrator’)
• Type the following:

C:\powercfg -energy

• Give it time to run for 60 seconds
• An html file will be created in your Profile directory. In my case, I get the following output from the screen”

C:\Users\hschoeman>powercfg -energy
Enabling tracing for 60 seconds...
Observing system behavior...
Analyzing trace data...
Analysis complete.
Energy efficiency problems were found.
25 Errors
9 Warnings
23 Informational
See C:\Users\techedemic\energy-report.html for more details.

The part in red above shows the location of the output file. Sad but true, my battery is dying – it only charged about 39% on the last charge:

Battery ID	LGC06L09L6D16
Manufacturer	LGC06
Serial Number	
Chemistry	LION
Long Term	1
Design Capacity	64069
Last Full Charge	25186

Pre Windows Vista, you could find the version of Internet Explorer via WMI using the following method:

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & _
Set colIESettings = objWMIService.ExecQuery _
    ("Select * from MicrosoftIE_Summary")
For Each strIESetting in colIESettings
    Wscript.Echo "Version: " & strIESetting.Version
    Wscript.Echo "Product ID: " & strIESetting.ProductID
    Wscript.Echo "Cipher strength: " & strIESetting.CipherStrength

The MicrosoftIE_Summary object does not exist post Windows XP though (Why Microsoft, why?), so to find your browser versions, you could use the following VB Script, which essentially just checks the file version for you.

Continue reading

If you, like me, often work with an extra screen attached to your notebook,
you would surely have come across the problem where your applications open ‘off-screen’
or in other words, on your secondary screen, even when it is not plugged in.

WinAmp is especially finicky with this one and the solution is not as straightforward
as many people might have you believe. Or should I rather say, in Windows 7 the
solution is not as simple as expected.

Continue reading

Knowing your BIOS information, e.g. Revision or Release Date, can be critical in troubleshooting your hardware (and even software in some cases) issues.

This begs the question, where do you find this information? Well, you could obviously just reboot your PC/Server, go into your BIOS and get the information there. Of course, not all of us have the luxury of being able to boot our PC and going into the BIOS at free will. Especially in either ‘headless’ or off-site boxes.
Continue reading

Ever get the following message when setting up passwords in Windows 2008 R2 Server?:

Unable to update the password. The value provided for the new password does not meet the length, complexity, or history requirements of the domain

You like your passwords to be what YOU set them as. Right? You don’t like to have to add ‘123’ to your cat’s name or ‘@&%’ to your favourite sports team’s name. So why let yourself be forced to use these complex passwords on your Windows Server? It’s probably running in a disconnected environment free from hackers et al?
Continue reading