Monday, October 16, 2006

Tips for change MAC ID, GRUB, install KDE, GNOME in Kubuntu and Ubuntu

To change Mac IP, as far as I know there is two ways, one is temporarily change MAC, that means when reboot the system, the original MAC will be recovered. In this way, assume we will alter the MAC of eth0, we can do it by command
ifconfig eth0 down
ifconfig eth0 hw ether 00:10:11:11:11:22
ifconfig eth0 up

if you want to reset your MAC IP permanently, you have to revise some system file. There are two way to do it as well.
1) add the following to the file /etc/rc.local
/etc/init.d/networking stop
ifconfig eth0 hw ether 00:10:11:11:11:22
/etc/init.d/networking start

2)change some contents of the file /etc/network/interfaces, usually, it looks like
iface eth0 inet hdcp(static)
pre-up ifconfig eth0 hw ether 00:10:11:11:11:22

for DNS, they are stored in /etc/resolv.conf in the format "nameserver [IP Address]", eg

after this correction, restart the networking by
/etc/init.d/networking restart

My personal GRUB setting

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
default 0
#if set 1, windows XP will be the default boot system

# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10

title Ubuntu
root (hd0,1)
kernel /boot/vmlinuz-2.6.15-23-386 root=/dev/hda2 ro quiet splash
initrd /boot/initrd.img-2.6.15-23-386

#(the following is the system default, but i remove it, and make it elegant)
#title Ubuntu, kernel 2.6.15-23-386 (recovery mode)
#root (hd0,1)
#kernel /boot/vmlinuz-2.6.15-23-386 root=/dev/hda2 ro single
#initrd /boot/initrd.img-2.6.15-23-386

#title Ubuntu, memtest86+
#root (hd0,1)
#kernel /boot/memtest86+.bin


# This is a divider, added to separate the menu items below from the Debian
# ones.
#title Other operating systems:

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/hda1
title Microsoft Windows XP
root (hd0,0)
chainloader +1

How to install KDE in ubuntu? Just to run the command
sudo aptitude install kubuntu-desktop

how to install GNOME in Kubuntu?
sudo aptitude install ubuntu-desktop

set the default display manager revise the file
For KDM, the file should read /usr/bin/kdm; for GDM, the file should read /usr/sbin/gdm

No comments: