Change Network Card MAC Address in Ubuntu

There are a lot of reasons you might want to manually set your MAC address for your network card.

To change this setting, we’ll need to edit the /etc/network/interfaces file. You can choose to use a different editor if you’d like.

sudo gedit /etc/network/interfaces

You should see the line for your network interface, which is usually eth0. If you have dhcp enabled, it will look like this:

auto eth0
iface eth0 inet dhcp

Just add another line below it to make it look something like this:

auto eth0
iface eth0 inet dhcp
hwaddress ether 01:02:03:04:05:06

Obviously you would want to choose something else for the MAC address, but it needs to be in the same format.

sudo /etc/init.d/networking restart

You will need to restart networking or reboot to take effect.

METHOD FOR ENABLING NET CONNECTION USING AIRTEL GPRS CONNECTION ON LINUX

PREREQUISITES
-> u shud have a USB cable to connect ur phone to the laptop/system.
-> check whether ur phone shows the USB connected symbol on connecting.

FIRST STEP:
run the command :wvdialconf create , on the terminal , it will show the output as following,

[root@localhost ~]# wvdialconf create
Scanning your serial ports for a modem.

Port Scan<*1>: S0 S1 S2 S3
WvModem<*1>: Cannot get information for serial port.
ttyACM0<*1>: ATQ0 V1 E1 — OK
ttyACM0<*1>: ATQ0 V1 E1 Z — OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 — OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 — OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 — OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 — OK
ttyACM0<*1>: Modem Identifier: ATI — Nokia
ttyACM0<*1>: Speed 4800: AT — OK
ttyACM0<*1>: Speed 9600: AT — OK
ttyACM0<*1>: Speed 19200: AT — OK
ttyACM0<*1>: Speed 38400: AT — OK
ttyACM0<*1>: Speed 57600: AT — OK
ttyACM0<*1>: Speed 115200: AT — OK
ttyACM0<*1>: Speed 230400: AT — OK
ttyACM0<*1>: Speed 460800: AT — OK
ttyACM0<*1>: Max speed is 460800; that should be safe.
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 — OK

Found an USB modem on /dev/ttyACM0.
Modem configuration written to create.
ttyACM0<Info>: Speed 460800; init “ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0″

now this shows that i have a modem connected on the port /dev/ttyACM0
now use this and substitute in the script in third step , ……….

SECOND STEP:
PASTE THE BELOW SCRIPT IN THE FILE etc/wvdial.conf ( delete any earlier existing scripts)and ………

[Dialer Defaults]
Modem = <the modem port recognised on running the command: wvdialconf create , on the terminal>
Baud = 230400
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ISDN = 0
Modem Type = Analog Modem
Phone = *99***1#
Username = A
Password = B
Stupid Mode = 1

THIRD STEP:

open terminal with root permissions and run the command : wvdial.
[root@localhost ~]# wvdial
–> WvDial: Internet dialer version 1.54.0
–> Warning: section [Dialer bg] does not exist in wvdial.conf.
–> Cannot get information for serial port.
–> Initializing modem.
–> Sending: ATZ
ATZ
OK
–> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
–> Modem initialized.
–> Sending: ATDT*99#
–> Waiting for carrier.
ATDT*99#
CONNECT
~[7f]}#@!}!} } }2}#}$@#}!}$}%\}”}&} }*} } g}%~
–> Carrier detected. Starting PPP immediately.
–> Starting pppd at Mon May 21 09:44:10 2007
–> pid of pppd: 3748
–> Using interface ppp0
–> pppd: Modem
–> pppd: Modem
–> pppd: Modem
–> local IP address 10.154.32.5
–> pppd: Modem
–> remote IP address 10.6.6.6
–> pppd: Modem
–> primary DNS address 202.56.250.5
–> pppd: Modem
–> secondary DNS address 202.56.250.6
–> pppd: Modem
as follows :

[root@localhost ~]# wvdial
–> WvDial: Internet dialer version 1.54.0
–> Warning: section [Dialer bg] does not exist in wvdial.conf.
–> Cannot get information for serial port.
–> Initializing modem.
–> Sending: ATZ
ATZ
OK
–> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
–> Modem initialized.
–> Sending: ATDT*99#
–> Waiting for carrier.
ATDT*99#
CONNECT
~[7f]}#@!}!} } }2}#}$@#}!}$}%\}”}&} }*} } g}%~
–> Carrier detected. Starting PPP immediately.
–> Starting pppd at Mon May 21 09:44:10 2007
–> pid of pppd: 3748
–> Using interface ppp0
–> pppd: Modem
–> pppd: Modem
–> pppd: Modem
–> local IP address 10.154.32.5
–> pppd: Modem
–> remote IP address 10.6.6.6
–> pppd: Modem
–> primary DNS address 202.56.250.5
–> pppd: Modem
–> secondary DNS address 202.56.250.6
–> pppd: Modem

Recover GRUB After Windows Installation

You will need a Live CD to recover GRUB after windows installation. I assume that you are going to recover an UBUNTU Box. Boot the Live CD and go to the terminal. And continue by entering:

$ sudo fdisk -l

This will ask your password, just enter it and press enter key. It will give you output like this:

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      102400    7  HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2              13        6768    54256640    7  HPFS/NTFS
/dev/sda3            6768       38913   258207585    f  W95 Ext’d (LBA)
/dev/sda5            6768        9318    20480000   83  Linux
/dev/sda6           22372       38913   132873583+   7  HPFS/NTFS
/dev/sda7            9319       22371   104848191    7  HPFS/NTFS

Now i will mount Linux (sda5 here), i have no external boot partition as you can see.(IF YOU HAVE external one, do not forget to mount it! )

$sudo mount /dev/sda5 /mnt
$sudo mount --bind /dev /mnt/dev
$sudo mount --bind /proc /mnt/proc

Now chroot into the enviroment we made :

$sudo chroot /mnt

After chrooting, you do not need to add sudo before your commands because from now, you will run commands as root.

You may want to edit /etc/default/grub file to fit your system (timeout options etc)

#nano -w /etc/default/grub

Play with the options if you want.(But do not forget to give grub-update command if you saved it ;) )

Now install/recover Grub2 via :

#grub-install /dev/sda

command.However you may get errors with that code like me.If so please use this command :

#grub-install --recheck /dev/sda

Now you can exit the chroot, umount the system and reboot your box :

#exit
$sudo umount /mnt/dev
$sudo umount /mnt/proc
$sudo umount /mnt
$sudo reboot

Source: http://www.ubuntu-inside.me/2009/06/howto-recover-grub2-after-windows.html