Category Archives: UBUNTU

Create Virtual host in Linux : ubuntu for running any standalone application like angularjs in appache

Suppose you want to make a virtual host on port 8090, you need to create a virtual host. You can do it for appache. The interesting part is you dont need to put your web directory in /var/www. You can point it in anaywhere of you drive. Which might help you to standalone app for an angularjs project. Just follow the steps.

1. Go to site-available directory, it is symlinked to site-enabled. It is located to

cd /etc/apache2/sites-available

2. Create a virtual host, say named “msdrg” and put the following lines over there. You can do it just by nano.

a.

sudo nano msdrg

b. paste the following lines over there, suppose I have my app msdrg in my home directory

<VirtualHost *:80>
        ServerName msdrg.dev
        DocumentRoot /home/zea/msdrg
        <Directory /home/zea/msdrg/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>

</VirtualHost>

note that I have named the servername as msdrg.dev. And I will get by this name in browser

3. save it by ctrl+x and run

sudo a2ensite msdrg

4. Reload you apache

sudo service apaceh2 reload

5. Just one more thing to do which is add the server name in your host which located at etc directory.

sudo nano /etc/hosts

you will find your localhost and other hosts. just add your new servername as host there

127.0.1.1   msdrg.dev

thats it, save it by pressing ctrl+x and exit. Go to your browser and type msdrg.dev, it will load whatever you have in your msdrg dircetory.

GRUB Error Fix and Rescue for Windows (XP/Vista/7/8) and Linux: Reinstall GRUB and Restore Windows (XP/7/8) for the Message in GRUB “Unknown Filesystem, Grub Rescue While Partitioning a Drive”

I use two operating system in a single pc. One is WINDOWS and another one is UBUNTU (Linux). I was using windows and partitioned a drive and restart. Suddenly my GRUB ( boot menu ) just vanished and showing the message “ unknown filesystem, grub rescue ”. My fellow colleague Tanzim helped me a lot to resolve the situation to recovery the system. We reinstalled the GRUB and it worked fine. Every file and folder, filesystem were intact. What I lost, the windows selection menu in boot menu. We searched the INTERNET and found a way to load the windows selection menu again in the boot menu. Let me show the way to do it.

First Reinstall the GRUB.

For this you need a UBUNTU live cd or UBUNTU image on a pendrive.

a. insert the cd or pendirive, restart the pc and select the boot device as pedrive/cd

For Ubuntu grub rescue follow these steps:
1.Boot from the Ubuntu Desktop live CD.

steps%20by%20steps%20installing%20ubuntu%201 GRUB Error Fix and Rescue for Windows (XP/Vista/7/8) and Linux: Reinstall GRUB and Restore Windows (XP/7/8) for the Message in GRUB Unknown Filesystem, Grub Rescue While Partitioning a Drive

2.In Live Desktop session open terminal.
Application ->Accessories->Terminal.

3. In Terminal tpye sudo fdisk -l
It will display all partiton of the disk.

Grub%20rescue%20install GRUB Error Fix and Rescue for Windows (XP/Vista/7/8) and Linux: Reinstall GRUB and Restore Windows (XP/7/8) for the Message in GRUB Unknown Filesystem, Grub Rescue While Partitioning a Drive

The partation which have Linux under System column is your drive in which ubuntu linux is installed. In screenshot ubuntu partition drive is /dev/sda11.

4. Mount the ubuntu partition drive
sudo mount /dev/sdXX /mnt(example ‘sudo mount /dev/sda11 /mnt’ ,don’t miss the spaces.)

5.Only if you have a separate boot partition:
sudo mount /dev/sdYY /mnt/boot.

6. Mount the virtual filesystems:
sudo mount –bind /dev /mnt/dev
sudo mount –bind /proc /mnt/proc
sudo mount –bind /sys /mnt/sys

7. To ensure that only the grub utilities from the LiveCD get executed, mount /usr
sudo mount –bind /usr/ /mnt/usr
sudo chroot /mnt

8. If there is no /boot/grub/grub.cfg or it’s not correct, create one using
update-grub
or update-grub2

9.Now reinstall Grub
grub-install /dev/sdX(eg. grub-install/dev/sdaDo not specify the partition number.

10. Verify the install
sudo grub-install –recheck /dev/sdX

11. Exit chroot : CTRL-D on keyboard.

12. Unmount virtual filesystems:
sudo umount /mnt/dev
sudo umount /mnt/proc
sudo umount /mnt/sys

If you mounted a separate /boot partition:
sudo umount /mnt/boot

13. Unmount the LiveCD’s /usr directory:
sudo umount /mnt/usr

14. Unmount last device:
sudo umount /mnt
15. Reboot.
sudo reboot.

This should reinstall your grab, but you might not see the windows menu right now
what your need to do is as following
from your terminal

1. sudo apt-get install os-prober
2. sudo update-grub
3. reboot
sudo reboot

Hope it will restore your windows name in boot menu.