Monday, September 27, 2010

setting environment PATH in ubuntu

open file /etc/environment and edit it, this change only affects the new sell. If you wanna apply change for current sell, do this: "
export PATH="${PATH}:"

Tuesday, September 14, 2010

reinstall grub on MBR

from ubuntu 9.10, grub 2 is installed by default.

if for some reasons, you installed windows after ubuntu on your machine, grub gone.

one of the ways to get your ubuntu back is reinstall grub on MBR. follow these steps
  • boot from an ubuntu livecd.
  • open terminal, type sudo -i
  • fdisk -l and find the partition where located linux
  • mkdir /media/root
  • mount /dev/sda(x) /media/root
  • grub-setup --root-directory=/media/root -m /media/root/boot/grub/device.map /dev/sda(x) 
run apt-get install grub-pc if needed.