Showing posts with label Linux Stuff. Show all posts
Showing posts with label Linux Stuff. Show all posts

Wednesday, April 8, 2015

Missing side bar, Missing Menu bar , Missing icons and Missing "close resize and minimize icons" in Ubuntu 14.04 64bit LTS

This issue was a nightmare. I have tried various solutions to solve this issue but nothing worked. I tried reinstalling unity, resetting unity, reinstalling compiz packages etc and ended up without solving the issue.

Many solutions available in net are for 12.04 , 12.10 etc versions but not for Ubuntu 14.04 64 bit version.

Before trying this solution, make sure you have taken backup of your valuable data. I didn't loose any data but on safe side, its always good to take backup before trying which we are not sure about it.

To solve this issue just change your directory to your home directory.

Press Ctrl+Alt+F1 , enter your username and password.

 cd <home-directory>  
 sudo rm -rf .config  
 sudo rm -rf .compiz/compiz-1  

That's it, reboot the machine and now you should see icons back on the screen :)

Sunday, March 1, 2015

Building Kernel Source

This article just briefs about downloading and installing Linux Kernel Source.
Of-course, there are many articles available in net. I would like to make this as simple as possible.

Steps to follow

1. Install Git
 sudo apt-get install git  

2. Download Linux Source (in here I am downloading 2.6 version) in to a directory
 $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git 
 $ git pull 

3.Configure your Kernel by executing
 $make defconfig  
 $make oldconfig  

Some times, we can use "$make  menuconfig" a graphic utility to configure Kernel. You may face fatal error problem while executing this command.

4.Now build your kernel
 $make  

This may take a while. So relax, we have done a lot till now :)

To improve Kernel build time you can use
 $make  -jn

Here, n is the number of jobs to spawn. Usual practice is to spawn one or two jobs per processor. For example, on a 16-core machine, you might do
$ make -j32 > /dev/null

Using utilities such as the excellent distcc or kernel build time. ccache
can also dramatically improve  Kernel build time.

5. Now once the build is done, we need to find for bzImage
 mrtechpathi@mrtechpathi:~/Study/linux-source/linux-2.6$ find . -name bzImage |xargs ls -l  
 lrwxrwxrwx 1 mrtechpathi mrtechpathi   22 Mar 1 23:16 ./arch/x86_64/boot/bzImage -> ../../x86/boot/bzImage  
 -rw-rw-r-- 1 mrtechpathi mrtechpathi 5970016 Mar 1 23:16 ./arch/x86/boot/bzImage  

6.Copy this image to /boot directory as vmlinuz-2.6
 mrtechpathi@mrtechpathi:~/Study/linux-source/linux-2.6$ sudo cp ./arch/x86/boot/bzImage /boot/vmlinuz-2.6  

7.Install modules
$ sudo make modules_install

8.Now update grub using
$ sudo update-grub

Sometimes,  your grub may disappear or may not appear. To solve this check this post "Grub menu is not displayed after installing Linux".

Grub menu is not displayed after installing Linux (ubunt 14.04)

We often face an issue where Grub menu disappear after installing a new operating system.

By default, your GRUB is set to hide the OS selection menu on boot.

Basically, what you'll need to do is make the following change:

1. Open up a terminal (ctrl+alt+t) and then enter in the following command:   

$ sudo vim /etc/default/grub

2. Edit the file and comment below two lines (adding # before the lines)

GRUB_HIDDEN_TIMEOUT=0 
GRUB_HIDDEN_TIMEOUT_QUIET=true

becomes

#GRUB_HIDDEN_TIMEOUT=0
#GRUB_HIDDEN_TIMEOUT_QUIET=true

Save the file

3. Update the grub

$sudo update-grub

When you reboot you should see the OS Selection Menu.

Fatal error: curses.h: No such file or directory while configuring Kernel Source

While working on Kernel source, during configuring Kernel options, we  may need to use "make menuconfig" command.

We may end up with following error.

 mrtechpathi@mrtechpathi:~/Study/linux-source/linux-2.6$ make menuconfig  
  HOSTCC scripts/kconfig/mconf.o  
 In file included from scripts/kconfig/mconf.c:23:0:  
 scripts/kconfig/lxdialog/dialog.h:38:20: fatal error: curses.h: No such file or directory  
  #include CURSES_LOC  
           ^  
 compilation terminated.  
 make[1]: *** [scripts/kconfig/mconf.o] Error 1  
 make: *** [menuconfig] Error 2  

To overcome this, execute below steps

1. $ sudo apt-get update
2. $ sudo apt-get install libncurses5-dev
3. $ make menuconfig -> Works fine now !!!!

Following are my system configurations.
 No LSB modules are available.  
 Distributor ID:     Ubuntu  
 Description:     Ubuntu 14.04 LTS  
 Release:     14.04  
 Codename:     trusty  

Let me know if it worked for you :)

Accessing a Windows shared folder in Oracle VM Virtual Box

This post gives steps to access  a shared folder when you use Oracle VM Virtual box to run a Linux Virtual system on your Windows PC.

1. Make sure you have guest addons installed.notepad

2.Create a folder on the Host computer (ubuntu) that you would like to share, for example "C:/KernelTrap"

3.Boot the Guest operating system in VirtualBox.

4.Select Devices -> Shared Folders...

5.Choose the 'Add' button.

6.Select Folder path name as   "C:/KernelTrap"
   and Folder name will be automatically detected as "KernelTrap"

7. Remember this folder name "KernelTrap"

8. Optionally select the 'Make permanent' option

9. In virtual machine terminal, type:

 cd /mnt  
 sudo mkdir shared_folder  
 sudo mount -t vboxsf KerekTrap share_folder_patch 

And that's it. Don't worry about the absolute paths. You don't need them. For all practical purposes, VB will take care of the real path behind the share name, in this case KernelTrap.

Let me know if this procedure worked for you. I have tried this on Ubuntu 14.04 and it worked without any issue.