Wednesday, December 14, 2011

Problem : No init found

If you boot into your system and face this problem -
                No init found.Try passing init=bootary.
This problem can be simply solved  using a live cd.Open terminal and type -                      sudo fdisk -l
This will list all the partitions.Look out for linux partition(it was /dev/sda9 in my case ) and then type -
                                  sudo fsck /dev/sda9
press 'y' to fix all errors .When scan is finished,reboot the system and you can boot into system again :)

Tuesday, May 24, 2011

To Play Games in DosBox

Playing games in DosBox is very easy. Just follow these instructions:
Install DosBox from Ubuntu Software Center or in Terminal by  typing :                 sudo apt-get install dosbox
To run games in DosBox:
Make a directory under your home folder where you want to place your games.for example:Make a directory named "dosgames" by using the command-  mkdir dosgames in terminal or by directly creating a folder in home folder.
To play games in DosBox,games must be present on your pc. Games can be easily downloaded from www.dosgames.com or any other site.Once you have downloaded a game,for example:bounce,extract its files and place it under the folder 'dosgames'.
Now open DosBox from Applications>Games>DosBox
or by writing in terminal-'dosbox'
The DosBox window will open now.To mount the directory 'dosgames ' write the following commands-
z:\> mount c /home/homefolder/dosgames
z:\> c:
c:\> cd bounce
c:\BOUNCE>bounce
Your game will start now.
To switch into or out of "fullscreen" of dosbox,press 'alt+enter'.

Wednesday, April 13, 2011

Recovery of GRUB after re-installing Windows

To get back your Grub, you need to boot your system using  Ubuntu Live CD and after making your Cd work , follow these steps:
  • To check the version of Grub , in Terminal type-                                                          grub-install -v    
GRUB2 should display a version number of 1.96 or later.If you don't 
have Grub2 installed,you can install it from Synaptic.After that go to 
Places and mount your Ubuntu partition.Then Go into boot/grub 
directory and check for the existence of the file grub.cfg. 
       Now you need to switch to the terminal-
  • Verify if you mounted the right partition by typing-
                    mount | tail -1 
It will show an output like this- 
/dev/sda9 on /media/0d104aff-ec8c-44c8-b811-92b993823444 type 
ext4 (rw,nosuid,nodev,uhelper=udisks)
To make sure this is indeed the Ubuntu boot partition,run-
ls /media/0d104aff-ec8c-44c8-b811-92b993823444 
but replace '0d104aff-ec8c-44c8-b811-92b993823444' with your UUID.
Output of this command should be similar to this-
config-2.6.18-3-686        initrd.img-2.6.18-3-686.bak   System.map-2.6.18-3-686
grub                           lost+found                          vmlinuz-2.6.18-3-686
initrd.img-2.6.18-3-686    memtest86+.bin 
Now we just need to reinstall GRUB by specifying the correct 
directory and the correct drive name , type - 
 sudo grub-install --root-directory=/media/ 
0d104aff-ec8c-44c8-b811-92b993823444 /dev/sda 
If all went well, you should see something like this-
Installation finished. No error reported.
Now Reboot.Grub should be installed and both Ubuntu and Windows 
should have been automatically detected and listed in the menu.

Saturday, March 26, 2011

Steps To Install LAMP In UBUNTU

First of all open, Applications>>Accessories>>Terminal , then in Terminal type the following command:
                            sudo apt-get install lamp-server^
Give the administrative password and hit Enter, it will show the following screen,
Enter the password for MYSQL root user , press tab and hit Enter.It will install apache2 as well as php.

Now repeat the password for MYSQL
To install phpmyadmin, type the following command:

 sudo apt-get install libapache2-mod-auth-mysql phpmyadmin

It will show the following screen,select apache2 by pressing spacebar key, then press tab and hit enter,it will then install phpmyadmin
After that the next screen will come up, choose 'yes' and hit Enter
  Now give the password for database's administrative user,
It will next ask for the password for phpmyadmin
Now repeat the password for phpmyadmin
phpmyadmin is now installed.
Testing
To test the working of apache, go to your web browser and type 'http://localhost/' in the address bar, then it will show the following screen which means your apache is working.


To test the working of php, type in terminal:
                      sudo gedit /var/www/testing.php
It will create testing.php file in your /var/www/ folder and in that file , write 
  <?php
  phpinfo();
  ?>
and then save the file.After that type the following command in Terminal,
                          sudo /etc/init.d/apache2 restart
Now go to your browser and type 'http://localhost/testing.php' , it will show the following screen
To check phpmyadmin working, type 'http://localhost/phpmyadmin/' in your browser,it will show the following screen
Now login with username 'root' and enter the password you created earlier,and you will get this screen,
Your LAMP is completely installed now.

Tuesday, January 25, 2011

Viewing Images Without Graphical Environment

I was just surfing net and found this interesting feature of Ubuntu.It's that we can convert a picture to lots of numbers and letters.When viewed from a distance, the contents of the photo can just about be made out. It's far from ideal one but it is quite fun and entertaining.
         To do this , first of all install aview and imagemagick packages from Ubuntu Software center.When the packages are installed, go to terminal and type:
                              $ asciiview filename.jpg
The file can be any image format.
After typing the command, hit q .It will generate the asciiview of the image.
For example, the graphical image is:
And the asciiview is: