Sunday, 28 June 2009

how to restore your grub

methord 1
Insert your instalation cd or dvd to your drive
1)Now take a terminal by typing Alt+Ctl+F2
2)Find out the ext3 partition where you have installed your linux
this can be done by typing the cammand fdisk -l in the terminal,
for example
debian:/home/tonylijo# fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x094e094d

Device Boot Start End Blocks Id System
/dev/sda2 * 1 19457 156288321 f W95 Ext'd (LBA)
/dev/sda5 4866 9730 39078081 7 HPFS/NTFS
/dev/sda6 9731 14595 39078081 83 Linux
/dev/sda7 1 4865 39078018 83 Linux
/dev/sda8 14596 15081 3903763+ 82 Linux swap / Solaris
/dev/sda9 15082 19457 35150188+ 83 Linux
3)now create a directory mkdir /linux
4)now mount the linux parrtition to this new directory
mount -t ext3 /dev/sda7 /linux
5)now make new root directory
chroot /linux
6)install grub to the master boot record
grub-install /dev/sda

methord 2:

Insert a live cd on your cdrom
boot linux from the live cd
now take a terminal or konsole
then type
grub in the terminal
then the screen will appear as

GNU GRUB version 0.97 (640K lower / 3072K upper memory)

[ Minimal BASH-like line editing is supported. For
the first word, TAB lists possible command
completions. Anywhere else TAB lists the possible
completions of a device/filename. ]

type root(hd0,x)
x=your linux partition no -1
after that type
now your grub will be re stored.....

configure bsnl wll in linux

step1: First check that whether your modem is been detected
this can be done by typing the cammand wvdialconf
if yor modem is not been detected you have to register it to the kernel as in step 2.
step2:now you need to type the command lsusb
modprobe usbserial vendor=0×15eb product=0×0001
step3:modprobe ppp_generic
step5:now edit the file /etc/wvdial.conf
edit in the file as follows
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = at+crm=1;+cmux=1;+cps=33;+cta=0
Stupid Mode = yes
Modem Type = USB Modem
ISDN = 0
New PPPD = yes
Phone = *777#
Modem = /dev/ttyACM0(this field may be diffrent for diffrent users)
Username = your phone no
Password = last 4 digits of your phone no
Baud = speed of your wll connection
save the file