Minggu, 01 Mei 2011

Mikrotik on linux

General Information
Summary
The MikroTik RouterOS can be configured remotely, using Telnet, SSH, WinBox Console or Webbox. In this manual we will discuss how to use the interactive WinBox console.
Description
The Winbox console is used for accessing the MikroTik Router configuration and management features, using graphical user interface (GUI).
All Winbox interface functions are as close as possible to Console functions: all Winbox functions are exactly in the same hierarchy in Terminal Console and vice versa (except functions that are not implemented in Winbox). That is why there are no Winbox sections in the manual.
The Winbox Console plugin loader, the winbox.exe program, can be retrieved from the MikroTik router, the URL is http://router_address/winbox/winbox.exe Use any web browser on Windows 95/98/ME/NT4.0/2000/XP or Linux to retrieve the winbox.exe executable file from Router. If your router is not specifically configured, you can also type in the web-browser just http://router_address
The Winbox plugins are cached on the local disk for each MikroTik RouterOS version. The plugins are not downloaded, if they are in the cache, and the router has not been upgraded since the last time it has been accessed.
Starting the Winbox Console
When connecting to the MikroTik router via http (TCP port 80 by default), the router's Welcome Page is displayed in the web browser:

By clicking on the Winbox link you can start the winbox.exe download. Choose Open to start the Winbox loader program (you can also save this program to your local disk, and run it from there)
The winbox.exe program opens the Winbox login window.

where:
discovers and shows MNDP (MikroTik Neighbor Discovery Protocol) or CDP (Cisco Discovery Protocol) devices.
logs on to the router by specified IP address (and the port number if you have changed it from the default value of 80) or MAC Address (if the router is in the same subnet), user name, and password.
saves the current sessions to the list (to run them, just double-click on an item).
removes selected item from the list.
removes all items from the list, clears cache on the local disk, imports addresses from wbx file or exports them to wbx file.


Secure Mode
provides privacy and data integrity between WinBox and RouterOS by means of TLS (Transport Layer Security) protocol.
Keep Password
Saves password as a plain text on a local hard drive. Warning: storing passwords in plain text allows anybody with access to your files to read the password from there.
The Winbox Console of the router:


The Winbox Console uses TCP port 8291. After logging onto the router you can work with the MikroTik router's configuration through the Winbox console and perform the same tasks as using the regular console.
Overview of Common Functions
You can use the menu bar to navigate through the router's configuration menus, open configuration windows. By double clicking on some list items in the windows you can open configuration windows for the specific items, and so on.
There are some hints for using the Winbox Console:
To open the required window, simply click on the corresponding menu item
Add a new entry
Remove an existing entry
Enable an item
Disable an item
Make or edit a comment
Refresh a window
Undo an action
Redo an action
Logout from the Winbox Console

Check the port and address for www service in /ip service print list. Make sure the address you are connecting from matches the network you've specified in address field and that you've specified the correct port in the Winbox loader. The command /ip service set www port=80 address=0.0.0.0/0 will change these values to the default ones so you will be able to connect specifying just the correct address of the router in the address field of Winbox loader
The Winbox Console uses TCP port 8291. Make sure you have access to it through the firewall.

Jumat, 15 April 2011

Increase Internet connection on Linux

###########################################################
# Angel DeChaos mail:dark.angel24.daa@gmail.com #
# My Set up #
###########################################################

First -> sudo cp /etc/sysctl.conf /etc/sysctl.conf.angeldechaos
second -> gksudo gedit /etc/sysctl.conf ( laways use gksudo for graphical using)
Insert this command in the end of ur paragraph :
# increase TCP max buffer size setable using setsockopt()
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
# increase Linux autotuning TCP buffer limits
# min, default, and max number of bytes to use
# set max to at least 4MB, or higher if you use very high BDP paths
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216
# don't cache ssthresh from previous connection
net.ipv4.tcp_no_metrics_save = 1
net.ipv4.tcp_moderate_rcvbuf = 1
# recommended to increase this for 1000 BT or higher
net.core.netdev_max_backlog = 2500
# for 10 GigE, use this, uncomment below
# net.core.netdev_max_backlog = 30000
# Turn off timestamps if you're on a gigabit or very busy network
# Having it off is one less thing the IP stack needs to work on
net.ipv4.tcp_timestamps = 0
# disable tcp selective acknowledgements.
net.ipv4.tcp_sack = 0
# enable window scaling
net.ipv4.tcp_window_scaling = 1

aftyer finish all stuff then run command to refresh :
sudo sysctl -p (it"ll refresh ur system internet connection)


after that disable ur ipv6 :

Disable ipv6 :
gksudo gedit /etc/modprobe.d/aliases

# These are the standard aliases for devices and kernel drivers.
# This file does not need to be modified.
#
# Please file a bug against module-init-tools if a package needs a entry
# in this file.

# network protocols
########################################################################
alias net-pf-1 unix
alias net-pf-2 ipv4
alias net-pf-3 ax25
alias net-pf-4 ipx
alias net-pf-5 appletalk
alias net-pf-6 netrom
alias net-pf-7 bridge
alias net-pf-8 atm
alias net-pf-9 x25
# 1, 2, 3 new lines
alias net-pf-10 ipv6 off
alias net-pf-10 off
alias ipv6 off
# alias net-pf-10 ipv6
alias net-pf-11 rose
alias net-pf-12 decnet
# 13 NETBEUI
alias net-pf-15 af_key
alias net-pf-16 af_netlink
alias net-pf-17 af_packet

There's another way too: instead of changing aliases file, create fie named bad_list in /etc/modprobe.d containing this line:
alias net-pf-10 off

Rabu, 13 April 2011

Compile Mpeg , Lame, and x264, running codecs from KLite on windows and stay with Linux with dvd play inside it

FFmpeg is a multi platform, open-source library for video and audio files. Using FFmpeg you can do video conversions, sound extractions etc... It's better than using VLC player & Audacity to do video conversions, sound extractions. It too has a GUI which helps us to make it more easier. That's called WinFF. WinFF is a graphical user interface for FFmpeg. It will convert almost any video file that FFmpeg will convert. WinFF does multiple files in multiple formats at one time.
It's a bit fast when you use the terminal for it. Actually that's something that I experienced. But when using multiple file it's better to use WinFF.
You would get errors like “ffmpeg - Unsupported codec for output stream #0.0” if you haven't complied FFmpeg in the first place.
So to use this, first you have to compile FFmpeg & x264 (that means the codecs).
(Don't try to deviate from the plan. Just stick to it.. !! ).
First make sure that you haven't installed FFmpeg or x264 before. To be 100% sure paste this in the terminal.
sudo apt-get remove ffmpeg x264 libx264-dev
And do an update to make sure that you gets the latest version installed.
sudo apt-get update
Next you have to get all the dependencies which you need to install x264 & Ffmpeg.
sudo apt-get install build-essential subversion git-core checkinstall yasm texi2html \
libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev \
libvorbis-dev libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev
sudo apt-get install build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev libvorbis-dev libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev
When you've got all the dependencies you have to install x264. First of all you have to get the files downloaded of x264.
git clone git://git.videolan.org/x264.git
After getting to files downloaded you have to install the x264. So you have to enter the folder.
cd x264
Then install it.
./configure
make
sudo checkinstall --pkgname=x264 --pkgversion "2:0.`grep X264_BUILD x264.h -m1 | \
cut -d' ' -f3`.`git rev-list HEAD | wc -l`+git`git rev-list HEAD -n 1 | \
head -c 7`" --backup=no --default --deldoc=yes
sudo checkinstall --pkgname=x264 --pkgversion "2:0.`grep X264_BUILD x264.h -m1 | cut -d' ' -f3`.`git rev-list HEAD | wc -l`+git`git rev-list HEAD -n 1 | head -c 7`" --backup=no --default --deldoc=yes
This will install and make a backup for you at the folder x264 which is at your home folder named as “x264_1:0.svn20100126+20fa784-1_i386.deb” (it will change a bit .. I think you get the idea).
Then you have to install lame. Then you get the ability in encoding mp3s. First thing you need to do is to get back to your home folder. Do it by this.
cd
If you have installed a previous version of mp3lame. You have to uninstall that.
sudo apt-get remove libmp3lame-dev
sudo apt-get install nasm
After that you have to download the lame files. Get that done.
wget http://downloads.sourceforge.net/project/lame/lame/3.98.4/lame-3.98.4.tar.gz
Extract the file.
tar xzvf lame-3.98.4.tar.gz
Go into the lame 3.98.4 folder.
cd lame-3.98.4
Then start the installation.
./configure --enable-nasm --disable-shared
make
sudo checkinstall --pkgname=lame-ffmpeg --pkgversion="3.98.4" --backup=no --default \
--deldoc=yes
sudo checkinstall --pkgname=lame-ffmpeg --pkgversion="3.98.4" --backup=no –default --deldoc=yes
After installing x264 next you have to install FFmpeg. So as you are in the x264 folder you have to get back to the home folder by
cd
Then download the files to install FFmpeg.
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
Then go to the ffmpeg folder.
cd ffmpeg
Start the installation
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc \
--enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb \
--enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid \
--enable-x11grab --enable-libmp3lame
make
sudo checkinstall --pkgname=ffmpeg --pkgversion "4:SVN-r`LANG=C svn info | \
grep Revision | awk '{ print $NF }'`" --backup=no --default --deldoc=yes
hash x264 ffmpeg ffplay
This will install and make a backup for you at the folder ffmpeg which is at your home folder named as “ffmpeg_4:0.5+svn20100126-1_i386” (this also will change a bit .. ).
The installation of FFmpeg & x264 is over. Now I you want the GUI for the FFmpeg you can install that too.
sudo apt-get install winff

Using FFmpeg In The Terminal In Ubuntu
If you are using the GUI method it's easy to enter the values at the boxes in the window. If you are trying to use to terminal for it there is some codes that would be useful for you.
Get the info of a video file
ffmpeg -i 1.mp4
You have to give the name of the video after -i at the command which I've taken as 1.mp4
This will give you the information about the video file. The things like the frame rate, bit rates of the audio and the video track, etc ...
Turn images to a video sequence
ffmpeg -f image2 -i image%d.jpg 1.mp4
This command will transform all the images from the directory (the image files named as image1.jpg, image2.jpg, etc...) to a video file named 1.mp4.
Turn a video to images
ffmpeg -i 1.mp4 image%d.jpg
This command will make the video to images. This will make images nmaed as image1.jpg, image2.jpg, etc..
The other formats are available too. The formats such as PGM, PPM, PAM, PGMYUV, JPEG, GIF, PNG, TIFF, SGI.
Encode a video sequence for the i pods, i Phones, PSP or mobile phones
ffmpeg -i 1.flv -f psp -r 25.00 -b 512000 -ar 24000 -ab 64000 -vcodec mpeg4 -s 320x240 1.mp4
Input file : 1.flv
Audio codec : mp3
Audio bitrate : 64kb/s
Audio Freqency : 24000Hz
Video codec : mpeg4
Video bitrate : 512kb/s
Frame rate : 25.00 /s
Video size : 320x180
Output file : 1.mp4
These videos will work only mobile phone like Nokia N79, Nokia N85 … etc
You can use this method to convert other file formates to .mp4 files. Formats like avi, flv, ogg, ogv, divx, etc..
ffmpeg -i 1.flv 1.mp4
You can use this to covert videos to another format.
Extracting sound track from a video and saving it as mp3
ffmpeg -i 1.flv -vn -ar 44100 -ac 2 -ab 320 -f mp3 1.mp3
Input file : 1.flv
Audio bitrate : 320kb/s
Audio Frequency : 44100Hz
Output format : mp3
Output file : 1.mp3
You can extract the sound track from almost all video formates & too can convert .wav files to .mp3 files.
Mix a video with a sound file
ffmpeg -i 1.wav -i 2.avi 3.mp4
Input Audio file : 1.wav
Input videos file : 2.avi
output file : 3.mp4
You can do this with almost all will video and audio file formats.

FFmpeg is a multi platform, open-source library for video and audio files. Using FFmpeg you can do video conversions, sound extractions etc... It's better than using VLC player & Audacity to do video conversions, sound extractions. It too has a GUI which helps us to make it more easier. That's called WinFF. WinFF is a graphical user interface for FFmpeg. It will convert almost any video file that FFmpeg will convert. WinFF does multiple files in multiple formats at one time.
It's a bit fast when you use the terminal for it. Actually that's something that I experienced. But when using multiple file it's better to use WinFF.
You would get errors like “ffmpeg - Unsupported codec for output stream #0.0” if you haven't complied FFmpeg in the first place.
So to use this, first you have to compile FFmpeg & x264 (that means the codecs).
(Don't try to deviate from the plan. Just stick to it.. !! ).
First make sure that you haven't installed FFmpeg or x264 before. To be 100% sure paste this in the terminal.
sudo apt-get remove ffmpeg x264 libx264-dev
And do an update to make sure that you gets the latest version installed.
sudo apt-get update
Next you have to get all the dependencies which you need to install x264 & FFmpeg.
sudo apt-get install build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libfaad-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libx11-dev libxfixes-dev libxvidcore4-dev zlib1g-dev
When you've got all the dependencies you have to install x264. First of all you have to get the files downloaded of x264.
git clone git://git.videolan.org/x264.git
After getting to files downloaded you have to install the x264. So you have to enter the folder.
cd x264
Then install it.
./configure
make
sudo checkinstall --pkgname=x264 --pkgversion "1:0.svn`date +%Y%m%d`" --backup=no --default
This will install and make a backup for you at the folder x264 which is at your home folder named as “x264_1:0.svn20100126+20fa784-1_i386.deb” (it will change a bit .. I think you get the idea).
After installing x264 next you have to install FFmpeg. So as you are in the x264 folder you have to get back to the home folder by
cd
Then download the files to install FFmpeg.
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
Then go to the ffmpeg folder.
cd ffmpeg
Start the installation
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libfaac
--enable-libfaad --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
make
sudo checkinstall --pkgname=ffmpeg --pkgversion "4:0.5+svn`date +%Y%m%d`" --backup=no --default
This will install and make a backup for you at the folder ffmpeg which is at your home folder named as “ffmpeg_4:0.5+svn20100126-1_i386” (this also will change a bit .. ).
The installation of FFmpeg & x264 is over. Now I you want the GUI for the FFmpeg you can install that too.
sudo apt-get install winff

Rabu, 06 April 2011

Change Ubuntu Grub List

So I went on a mission to figure out how to change the boot order to load XP by default.
I knew that Ubuntu was using the GRUB boot loader. I wasn’t familiar with GRUB so I don’t know why I knew this – it must have been stated during the install sometime. But anyway – I knew it was GRUB.
I copied the file into my home dir and used chmod (it’s been so long since I’ve used a *nix CLI that I had to lookup chmod – I knew it was “ch” something) so I could write to it then opened it in xemacs.
I simply copied the XP settings ahead of the Ubuntu settings in the item list and left everything else the same.
The relevant parts of the original menu.lst were:
—————————- /boot/grub/menu.lst —————————————-

default 0
timeout 10
## ## End Default Options ##
title Ubuntu, kernel 2.6.20-15-generic
root (hd0,1)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=12de9aee-c011-429e-b2a9-0ed83b3eb727 ro quiet splash
initrd /boot/initrd.img-2.6.20-15-generic
quiet
savedefault
title Ubuntu, kernel 2.6.20-15-generic (recovery mode)
root (hd0,1)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=12de9aee-c011-429e-b2a9-0ed83b3eb727 ro single
initrd /boot/initrd.img-2.6.20-15-generic
title Ubuntu, memtest86+
root (hd0,1)
kernel /boot/memtest86+.bin
quiet
### END DEBIAN AUTOMAGIC KERNELS LIST
# This is a divider, added to separate the menu items below from the Debian ones.
title Other operating systems:
root
# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Microsoft Windows XP Home Edition
root (hd0,0)
savedefault
makeactive
—————————–
I referred to the online GRUB manual (http://www.gnu.org/software/grub) and confirmed that the “0” in default was the list item to boot by default (zero-indexed) and that if it were changed to “saved” the previously loaded item with a “savedefault” entry would be used. I didn’t want that. I want it to boot to XP by default regardless of what I used most recently.
I had two choices – change the default value to 4 (the menu divider is an option as well) or leave it at 0 and reorder the items.
I decided to reorder the items for one reason – I want the top menu item to be the default because that is how my family will expect it to work.
There are some notes about an automatically generated section that could be over-written so I did back up the file before making the change and I decided it was worth the hassle of losing the customizations I made (and possibly the Window’s item) to make it work the way we need for now. I don’t plan to change it often.
So I simply moved the XP section to the top, moved the divider below it, saved the local copy and copied it over the original.
Rebooting brought up XP after a 10 second delay – just as I had hoped.

support :
GrubHowto
ChangeDefaultOs

Faster Browsing on Ubuntu use DNS Cache

Local DNS cache for faster internet :

The package we will be using for caching nameserver lookups is called "dnsmasq". So first, install it using:

$sudo apt-get install dnsmasq

(If you can’t find then, then you probably haven’t added the Universe repository to your list of repositories.)
No uncomment the following line (that is edit the line to NOT have a “#” in the beginning) in the file/etc/dnsmasq.conf:

listen-address=127.0.0.1

Now edit/etc/dhcp3/dhclient.conf and make sure the section below exactly like this, especially the line that says “prepend domain-name-servers 127.0.0.1;”

#supersede domain-name "fugue.com home.vix.com";
prepend domain-name-servers 127.0.0.1;
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, host-name,
netbios-name-servers, netbios-scope;

Explanation for the above change: In the normal case, when you get a new dhcp lease, the dhcp3 client (tool) on your computer gets a new lease, and updates the/etc/resolv.conf file on your computer with the right values for the DNS servers to use (usually some machine in the network of your hosting provider). Adding the “prepend” option as we did above ensures that “127.0.0.1″ will appear on the top of the list of DNS servers. That magic number refers to your own computer. So in the future, whenever your computer needs to resolve a domain name, it will forward that request to dnsmasq (which is running at 127.0.0.1 – your computer). If the details for the domain name are already in you cache, well and good, dnsmasq will serve it up and make the process real fast. If it is not in the cache, then dnsmasq will look at the /etc/resolv.conf file and use the nameservers listed below the “127.0.0.1″.
I hope that explains things.

Now open the file/etc/resolv.conf in your text editor.
It probably looks like:

nameserver 10.17.3.252
nameserver 10.17.3.244

The 127.0.0.1 is missing right now since you haven’t renewed your lease after you edited the /etc/dhcp3/dhclient.conf file. So, let us add that in manually this one time.
After you do, your /etc/resolv.conf file will look like the following:

nameserver 127.0.0.1
nameserver 10.17.3.252
nameserver 10.17.3.244

Don’t worry if the numbers are different – if they are not, then hey – we must be neighbours 
Okay. We are almost done here. All we have to do now is to restart dnsmasq so that the changes we made to the configuration file take effect. You can do that using the command:

$sudo /etc/init.d/dnsmasq restart.

Now you are running a local DNS cache. If you want to measure your speed improvement, type the command:

$dig google.com

You will see something like “;; Query time: 106 msec” there.
Now type the command again, and you should see something like:”;; Query time: 2 msec”
Now type the command again, and you should see something like:”;; Query time: 0 msec”

See, the first time, since google.com’s details were not in your cache (you are using it for the first time), the query took 38 ms. The second time, the cache speeds up the lookup. I have been using this for over a month now, and haven’t had a problem.
The following is ONLY for dial-up customers.

Note: If you have a dsl connection, the following may work:
Basically, the differences are in how the “conf” files are edited and used.

Copy the /etc/resolv.conf file to /etc/resolv.dnsmasq.conf

Then, edit the /etc/dnsmasq.conf file as follows:

# Change this line if you want dns to get its upstream servers from
# somewhere other that /etc/resolv.conf
resolv-file=/etc/resolv.dnsmasq.conf

You also have to uncomment the line that sayslisten-address=127.0.0.1 or u don't, its no big problems.,

Now, edit /etc/resolv.conf to have ONLY the following line in it:
nameserver 127.0.0.1

Next, edit /etc/ppp/peers/provider and change the line:
usepeerdns to
# usepeerdns

n wvdial, if connect use that :

Next, edit /etc/ppp/peers/wvdial and change the line:
usepeerdns to
# usepeerdns

(that is, comment out that line)
The ppp client does not allow you to prepend the 127.0.0.1 entry to your /etc/resolv.conf file. So what we did in the above was to create a copy of your previous resolv.conf for dnsmasq to use for lookups, update the file to use a local cache, and then prevent the ppp client from overwriting the resolv.conf file the next time. Now you can restart the dnsmasq service as I explained above, and start enjoying faster name resolution.



*Thanx for visiting my blog's*

How to configure graphichs errors n become terminal

# remove fglrx packages
sudo /usr/share/ati/fglrx-uninstall.sh # (if it exists)
sudo apt-get remove --purge fglrx*

# remove and reinstall the open source driver
sudo apt-get remove --purge xserver-xorg-video-ati xserver-xorg-video-radeon
sudo apt-get install xserver-xorg-video-ati

# replace lingering proprietary libraries with the open-source versions
sudo apt-get install --reinstall libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core
sudo dpkg-reconfigure xserver-xorg

Oh here's how I had to get it working:
1. Remove the 2.6.35 kernel, as fglrx crashed during the installation of the kernel
2. Restart and boot to the normal 2.6.32 kernel
3. Remove fglrx, fglrx-amdcce (some name like that) and one other package, automatically removed with fglrx
4. Tried running /usr/share/ati/fglrx-uninstall.sh - it would error out, so I had to remove /usr/share/ati
5. Reboot in safe graphics mode
6. Remove /etc/X11/Xorg.conf*
7. Reinstall fglrx, which ran dkms to update the kernel
8. Run sudo aticonfig --initial
9. Reboot
10. Enable composition - System -> Preferences -> Appearance -> Visual Effects -> Normal

sudo update-grub reboot.

to confirm you are running the new kernel type in a terminal:

uname -a

Install flashget combine with flashgot n substitute IDM from windows

Ubuntu user can download the deb package and double-click to install,then there should be a launcher “FlashGet” in Applications->Internet menu.

Source Package :
1.) FlashGet(.tar.gz)
2.) FlashGet(.rpm)
3.) FlashGet(.deb)

U must used wget to successfully download file, with command :
wget http://bbs.flashget.com/download/flashget-1.0.2-0_en.noarch.deb

Configure Firefox Plugin for Flashget:

There’s a popular Firefox plugin called Flashgot that can launch download manager in Firefox.However,before install this plugin,we need to do following first:

1.Open up a terminal window (Applications->Accessories->Terminal) and execute:

gconftool-2 -s /desktop/gnome/url-handlers/flashget/command '/usr/bin/flashget %s' --type String

gconftool-2 -s /desktop/gnome/url-handlers/flashget/enabled --type Boolean true

2.Open Firefox and type about:config in address bar,then click “I’ll be careful,I promise!”

Right-click on blank area -> New ->Boolean -> network.protocol-handler.external.flashget -> true
Right-click on blank area again -> New -> String -> network.protocol-handler.app.flashget -> /usr/bin/flashget

3. Run this command:

sudo echo -e '#''!'"/bin/sh""\n""/usr/share/flashget/flashget "'$'"1" >/usr/bin/flashget

Now,install FlashGot plugin from this link: https://addons.mozilla.org/en-US/firefox/addon/220/
restart Firefox and go to Tools -> Add-ons -> Extensions -> FlashGot Preferences -> Click “add” in General tab and add FlashGet download manager (see the screenshot):

Rabu, 23 Maret 2011

How To Istalling warcraft on ubuntu

WorldofWarcraft
Before you get started
In Linux, Direct Rendering Infrastructure (DRI) facilitates faster graphics rendering, so before you begin the installation you should check whether DRI is enabled. To do this, run the following command:
glxinfo | grep rendering
You should see output similar to this:
direct rendering: Yes
If this line says "No", it means that graphics data will not be passed directly to the graphics hardware, thus significantly reducing speed at which WoW will run. This is usually caused by a configuration issue with the graphics card driver. See the troubleshooting section for elaboration.
Note though that even if you do have Direct Rendering, it might not be enough. If you graphics card is an Intel GMA, your performance will be low in any case. Most people who successfully play WoW on Ubuntu are probably using an NVIDIA or ATI card with proprietary drivers.
Installing Wine

he official deb package file of Wine from WineHQ's download page, is recommended for most users, as it works almost out of the box for most people, and has a gold rating at the moment.
For full instructions on installing Wine see the Wine page.
Deb package
1. You can easily install Wine through the repositories. Ubuntu will automatically configure and install it for you. You can go to System, then Administration and Synaptic Package Manager, search for it and mark for installation.
You may also use the command line. Simply run:
sudo apt-get install wine
2. Before proceeding to install World of Warcraft you must run winecfg at least once (it must setup the ~/.wine directory structure before you can install Windows applications into it). This is a very important step. In a Terminal window type the following:
winecfg
Select your Windows type, configure disk and removable drives, etc, then press Apply and Ok. As it closes, winecfg will create a .wine directory structure in your home folder, populating with information about drives and devices installed in your system. If you fail to do this before trying to install World of Warcraft then you'll probably see errors like the following when running winecfg in the future:
err:winecfg:apply_drive_changes unable to define devicename of 'C:'
Compiling Wine from source
Other experienced users, who are unable to make this work or just want more control over the installation, may want to try to compile Wine from source in order to play WoW. Instructions can be found here: https://wiki.ubuntu.com/BuildingWineFromSource

Installing WoW
Original WoW
If you have the installation discs, this guide recommend that you copy the contents of your discs to your hard disk and install WoW from there. If you have the new DVDs see the note below.
Create a convenient directory ( 'wow_install' on your Desktop for example)
Copy all of the files from the first WoW CD to this new directory.
For each of the remaining WoW CD's, copy just the 'Installer Tome #.mpq' files. In the end, you should have the 'DirectX' directory, and the 'autorun.inf', 'installer.ico', 'Installer Tome.mpq', and 'Installer.exe' files from disc 1, and 'Installer Tome 2.mpq', 'Installer Tome 3.mpq', 'Installer Tome 4.mpq', and 'Installer Tome 5.mpq' from the remaining discs. Note that the 'Installer.exe' file on the first disc is different from the files of the same name on the subsequent discs; if you get the wrong one the install will fail with
Unrecognized key "options". (AttributeParser::Parse)
Note that on some WoW DVD's the installer executable is hidden and you need to re-mount the disc with the 'unhide' option. To do this type in a terminal:
sudo umount /dev/cdrom
sudo mount -t iso9660 -o ro,unhide /dev/cdrom /media/cdrom0/
Start the installation by opening a terminal and running these commands:
cd //
wine Installer.exe
Replace  with the right path to the directory where you copied all the files above.
Some dialogs during installation may appear blank or garbled, and the installer may even hang for up to 5 minutes at 100% CPU, while appearing to be doing nothing. Simply wait and click next when possible.
Note: If you have not already done so, you may want to install Microsoft's proprietary fonts, because they can solve some text related graphical glitches during installation.
Burning Crusade
The BC install is more or less the same as the base game install.
Create a new directory separate from the directory where you copied the original game discs.
Copy the 'Autorun.inf', 'Installer.exe', 'Installer.ico', and 'Installer Tome.mpq' files from the first Burning Crusade disc to this new directory.
Copy just 'Installer Tome 2.mpq', 'Installer Tome 3.mpq', and 'Installer Tome 4.mpq' from the remaining install discs.
Run the installer by opening a terminal and executing these commands:
cd //
wine Installer.exe
Replace  with the right path to the directory where you copied all the files (the BC files, not the original WoW files).
Alternate Installation Methods
If the above isn't possible for some reason (you don't have the discs for example, or a working media drive), here's some alternate ways to install the game.
Alternative 1 (Installing in Windows):
Just install WoW in Windows and run WoW under Wine from your Windows Partition. Or copy the entire World of Warcraft folder over from your Windows installation after installation to play from your Ubuntu partition.
Alternative 2 (Download the Entire Game):
If you have lost a CD, do not have access to a CD drive or simply would not like to bother with patching and messing with the CD's, you can download and run the installer, which is in fact the full game almost fully patched, from the blizzard downloader. They work very nicely with Wine.
Installer Downloads: Original WoW - US Version Burning Crusade - US Version (requires a valid account for log in) WoW - European clients, in all languages
In order to use the Blizzard Downloader effectively, you must 1) open certain ports on your computer and 2) enable port forwarding on your router.
Firewall Configuration for Blizzard Downloader
The easiest way to open these ports is to use the firewall program Firestarter.
From the command line, install Firestarter with this command: sudo apt-get install firestarter.
When it is running, select the "Policy" tab, right-click in the Allow Service area, and select Add Rule.
Under port, type 6112 and make sure that the "Anyone" radio button is selected. Make a note in the comments field that this port relates to Blizzard.
Repeat these steps for ports 3724 and for the range 6881-6999 (which will be recognized as BitTorrent ports).
Router Configuration for Blizzard Downloader
Next, configure your router to forward those ports on the router to your computer only. The steps are similar to the above, but vary slightly from router to router and may be found on Blizzard's website: http://www.blizzard.com/support/wow/?id=aww01199p
Once the firewall is configured and the network port forwarding is working, run the downloader with (Burning Crusade US Version example):
wine WoW-BurningCrusade-enUS-Installer-downloader.exe
Configuration
OpenGL or Direct3D
Background
The Windows version of World of Warcraft supports 3D rendering using either Direct3D or OpenGL. The Direct3D mode in WoW is the most tested and it has a number of features over the OpenGL mode, such as support for a hardware cursor. However, in Wine the Direct3D mode is supported only through an emulation layer, that runs on top of OpenGL. Therefor this guide recommends that you enable the OpenGL mode directly, instead of using it indirectly through Direct3D. This works better for most people.
Enable OpenGL mode
Find the file wtf/Config.wtf in your main WoW directory. By default it is found in/home//.wine/drive_c/Program\ Files/World\ of\ Warcraft/, where is you computer login name. Note that since .wine begins with a period, you will not be able to see it, but you may still access it in a terminal. In the Nautilus file manager, you can press Ctrl + h to see hidden files. If config.wtf does not exist, run the game and log into a character, then exit WoW. The game should then have created the file. Open it using a text editor, and add the following line to it:
SET gxApi "opengl"
Hardware cursor in OpenGL
There is a workaround to get a kind of hardware cursor even in OpenGL mode. The workaround is to use a slightly modified version of Wine which will always display the X11 cursor (which is not laggy). If you are interested, there is a thread in the forums discussing it. Instructions explaining how to get started can be found in the thread.
Playing
Start from the Desktop Icon
Double click the icon you find on your Desktop titled World of Warcraft, this will start the launcher. If you have never used something requiring HTML rendering with Wine you will be prompted to download and install the Gecko rendering engine. Do this as it will enable the WoW Launcher to display news.
Start from the Terminal
Starting from the terminal is simple, just enter:
wine "C:\Program Files\World of Warcraft\Launcher.exe"
(install when prompted about the Gecko rendering engine)
Or, dive right into the game with:
wine "C:\Program Files\World of Warcraft\WoW.exe"
Gnome menu icon
You can make a Gnome menu entry for WoW by doing the following commands in a terminal:
wget http://kde-files.org/CONTENT/content-files/41569-wow-icon-scalable.svg -O WoW.svg
sudo mv WoW.svg /usr/share/pixmaps/
gksudo gedit /usr/share/applications/wow.desktop
Add this to the text editor window, which should have appeared after the third command, change  in the Exec= line to your computer login username, and save:
[Desktop Entry]
Encoding=UTF-8
Name=World of Warcraft
Exec=wine /home//.wine/drive_c/Program\ Files/World\ of\ Warcraft/WoW.exe
Icon=/usr/share/pixmaps/WoW.svg
Terminal=false
Type=Application
Categories=Application;Game;
StartupNotify=false
Note: Remember that you should also edit the Exec= line to reflect your WoW installation path, if you've installed to a special location.
Troubleshooting
Audio troubleshooting
If you experience stuttering you could try this:
In config.wtf set:
SET Sound_SoundOutputSystem "1"
SET Sound_SoundBufferSize "150"
The optimum value for Sound_SoundBufferSize varies depending on you setup. It may be anything from 50 to 300.
If you are no hearing any audio at all from WoW, you may want to try to switch Wine to use a an older audio sub system named OSS. To do this, just type winecfg in a terminal, press enter, and the wine configuration application window should appear and you should go to the audio tab. In there, choose OSS. Make sure you only have one sound output system (e.g. ALSA/OSS/ESD) ticked at a time.
When an application is outputing sound through OSS, it will cause conflicts with other applications outputing audio, because OSS can only output audio from one application at a time. To work around this issue, you can wrap your running WoW/Wine instance with the never audio system using the padsp launch prefix in a terminal. Start wine by typing:
padsp wine WoW.exe
rather than just
wine WoW.exe
Graphics troubleshooting
If you are having trouble with your graphics, here is a few tweaks you could try.
Config.wtf
Add the following to Config.wtf:
SET ffxDeath "0"
SET ffxGlow "0"
Note that disabling ffxGlow may also enable antialiasing for some users.
If you experience a problem with missing character and object models, and/or the login windows background is black, add:
SET M2UseShaders "0"
regedit tweaks
This is a simple registry edit for Wine that either will either fix crash issues and increase frame rate in game, or it will decrease the performance and even make the game crash. You should give it a try to see what is does for you, as you may always easily remove it again, if it acts negatively for you.
Open a terminal window, type regedit and press enter. This will start the Wine equivalent of the windows registry editor. If you are familiar with using the registry editor under windows then this is pretty much the same.
1. Find this key HKEY_CURRENT_USER\Software\Wine\
2. Highlight the wine folder in the left hand pane by clicking left on it. The icon should change to an open folder
3. Right-click on the wine folder and select [NEW] then [KEY]
4. Replace the text New Key #1 with OpenGL
5. Right-click in the right hand pane and select [NEW] then [String Value]
6. Replace New Value #1 with DisabledExtensions (Notice it's case sensitive!)
7. Then double click anywhere on the line, a dialog box will open.
8. In the value field type GL_ARB_vertex_buffer_object
More troubleshooting can be found at WorldofWarcraft/Troubleshooting.


To start/run Windows programs using Wine
After installing an application using the directions above, those applications can be started and used by entering wine programname.exe (e.g. wine realplayer.exe). When done, close the application as one would normally. You must run the installed executable, which will by default be in the virtual Windows drive created by Wine, at ~/.wine/drive_c. Generally programs will install themselves somewhere under Program Files inside the virtual Windows drive, following Windows conventions.
You can also use the Wine file browser, by running winefile in a terminal. Clicking the C:\ button in the toolbar will open a window where you can browse the virtual Windows drive created in .wine. Doubleclicking an executable in the Wine file browser will run it in Wine.
Instead of having to always enter the terminal or use the Wine file browser, you may also create a desktop icon, and start a Wine application using that icon. To do this, right click on the desktop and select "Create a launcher." If you wish, select an icon from the list of available icons (or browse to an icon you would like to use), fill out other information that is requested (Name, generic name, etc.). For the command, type in wine the-location-of-the-program.exe (e.g. wine /home/john/.wine/realplayer.exe). The most important part of creating a launcher is the command, the generic name is not as important. Just make sure you de-select "Run in terminal." This completes the process.
In some cases the application requires to be running from a certain location. In this case create launcher with command
sh -c cd /home/USER/.wine/drive_c/Program Files/Appdir/; wine /home/USER/.wine/drive_c/Program Files/Appdir/game.exe
Of course you will need to replace USER and Appdir with the proper data.
If you desire to have an icon on the panel, create a launcher on the panel of choice. Do this by right-clicking the panel, selecting "Add to Panel," and selecting "Custom Application Launcher." This will ask you for the same information as before.
Alternatively, to make life easier, you can set it so wine will automatically open .exe files files for you - instead of using the Wine File to locate the file each time. To do so, right click on the .exe file, select Properties, and then select the Open With tab. Click the 'Add' button, and then click on 'Use a custom command'. In the line that appears, type in wine, then click Add, and Close. Now all .exe files will be automatically opened by Wine, so you can use Nautilus to browse and open them instead of the Wine File.
Uninstalling Wine Applications
Open up a terminal window and type the command below.
wine uninstaller
What this will do is open up a program similar to the Windows add/remove programs control panel, allowing you to uninstall applications from a Wine installation. Running uninstall programs directly via Wine should also work normally. Alternatively, you could also simply delete the folder of the application. However, as when done in Windows, this method will be unclean and will not remove the program's configuration from the Wine registry like using an uninstaller will.
Configuring Wine
On the command line or in Run Application, type
winecfg
Adding CD and DVD drives to Wine
Go to the drives tab in winecfg. Hit the Autodetect button.
If you find that this does not work correctly for you, then follow these instructions:
1. Run
winecfg
1. Navigate to the drives tab
2. Click on Add...
3. In the path bar, type
/media/cdrom
1. Click Show Advanced button below the Browse... button and set the Type to
CD-ROM
1. Click OK
If you have more than one CD/DVD device you will need to identify each one differently. Use /media/cdrom0 for the first CD/DVD device, /media/cdrom1 for the second one, and so on. If in doubt, type the following command in your terminal.
ls -la ~/.wine/dosdevices/
What this command will do is check your CD/DVD device details after Wine is installed.
Adding applications to the menu
It is good procedure before setting up the menu entry to launch the new Windows program from the command line to make sure the program runs properly. To do this type this command in the terminal.
wine "C:\PATHTOPROGRAM\Program.exe"
For example the command would be wine "C:\Program Files\World of Warcraft\WoW.exe" Once you are satisfied that you have the correct details, use the normal menu editing process to add a new entry. When you get to the Command field of the entry editor be sure to copy and paste the line you used to launch the program from the terminal. Finish and save the new entry. Test to make sure the new Windows program loads via the menu.
Changing application specific settings
1. Type this command into your terminal.
winecfg
1. Click on Add Application...
2. Navigate to where the .exe is and choose that program
3. The dropdown at the bottom allows you to choose which version of Windows Wine should emulate. Also, any changes to the Libraries and Graphics tabs will only affect the chosen application in the Applications tab.
Using Windows Themes/Skins In Wine
Color Scheme
You can change the wine color scheme to closely match the default Ubuntu colors with this Terminal command.
gedit ~/.wine/user.reg
You may also want to create a backup copy in your Home folder with this command via terminal.
cp ~/.wine/user.reg ~/
Replace the [Control Panel\\Colors] section with
[Control Panel\\Colors] 1176981676
"ActiveBorder"="239 235 231"
"ActiveTitle"="203 133 61"
"AppWorkSpace"="198 198 191"
"Background"="93 77 52"
"ButtonAlternativeFace"="200 0 0"
"ButtonDkShadow"="85 85 82"
"ButtonFace"="239 235 231"
"ButtonHilight"="255 255 255"
"ButtonLight"="255 255 255"
"ButtonShadow"="198 198 191"
"ButtonText"="0 0 0"
"GradientActiveTitle"="239 235 231"
"GradientInactiveTitle"="239 235 231"
"GrayText"="198 198 191"
"Hilight"="246 200 129"
"HilightText"="0 0 0"
"InactiveBorder"="239 235 231"
"InactiveTitle"="239 235 231"
"InactiveTitleText"="255 255 255"
"InfoText"="0 0 0"
"InfoWindow"="255 255 166"
"Menu"="239 235 231"
"MenuBar"="239 235 231"
"MenuHilight"="246 200 129"
"MenuText"="0 0 0"
"Scrollbar"="239 235 231"
"TitleText"="255 255 255"
"Window"="255 255 255"
"WindowFrame"="0 0 0"
"WindowText"="0 0 0"
Using Theme/Skins
Wine has basic handling for Windows theme/skin files in the "msstyles" format. There is a large number of these themes onDeviant Art. To use these you must make a folder in Wine's virtual Windows drive, then tell Wine to use the theme.
Firstly go into Wine's virtual drive, which is usually ".wine/drive_c" in your Home folder (this is hidden, you may need to select View->Show Hidden Files in the file manager). Inside this folder go into the "windows" folder then make a new folder in there called "Resources". Enter this new folder and make a new folder called "Themes". Inside here you should make a folder for each theme you want, and put the files ending in ".msstyles" directly into them. For example, the full path to a theme file called sample.msstyles might be "/home/username/.wine/drive_c/windows/Resources/Themes/Sample/sample.msstyles".
Next you need to tell Wine to use your theme, so once again run this command in the terminal.
winecfg
In the configuration window select the tab Desktop Integration and un-check out the Theme: box, which should now have your theme in it's menu. After selecting the theme click Apply at the bottom to see how it looks (they don't always display properly), then if you are happy click ok and you're done!
Fullscreen issues with overlapping Panel
Sometimes the Panel overlaps your fullscreen application you're running in wine. If you are running Visual Effects, the first solution you should try is to turn those off: Go to System -> Preferences -> Appearance, and click the Visual Effects tab. Select None, and your screen will flash. Try your full-screen application again. You may re-enable Visual Effects afterwards - just don't forget to turn them back off when you want to run that application again!
If that does not work, then you will have to turn off the panels prior to running the application and restarting it afterwards, until a better workaround can be found. In Ubuntu the commands are gnome-session-remove gnome-panel and gnome-panel & respectively. In Xubuntu I understand they are killall xfce4-panel and xfce4-panel.
Instructions for using wine over remote X11 sessions
If you're (trying) to use wine over a forwarded X11 session (ie Ubuntu is on one computer; you're connected to it by ssh or another connection and you already have X11 forwarding set up to display regular Ubuntu applications on your remote computer) and the windows opened by wine are lacking fonts etc, the answer is here
Instructions for specific Windows programs
Some Windows programs have been tested on Ubuntu. They are listed below:
DVDShrink
FlashPlayerStandalone
WorldofWarcraft
Also, see Wine's Application Database at http://appdb.winehq.org/ or http://wine-review.blogspot.com/

Creating file associations
f you want certain files to open in a windows application by clicking on them, the best way is to create a script. For example I want Adobe Flash project files (*.fla) to open in Adobe's Flash editor if I double click it.
You can for example create a file using this terminal command.
gedit ~/.wine/Flash\ 8
Now paste the following example script in it, save and close gedit.
Example script:
#!/bin/sh

QUICKPARLOCATION="c:\\Program Files\\Macromedia\\Flash 8\\Flash.exe"
PARAM=`winepath -w "$*"`
wine "$QUICKPARLOCATION" "$PARAM"
exit 0
Make sure the file is executable with this command.
chmod +x ~/.wine/Flash\ 8
After you completed this go to an *.fla file right click it, properties, go to the “open with” pane, click add, add this line into your terminal and select the radio button.
'/home//.wine/Flash 8'
Now if everything went ok, you can doubleclick the file and it will be openend in Flash 8.
Troubleshooting
Error: Cannot change screen BPP from 32 to XX
In some cases (mostly games) the application does not start and you get error: Cannot change screen BPP from 32 to 16 (or some other number).
In such case editing xorg.conf and CTRL-ALT-Backspace helps as is described on http://ubuntuforums.org/showthread.php?t=649283
'dhtmled.ocx' is missing or invalid
It seems that in Ubuntu Karmic Wine(v1.0.1) registry isn't configured correctly to use ActiveX component dhtmled.ocx. On some application this can cause error like this: "Component 'dhtmled.ocx' or one of it's dependencies not correctly registered: a file is missing or invalid". So we must tell Wine where to find this file.
1. Download registry file:
cd ~
wget http://jwc.sourceforge.net/other/ieslinux-dhtmledit.reg
2. Open regedit:
wine regedit.exe
3. Import the downloaded registry settings
file->import registry file->open ~/ieslinux-dhtmledit.reg
Screen flickers to black when starting an application
This is sometimes caused by a problem with the video driver not handling XRandR well. To see if this is actually a problem with XRandR, in a console, run:
xrandr
If your screen blanks while running that command, then this might be the issue. To work around this issue, Wine can be configured to not use XRandR. To do so:
1. Start Wine's Registry Editor.
2. Navigate to "HKEY_CURRENT_USER\Software\Wine\X11 Driver". You may need to create X11 Driver.
3. Create a new key called "UseXRandR" and set it to "N".
See Wine Bug #15214 and Wine Wiki page UsefulRegistryKeys.
HOWTO: WoW with Wine

This howto is for installing and playing World of Warcraft using Wine under Ubuntu.

The howto found in this post is just a short'n'simple version, intended to demonstrate the minimum amount of steps required to make WoW run. The complete howto, which will likely be more of a help to you, is found in the Ubuntu community documentation wiki:
https://help.ubuntu.com/community/WorldofWarcraft



Short'n'simple HOWTO 
(only 8 steps)

1. Install Wine from here: http://www.winehq.org/download/deb

2. Copy all of the files from all of the CD's to a directory on your hard drive. Just overwrite when prompted, and make sure to copy CD 1 last (you need a specific file from CD 1).

3. Open a terminal (also called a konsole, CLI, and command prompt) and do these commands inside to start the installation:
Code:
cd //
wine Installer.exe
Replace with the right path to the directory where you copied all the files.

4. Wait and click next when possible. 

5. Do this command in a terminal, and just press ok to close the configuration utility that opens:
Code:
winecfg
6. Now run this command in a terminal:
Code:
gedit ~/.wine/drive_c/Program\ Files/World\ of\ Warcraft/wtf/Config.wtf
Add these lines to the text file:
Code:
SET SoundOutputSystem "1"
SET SoundBufferSize "150"
SET gxApi "OpenGL"
7. Save the file and exit.

8. You should be able to play WoW using the shortcut on your desktop, or by running this command:
Code:
wine "C:\Program Files\World of Warcraft\WoW.exe"


Reg tweak
This is a simple registry edit for Wine that either will either fix graphical glitches, increase framerate, or even stop the game from crashing, or it will create glitches, decrease the performance, and even make the game crash. You should give it a try to see what is does for you, as you may always easily remove it again, if it acts negatively for you.

Open a terminal window, type regedit and press enter. This will start the Wine equivalent of the windows registry editor. If you are familiar with using the registry editor under windows then this is pretty much the same.

Notice: the guide below is case sensitive!

1. Find this key HKEY_CURRENT_USER\Software\Wine\
2. Highlight the wine folder in the left hand pane by clicking left on it. The icon should change to an open folder
3. Right-click on the wine folder and select [NEW][KEY]
4. Replace the text New Key #1 with OpenGL
5. Right-click in the right hand pane and select [NEW] then [String Value]
6. Replace New Value #1 with DisabledExtensions
7. Then double click anywhere on the line, a dialog box will open.
8. In the value field type GL_ARB_vertex_buffer_object



How To Get Help
If this short guide doesn't work right away for you, then please look over the complete howto first:
https://help.ubuntu.com/community/WorldofWarcraft

If, after following every step in the complete howto, you are still having troubles running the game, I would like to invite you to look over this comprehensive troubleshooting article, for common issues, that arise from following this guide:
https://help.ubuntu.com/community/Wo...roubleshooting

Also, in case the troubleshooting section doesn't solve your issue, you are welcome to post questions in this tread, but in order for other people to be able to effectively help you, you need to be very descriptive about your issue, and post some useful info about your system specs etc. Please write up some details about your
CPU
RAM
Graphics card make and model
Graphics card driver version number
Wine version number

And please be polite to people. We are all just jolly amateurs, like yourself. 


For more troubleshooting :
http://ubuntuforums.org/showthread.php?t=579378

Selasa, 22 Maret 2011

busybox v1.15.3 (ubuntu 1:1.13.3-1ubuntu1)built_in shell(ash)

I couldn't do anything else. I don't want to loose my not backed up info.
I googled the error and I found that I could boot from a live cd so I downloaded Ubuntu 10.10 and boot it from livecd... Now I am running firefox from livecd trying to fix this error.

How to resolv :

Simple ways is :
It looks like it's not detecting your root partition (/dev/sda1), which is the partition that essentially contains your OS. (/)
The reason you can't input anything probably is because the console isn't loaded yet. (initramfs) somehow doesn't seem a proper console prefix to me but I might be wrong, you might want to give it some time to load.
However, I find it hard to believe that just a CUPS (Common Unix Printing System) update could cause this since CUPS is just the Linux print service.
When you boot your computer, the GRUB bootloader should give you a choice which kernel to use. See if there is a kernel that has a lower version than the one selected and see it that boots.
If it does, the kernel entry is probably faulty and won't load the proper drivers/modules for it to find your hard drive. Creating a new entry or rebuilding your kernel might work.
If that doesn't work, you might want to boot Ubuntu into recovery mode and see if you can access /dev/sda1 from there.

1.) Restart computer with a live-Cd.
Open a terminal window.
At the command prompt, write:
sudo fsck -f /dev/sd??
You must change "sd??" to something else(with ur own partition)

or u can use :

2.)When you turn on the computer, hold down the SHIFT key and the grub menu should show. Then select an older kernel.
Or boot the live CD and download and run the bootinfoscript and post the output here.
While you're figuring out the bootinfoscript you can give us the output of
Code:
fdisk -l
and
Code:
ls /boot

or u can read tis articles :

3)grub or grub2

4.) Extrass from others sites :

Recently I messed up GRUB boot loader in my laptop installed with Ubuntu which resulted in grub rescue prompt. So I had to boot Ubuntu Live CD to get it fixed. Thought of blogging it, may be useful for some one.

This fix involves two steps. First one is to chroot into Ubuntu installation partition. Second one is to install the grub MBR (Master Boot Record). I am using Ubuntu Lucid 10.04 and Live CD also of same.

Step-1: Boot your machine with Ubuntu Live CD and select Trying Ubuntu without installation option when it is prompted (Live CD mode)

Step-2: Be patient till you get complete desktop ready.

Step-3: Ubuntu main menu -> Places -> Home Folder -> Look for other partitions listed on left hand side pane. Mount one by one and identify your Ubuntu root partition. When you are in your root partition, press Ctrl+L to view the complete mount path. Press Ctrl+C to copy this path. This path is normally /media/xx..xx kind of long path, where xx..xx denotes your hard disk partition unique id.

If you know your Ubuntu root partition you can replace the above GUI step-3 with simple mount command like this (Applications -> Accessories -> Terminal):

$ sudo mount /dev/sdax /mnt/myroot (where sdax is your root partition)

Let’s say you have mounted root partition at /media/xx..xx.

Step-4: $ Run the terminal through Applications -> Accessories -> Terminal.

Step-5: Run the following commands to export the pesudo file system of Live CD to your would be root file system soon.

$ sudo mount ‐‐bind /dev /media/xx..xx/dev

$ sudo mount ‐‐bind /proc /media/xx..xx/proc

$ sudo mount ‐‐bind /sys /media/xx..xx/sys

Step-6: Changing the root file system of live system to your hard disk installed root file system.

$ sudo chroot /media/xx..xx

Step-7: Installing GRUB Boot record in Master Boot record of your hard disk. My hard disk is sda. Replace your hard disk device node in the following command.

$ sudo grub-install /dev/sda

Step-8: Reboot the Live Ubuntu. Eject the CD.

Minggu, 20 Maret 2011

Install Office pada ubuntu

Sukses install SuperOS 10.10, pengen install Microsoft Office 2007 dengan Wine bawaannya. Biasanya langsung klik kanan setup.exe dan pilih Open With Wine sudah bisa install. Tapi gak tahu kenapa (karena masih awam ) yang muncul adalah tulisan

“The file ‘/media/Data/Applications/Jendela/Microsoft Office 2007 Enterprise/setup.exe’ is not marked as executable. If this was downloaded or copied from an untrusted source, it may be dangerous to run. For more details, read about the executable bit.”?

Caranya:

Masuk ke folder tempat Microsoft Office berada melalui terminal. Buka Applications – Accessories – Terminal. Contoh file saya berada di /media/Data/Applications/Jendela/Microsoft Office 2007 Enterprise. Ketik di Terminal cd /media/Data/Applications/Jendela/Microsoft Office 2007 Enterprise tekan enter.

Setelah berada di /media/Data/Applications/Jendela/Microsoft Office 2007 Enterprise$ ketikkan wine ./setup.exe

Setelah itu install seperti biasa.

or just follow this :
forums.
stream.
geek.
or just download the scripts :
gtk scripts.

How To fix Grub after install windows

U can read complex articles or just going to CD for resolving ur fixed for grub

Recovery Using the Ubuntu Desktop/Live CD (RECOMMENDED)

You can check the current version installed on your system via Synaptic or from the command line. Open a Terminal and enter the following:
grub-install -v
GRUB 2 should display a version number of 1.96 or later. Legacy GRUB is version 0.97.
Create and boot from a Live CD
Grub2: Download the latest version of Ubuntu Desktop edition from http://www.ubuntu.com/GetUbuntu/download and burn your Ubuntu CD.
. Grub Legacy: See the dual-boot guide about recovering grub

Reboot your computer and boot into a live session.
Mount your Ubuntu partition from Places menu. If you have multiple Ubuntu partitions (e.g., /boot, /home, /), you need to mount the /boot partition.

Are you using Grub or Grub 2?

Go into boot/grub directory and check for the existence of the files menu.lst and grub.cfg.

. Grub Legacy uses boot/grub/menu.lst.
. Grub 2 uses uses boot/grub/grub.cfg.
1.If you are still not sure, view the file and check whether syntax follows Grub2 conventions.
If you downloaded Ubuntu Karmic 9.10 Live CD, but your installed version of Ubuntu uses Grub Legacy, please use this guide
https://help.ubuntu.com/community/DualBoot/Grub#Ubuntu%209.10%20&%20earlier
Overwriting the Master Boot Record

Existing MBR will be lost. In order to dual-boot your computer, we will be creating a new Master Boot Record to include all operating systems, including Ubuntu Linux and Microsoft Windows. This is to be expected.

Your Ubuntu partition is now mounted. You will need to continue Using the Terminal.
Verify if your partition is correct.
mount | tail -1
You should see output similar to this:
/dev/sda2 on /media/0d104aff-ec8c-44c8-b811-92b993823444 type ext4 (rw,nosuid,nodev,uhelper=devkit)
Note the designation for the disk /dev/sda which you will be using later, and the directory in /media.

Use Tab Completion in Terminal to complete the path. Hitting the key will automatically finish file names, directory locations, and other long or hard to type file names.
To make sure this is indeed the Ubuntu boot partition, run
ls /media/0d104aff-ec8c-44c8-b811-92b993823444/boot
But substitute the example's UUID, 0d104aff-ec8c-44c8-b811-92b993823444, with your volume's UUID which you found earlier. If your boot partition was a separate partition which you mounted in a previous step, use this instead
ls /media/0d104aff-ec8c-44c8-b811-92b993823444
In either case, the output should be something like this:
config-2.6.18-3-686 initrd.img-2.6.18-3-686.bak System.map-2.6.18-3-686
grub lost+found vmlinuz-2.6.18-3-686
initrd.img-2.6.18-3-686 memtest86+.bin
If what you have is not similar, unmount it and try another partition.
Now that everything is mounted, we just need to reinstall GRUB by specifying the correct directory and the correct drive name:
sudo grub-install --root-directory=/media/0d104aff-ec8c-44c8-b811-92b993823444 /dev/sda
If you get BIOS warnings try:
sudo grub-install --root-directory=/media/0d104aff-ec8c-44c8-b811-92b993823444 /dev/sda --recheck

Replace /dev/sda with the location you want to install GRUB on.
If all went well, you should see something like this:
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(hd0) /dev/sda
Reboot, making sure to boot to your hard drive and not to the live CD. Grub should be installed and both Ubuntu and Windows should have been automatically detected and listed in the menu.
The Master Boot Record will execute Grub as the initial boot-loader. The Windows boot-loader is contained within the Windows partition and will then be chainloaded by the Grub boot-loader.
For Grub Legacy
Please refer to the guide
https://help.ubuntu.com/community/DualBoot/Grub#Ubuntu%209.10%20&%20earlier

Troubleshooting
I don't see a Grub menu
If the menu is not normally displayed during boot, hold down the SHIFT key as the computer attempts to boot to display the GRUB 2 menu. For Grub Legacy, use ESC key to display a menu.
Grub comes up in shell mode with no boot menu
You may have mixed up Grub Legacy and Grub 2. This symptom is most typical when you assumed you have Grub 2, but your Ubuntu OS actually uses Grub Legacy. Follow these instructions again using Ubuntu 9.04 Live CD.
If you are certain you have Grub 2 and it's still displaying shell mode by now, follow the method using chroot listed here...http://www.ubuntu-inside.me/2009/06/howto-recover-grub2-after-windows.html.
What if Grub 2 does not list Windows
If, after installing grub, Windows does not appear in the boot-menu, boot into Ubuntu and execute command
sudo update-grub2
Grub 2 gives "error: no such device: xxxxx.xxxxx.xxxxx.xxxx"
If at any time grub2 gives this error, boot up into Ubuntu (on hard disk if possible, otherwise with Live CD), open a terminal and run command
sudo update-grub2
This should automatically detect the devices and configure grub appropriately.
What if Grub Legacy misses Windows
If, after installing grub, Windows does not appear in the boot menu, you will need to edit /boot/grub/menu.lst (That is a lowercase "L" and not the number 1 in menu.lst)
Open a terminal and enter:
gksu gedit /boot/grub/menu.lst
Or, in Kubuntu:
kdesu kate /boot/grub/menu.lst
Your Windows stanza should look something like this:
title Windows XP/Vista # Use any title you wish, it will appear in the grub boot menu
rootnoverify (hd0,0) # This is the location of the windows partition
makeactive
chainloader +1
Note: Put your Windows stanza before or after AUTOMAGIC KERNEL LIST in the menu.lst
Recovery using Microsoft Windows and Its Bootloader

If you have your Linux system in a second (or third...) hard disk this method will not work. Please check Super Grub Disk's method that address this problem.
This method will also fail with Grub 2.
This method allows you to restore GRUB and keep the Windows boot-loader as your primary boot-loader. Thanks to Ubuntu's support for NTFS writing this method is now quite simple.
The previous method puts GRUB back on the MBR (Master Boot Record) of the hard drive instead of in the root partition. Should you not wish to do so, for instance if you use a third-party boot manager like Boot Magic or System Commander, this next suggestion will be helpful. Another reason to prefer this method is for when restoring the Grub menu after a re-ghosting. In either case, use this alternative.
Restoring GRUB
1. Boot from a Live CD, like Ubuntu Desktop, or similar. It is recommended to use Ubuntu 9.04 or newer as this has NTFS write support.
2. Open a Terminal. Open a root terminal (For non-Ubuntu live CDs type su the terminal. For Ubuntu based distros run
sudo -i}
Enter root passwords as necessary.
3. Type
grub
which makes a GRUB prompt appear.
4. Type
find /boot/grub/stage1
You'll get a response like "(hd0)" or in my case "(hd0,3)". Use the output from this command for the following commands.
Note:
You should have mounted the partition which has your Linux system before typing this command. (e.g. In Knoppix Live CD partitions are shown on the desktop but they're not mounted until you double-click on them or mount them manually)
5. Type
root (hd0,3)
note the space between root and (hd0,3).
6. Type
setup (hd0,3)
into the prompt. This is key. Other instructions say to use "(hd0)", and that's fine if you want to write GRUB to the MBR. If you want to write it to your Linux root partition, then you want the number after the comma, such as "(hd0,3)".
7. Type
quit
8. At this stage you can either restart the system and install your own boot-loader, or you can continue and tell the Windows boot-loader where to find GRUB which will handle booting Linux.
Making Windows Load GRUB (and then Linux)
This is taken from Dual-Boot Linux and Windows 2000/Windows XP with GRUB HOWTO which has been helping people dual boot since at least 2005.
1. In Linux open a command window.
2. Mount a drive which you can share with Windows. This could be a USB drive, a FAT32 partition on your hard drive, or if you are using a Linux distribution which supports NTFS writing natively (Such as Ubuntu 8.04 or later) then you can mount the actual Windows C:\ drive itself! The advantage of writing to the Windows drive is that you are going to need to put a file there eventually, so it saves time copying a file around. For example:
#mkdir /tmp/windows
#mount /dev/sda1 /tmp/windows
However, when writing directly to the C:\ drive you could also do some damage to the system if you delete or move something. If you do pick the option to write directly, go in, put the file where it belongs, and touch NOTHING else.
3. Now you are going to make a copy of your boot partition. Finding out what this is called is not always completely reliable since the Linux naming conventions differ from the GRUB naming conventions. Linux labels partitions as hd[Letter][Number] orsd[Letter][Number] whereas GRUB always names them as hd[Number][Number]. If you installed GRUB on (hd0,0), then the/boot partition will be on hda1 or sda1. (Since (hd1,0) == hdb1 or sdb1, then by extension if you installed GRUB on (hd0,1) then the /boot partition will be on hda2 or sda2 and so on and so forth.) This narrows you down to two possibilities. If you now paste
ls /dev |grep hd
it will let you know if you have that drive on your machine. If nothing comes up which matches, then that means you must have an sd drive.
Note: The command df won't work as you are booted from a Live CD.
4. Having determined your boot partition run this command as root by using sudo
sudo #dd if=/dev/sda2 of=/tmp/windows/linux.bin bs=512 count=1
Looking at this example /dev/sda2 is your boot partition and /tmp/windows/ is the drive you want to copy the boot sector image to.
5. If you haven't created linux.bin in the Windows drive then you need to copy it there now.
6. Next, reboot your computer and boot into Windows. Open C:\boot.ini in Notepad, and add a new line at the bottom:
c:\linux.bin="Linux"
This file might be write protected. If that is so, you need to enable writing to the file. To do so, right click, and from the context menu select Properties. Then uncheck the box that says "File is read only". Make sure to put that checkmark back afterwards.
Next, make sure that at the top of the boot.ini file there is a timeout set, i.e timeout=5 or some such number.
Do not edit this file from the Live CD, even if you have NTFS write support. Linux and Windows represent line breaks in different ways, so even though you can edit the file, it won't add a new line.
7. That's it, reboot and you will be given the option of booting into Linux, selecting that will chainload GRUB and this will let you boot into your Linux distro.
Source: http://ubuntuforums.org/showpost.php?p=121355&postcount=5

Recovery Using the Unofficial Rescatux
Note about grub2: Rescatux can be used to restore either Grub (Ubuntu 9.04 and previous versions) or Grub2 (Ubuntu 9.10 and later versions)
Download Rescatux
Burn the Rescatux ISO in a cdrom
Make your PC boot from the cdrom
At Debian Live Boot screen just press ENTER
Select Restore grub / Fix Linux Boot option and click on OK button
Select the partition where your Ubuntu is and click on OK button
Select the hard disk where you want Grub to be installed (usually the first one)
Grub was installed OK confirmation / Grub was not installed error will appear
Look for System → Shutdown in the top tray in order to halt your machine
Recovery Using the Unofficial "Super Grub Disk"
Note about grub2: The methods regarding "Super Grub Disk" described here do not work with grub2 but with grub legacy. That means that you should not use them for fresh Ubuntu 9.10 install or Ubuntu newer versions.
From within Windows
Download Auto Super Grub Disk
Double-click auto_super_grub_disk_1.7 icon, install it, and reboot.
On the next boot, select the Unetbootin-supergrubdisk menu entry; this will launch the Auto Super Grub Disk.
Do nothing till you see your Grub menu again.
Next time you boot Windows, click yes when asked to remove UNetbootin-supergrubdisk to remove the Super Grub Disk menu entry.
As a standalone cd/floppy/usb
Download Super Grub Disk
Burn into a cdrom (better) or a floppy
Boot from it
Select: GRUB => MBR & !LINUX! (>2) MANUAL |8-)
Select the Linux or Grub installation you want to restore.
You see the message: SGD has done it!
Reboot
You're done.
Preserving Windows Bootloader
The method shown above puts GRUB back on the MBR (Master Boot Record) of the hard drive instead of in the root partition. If you use a third-party boot manager like Boot Magic or System Commander you probably won't want to do that. This method could also be used to restore the Grub menu after a re-ghosting. If this is the case, use this alternative.
NOTE: This alternative, used without a third-party boot manager, will not cause Ubuntu to boot.
This method will let you boot your second hard disk Linux installations from Windows while the Using the Ubuntu Desktop/Live CD. Preserving Windows Boot-loader instructions will not.
Either:
Download Super Grub Disk
Burn into a cdrom (suggested) or a floppy
Boot from it
Or:
Download UNetbootin Super Grub Disk Loader (Windows .exe version)
Run the installer and reboot when once done installing.
On the next boot, select the "UNetbootin-supergrubdisk" menu entry; this will launch the Super Grub Disk interface.
Then:
Pick the Super Grub Disk (WITH HELP) :-))) option
Select your language from the list
Choose Windows
Select: Windows chainloads Grub!
Select the Linux or Grub installation you want to restore to its own partition.
You see the message: SGD has done it!
Reboot
Job completed.
Recovery Using the Ubuntu Alternate/Install CD
This section explains how to rescue Grub, using the Ubuntu Alternate/install CD.
1.Enter your computers BIOS to check computer can boot from CD ROM. If you can boot from CD, insert CD ROM into drive. Exit the BIOS (if needed save your settings to make sure the computer boots from the CD ROM).
2.When the Ubuntu splash screen comes up with the boot: prompt, type in rescue and press enter.
3.Choose your language, location (country) and then keyboard layout as if you were doing a fresh install.
4.Enter a host name, or leave it with the default (Ubuntu).
5.At this stage you are presented with a screen where you can select which partition is your root partition (there is a list of the partitions on your hard drive, so you are required to know which partition number Ubuntu is on). This will bedev/discs/disc0/partX, where the X is a partition number.
6.you are then presented with a command prompt (a hash).
7.type
$ grub-install /dev/XXX
where XXX is the device of your Ubuntu install. (eg: grub-install /dev/""hda"" or grub-install /dev/""sdb"" ). Note: newer 2.6.xx kernels call all hard disks ""sdx"" now but not sure if grub does.
The GUI Way: Using the Alternate/Install CD and Overwriting the Windows bootloader
Again, this is for Grub legacy, not for Grub2. So, do not try with Ubuntu 10.04 or more recent unless you have deliberately installed Grub legacy and managed to get it working in the past.
After re-initializing your mount points and other options, and after writing the changes to disk, system files are automatically installed. Each time I have tried this an error is thrown that busybox-initramfs could not be installed (I assume because a newer version exists - but I don't know. This error MIGHT be avoided if one has internet access, again, I don't know). The error aborts the installation of system files, and returns you to the menu. If you then select to install the grub boot-loader, it too, errors-out because the installation of system files did not complete. You are stuck in a loop. Unless you know some bash-magic to bypass this impasse, your only alternative (you will be unable to boot into your system now), is to return to the partitioner, reformat, and reinstall from scratch.
1.Boot your computer with the Ubuntu CD
2.Go through the installation process until you reach "[!!!] Disk Partition"
3.Select Manual Partition
4.Mount your appropriate linux partitions:
/
/boot
swap
...
5.DO NOT FORMAT THEM.
6.Finish the manual partition
7.Say "Yes" when it asks you to save the changes
8.It will give you errors saying that "the system couldn't install ....." after that
9.Ignore them, keep select "continue" until you get back to the Ubuntu installation menu
10.Jump to "Install Grub ...."
11.Once it is finished, just restart your computer
From: http://doc.gwos.org/index.php/Restore_Grub and http://ubuntuforums.org/showthread.php?t=76652
Recovery Using Third-Party Proprietary Software

This software runs only under Microsoft Windows.
EasyBCD software allows Microsoft Windows users to boot into multiple operating systems, including Ubuntu Linux.
Troubleshooting
This section applies to...
Dual-boot setups in which Windows was installed after Ubuntu
Conditions where Windows failure forced a re-installation
Windows recovery techniques involving the "restoration" of the MBR
Cases where GRUB failed to install
Prerequisites:
Your Ubuntu partitions are all still intact
You have a LiveCD, such as the Ubuntu Desktop CD or the Knoppix Live CD
You are familiar enough with your LiveCD to gain access to a console
You remember how you set up your partitions (having a printout of /etc/fstab is ideal, though you can make do with the output of
sudo fdisk -l /dev/sda
Knowledge of how your kernel works (specifically with regards to initrd), if you're using a non-Ubuntu kernel or you have built your own
Your kernel's version; this howto assumes 2.6.10-5-386
Preparing Your Working Environment
To begin the restoration procedure, insert your LiveCd and reboot your computer. Proceed with your LiveCD's bootup procedure until you are presented with an interface. To find how to open a command-line please click here] or try
Applications -> Accessories -> Terminal
Note: Since this is a LiveCD environment, any changes to user accounts or file-system layouts at this level will not be permanent. This means you can set a temporary root password and create directories without affecting your actual installation.
Now, you need to gain root access. Under Ubuntu, this can be done with the following commands:
sudo -i
Under Knoppix, the following command will suffice, and you will not be prompted for a password.
su -
Now that you have root access, you need to mount the partition(s) containing your boot-loader files.
You will need access to both your /sbin/ and /boot/ directories. If you have a /boot/ listing in your fstab, you are among those who will need to mount two partitions.
Begin by creating a mount point for your working environment -- you'll notice this is the same as creating a directory.
mkdir /mnt/work
If you need to mount /boot/, too, run the following command.
mkdir /mnt/work/boot
Now it's time to actually load your file-system data. Review your fstab and identify the location(s) of / and /boot/; these will likely look something like /dev/sda3 and /dev/sda4, though the letter 'a' and the numbers 3 and 4 may differ.
Note: For the remainder of this howto, /dev/sda3 and /dev/sda4 will be assumed, so alter them as needed when typing them in yourself.
Enter the following commands to load your file-system and some information GRUB may need.
mount /dev/sda4 /mnt/work
mount -o bind /dev /mnt/work/dev
mount -o bind /proc /mnt/work/proc
cp /proc/mounts /mnt/work/etc/mtab
Now, you have to enter your working environment. The following command will take care of that.
chroot /mnt/work/ /bin/bash
Warning: From this point on, any files you modify will affect your Ubuntu system. You have left the safety of the LiveCD. Exercise caution.
Recovering GRUB Automatically
If you have a separate /boot/ partition, type the following line.
sudo mount /dev/sda3 /boot/
Reinstalling GRUB from this point is easy. Just enter the following command.
sudo /sbin/grub-install /dev/sda
If the command you used above failed, which is unlikely, you will need to configure GRUB manually (it isn't too hard). If it succeeded, you should read the note at the start of the final section: "Configuring the GRUB Menu".
Recovering GRUB Manually
Before you can undertake the next step, it's important that you understand how GRUB identifies partitions.
To GRUB, numbers begin with 0, and letters are expressed numerically, also beginning with 0.
For example, /dev/sda1 is "hd0,0" to GRUB. Similarly, /dev/sdb3 is "hd1,2".
Note: The "root" line must point to the location of your /boot/ partition if you have one. If you do not have one, point it at your /partition.
sudo /sbin/grub
grub> root (hd0,2)
grub> setup (hd0)
grub> quit
Configuring the GRUB Menu
Note: This step does not need to be done if you're just trying to recover your MBR. Installing Windows will not alter the contents of your existing menu.lst, so if everything was working right before, everything will continue to work right now, and you can restart your computer.
Open the GRUB menu file,
sudo gedit /boot/grub/menu.lst
with your favourite text editor. We use Gedit as an example.
Note: Your menu.lst file is used to control the operating systems GRUB displays on start-up, as well as its visual appearance. This howto will only explain how to get your operating systems to boot, it will not tell you how to make your boot-loader pretty.
A sample menu.lst, stripped of unnecessary comments, appears below. It is based on the /dev/sda3 and /dev/sda4 example above, and assumes Windows resides at /dev/sda1.
timeout 5 #The number of seconds GRUB should wait before booting an OS
default 0 #The entry which should be booted by default
fallback 1 #The entry which should be booted in the event of the first one failing

title Ubuntu, 2.6.10 #A 32-bit Ubuntu entry
#This (or something like it) should be in your configuration
root (hd0,2)
initrd /initrd.img-2.6.10-5-386
kernel /vmlinuz-2.6.10-5-386 root=/dev/sda4

title Ubuntu, 2.6.10 #Another 32-bit Ubuntu entry
#This is an example of an Ubuntu entry which does not have a separate /boot/ partition
#(it is provided only as an alternate to the example above -- do not use them together)
root (hd0,2)
initrd /boot/initrd.img-2.6.10-5-386
kernel /boot/vmlinuz-2.6.10-5-386

title Microsoft Windows XP Home #An entry for a Windows installation
#If you're reading this guide, you probably want this
root (hd0,0)
makeactive
chainloader +1
And that's it. Save and close the file, then reboot and try out the entries.

Sabtu, 19 Maret 2011

Reset Your Ubuntu Password Easily from the Live CD

Our last article on how to reset your Ubuntu password easily through the grub menu was quite popular, so I’ve decided to make a series on all the different ways to reset your password on either Linux or Windows… today’s lesson is how to use the Live CD to reset the password.
Note that we’ll also cover how to protect yourself against somebody else resetting your password, so stay tuned!


Of course, this method will also work if you’ve installed your Ubuntu Live CD to a thumb drive.
Resetting the Password
You’ll want to boot from your Ubuntu Live CD, choosing “Try Ubuntu without any change to your computer” from the boot menu.


Once the system boots, open up a new Terminal window from Applications \ Accessories and then type in the following command:
sudo fdisk -l
This command is used to tell what device name the hard drive is using, which in most cases should be /dev/sda1, but could be different on your system.


Now you’ll need to create a directory to mount the hard drive on. Since we’re actually booting off the live cd, the directory doesn’t really get created anywhere.
sudo mkdir /media/sda1
The next command will mount the hard drive in the /media/sda1 folder.
sudo mount /dev/sda1 /media/sda1
Now it’s time for the command that actually does the magic: chroot. This command is used to open up a shell with a different root directory than the current shell is using, and we’ll pass in the folder where we mounted the hard drive.
sudo chroot /media/sda1
Now you should be able to use the passwd command to change your user account’s password, and it will be applied to the hard drive since we are using chroot.
passwd geek
Note that you’ll have to type your username after the passwd command in order to change the right password


Now you should be able to reboot your system and log yourself in with your new password.