Tuesday, 28 February 2017

No GRUB seen after Windows 10 installation or update

Most of the times we come across a situation where we try to dual boot system with Fedora/Ubuntu and Windows; and suddenly post installation or update we do not get GRUB screen back.

Well nothing to worry for such trouble as both OS are there installed on your HDD. The only thing is that you need to take extra efforts to boot one of the OSs of your choice.

You may follow below process to get back the GRUB screen. This will ensure to add grub entries into EFI database file.

1. Go to Windows prompt.
2. Run prompt with Administrator rights.
3. Type following command
      bcdedit /set {bootmgr} path \EFI\Fedora\grubx64.efi
4. Reboot your system and you shall be able to see GRUB screen.

Note: If still GRUB is not seen then add other files with above command again. Files like: shim.efi, shim-fedora.efi, etc


Above solution will work if you are able to get inside Windows. If you are not then same changes to the database can also be done by getting into BIOS settings and doing respective modifications.

Write first device driver for Linux

This post will encourage you to write your first device driver for Linux platform


Basics:
Device driver is a program that manages the system interaction with a particular piece of hardware. The driver translates between  hardware commands understood by the device and the programming interface used by kernel. Device drivers are part of kernel; they are not user process.

In this post we will be writing a simple "Hello World" .c program which we will convert into .ko file and later on will load into kernel. Besides this you will need to have a makefile which you will be calling with the help of "make" utility.

Contents of "ofd.c" and "makefile" is as below: