Showing posts with label Tutorial Linux. Show all posts
Showing posts with label Tutorial Linux. Show all posts

2009-03-29

run exe on opensuse - Wine

Wine is an open-source implementation of Windows API for Linux. This enables you to run your favorite Windows programs on Linux.

Wine makes Linux "pose" as Windows. Unlike VMWare, Xen and others which pretend to be a computer, on which you then run the real Microsoft Windows as you would on a physical machine, Wine instead just pretends to be Windows, by offering applications the Windows API and functions they use, and mapping them to the corresponding Linux API.

Given that Wine pretends to be Windows, and Windows is complex and convoluted, this posing works only to a certain degree, and varies a lot depending on which Windows application you use, which functions it uses and how complete the Wine implementation is. You can check the Wine Application Database for other people's experiences with your application. Both regular office apps and games are supported by the standard Open-Source Wine shipped with openSUSE. There are also some non-free versions of Wine which support other applications.

Use

Of course, Wine needs to be installed, see Repositories below.

To use the Windows program, first Linux needs to have access to it. The preferred (more reliable and secure) way is to install it from the Windows program's installation CD, by running the setup.exe with Wine, i.e. when openSUSE recognizes the inserted CD and opens it in Konqueror, you just click on setup.exe.

By default, the emulated drive C: will be a directory on the Linux partition, and you can install your program there. You don't need to have Microsoft Windows installed nor to access any possibly existing Windows partition.

Afterwards, you start the program via one of the ways listed below.

From Konqueror

You should be able to just click on a Windows .exe file in your file manager (e.g. Konqueror). That should start the program in Wine (TODO verify common file managers).

CDs that you insert should appear under /media/, and the C: drive in Wine is mapped by default to ~/.wine/drive_c/ - paste that in your Konqueror address bar and make a bookmark.

From shell

If you open a terminal (e.g. Konsole), you can also type wine "/media/dvd/setup.exe" or wine "/media/c/Program Files/Mozilla Firefox/firefox.exe", where the italics part is the path to the program you want to start, and it depends on your system and your application. The quotes are needed if you have spaces in the pathname.

From start menu

If you want to have an entry for the program in your start / KDE / SuSE menu, you can open the menu folder where want to place it, then click the right mouse button for the context menu, and select "Edit menu". You should see an application "KDE menu editor" opening. Click File | New element..., enter a name and description for it, and enter as "command" the same command as described under "From shell" above. Test the command in a shell first before adding it to the menu.

Commercial Wine versions

You can just install the Open-Source Wine for SuSE - see below. There are also two commercial products based to a large part on Wine: Crossover Office and Cedega. Both have made changes to Wine to improve the execution of some specific applications on which they concentrate. You should check their list of supported applications.

Crossover Office (from CodeWeavers) supports use of some office software like MS Office and Adobe Photoshop on Linux. See the Compatibility list.

Cedega (from TransGaming) can be used to play certain supported Windows based games on Linux. See the Cedega Games Database. Note that both Cedega and Open-Source Wine support playing DirectX and OpenGL games, but the gaming related codebases are very different since they forked some years ago.

Repositories


Up to date Wine RPMs are available from:

SUSE Linux ES 9 & Novell Linux Desktop 9
http://software.opensuse.org/download/Emulators:/Wine/SLES9_and_NLD9/
SUSE Linux Enterprise Desktop 10 and SUSE Linux Enterprise Server 10:
http://software.opensuse.org/download/Emulators:/Wine/SLE-10/
openSUSE 10.3:
http://software.opensuse.org/download/Emulators:/Wine/openSUSE_10.3/
openSUSE 11.0:
http://download.opensuse.org/repositories/Emulators:/Wine/openSUSE_11.0/
openSUSE 11.1:
http://download.opensuse.org/repositories/Emulators:/Wine/openSUSE_11.1/

Above URLs provide both "YUM" and old style "YAST" repositories and can be added by the YAST Installation Sources module, rug, zypper or smart.

On AMD64 and EM64T systems the i586 packages are supposed to be used, since a 32bit WINE version is required to run Win32 binaries at this time.


Following packages are available:

  • wine: Builds of the biweekly WINE beta releases. This is the recommended version for most users.
  • wine-snapshot: Daily builds of the current WINE GIT state. Only for the experienced user, can potentially be broken!

The SUSE Wine packages are maintained by Marcus, E-mail: meissner@suse.de

Utilities

Wine Doors

Wine Doors is a menu driven installer for standard Windows components, with option of downloading components.

Wine Doors is in the wine-doors package in above repositories.

WineTools

WineTools is a menu driven installer for installing over 100 Windows programs under the x86 (AMD Athlon or Intel Pentium) processor architecture on the Linux operating system using Wine. Examples of installable Windows software include:

  • DCOM98
  • Internet Explorer ver. 6
  • Windows Core Fonts
  • Windows System Software
  • MS Office & MS Office Viewer
  • Adobe Photoshop 7 & Illustrator 9

WineTools

Note: WineTools work with wine-0.9.3 and older only. WineTools does not follow standard Wine conventions to achieve Windows compatibility. It will change your .wine/ configuration. To increase compatibility WineTools will use native Windows dll files. Those require a valid Windows or third party license and are covered as proprietary software under the applicable agreements.

IES4Linux

IES4Linux is a tool created explicitly to simplify using Internet Explorer with WINE.

It provides an easy automated setup process and supports Internet Explorer versions 5&6.

See also Internet Explorer 6 install HOWOTO in Gentoo wiki article

Picasa2

Google Labs has ported the Picasa2 photo organizer through its own implementation of wine.
Picasa for Linux

Source

The possibility to install from source is also an option. This is usually needed only if you are debugging Wine, or if you want to compile an older separate version of wine for different programs.

Building on x86 (32bit)

Necessary RPM: gcc, make, flex, bison, ncurses-devel, giflib-devel, liblcms-devel, libxslt-devel, Mesa-devel, libpng-devel, libxml2-devel, freeglut-devel, zlib-devel, glibc-devel, fontconfig-devel, xorg-x11-devel, libjpeg-devel, unixODBC-devel, freetype2-devel, openssl-devel, openldap2-devel

Configure: ./configure --prefix=

4-bit

Necessary RPM: gcc, make, flex, bison, ncurses-devel-32bit, giflib-devel-32bit, liblcms-devel-32bit, libxslt-devel-32bit, Mesa-devel-32bit, libpng-devel-32bit, libxml2-devel-32bit, freeglut-devel-32bit, zlib-devel-32bit, glibc-devel-32bit, fontconfig-devel-32bit, xorg-x11-devel-32bit, xorg-x11-libXext-32bit, xorg-x11-libXp-32bit, xorg-x11-libXt-32bit, capi4linux-32bit, xorg-x11-libICE-32bit, xorg-x11-libXext-devel-32bit, sane-32bit, cups-libs-32bit, libjpeg-devel-32bit, unixODBC-devel-32bit, freetype2-devel-32bit, openssl-devel-32bit, openldap2-devel-32bit, freetype2-devel-32bit, hal-32bit, hal-devel,

NOTE: This list may not contain every requirement and may vary between openSUSE versions.

Configure: ./configure --prefix= --x-libraries=/usr/X11R6/lib --x-includes=/usr/include/X11/ --with-x

Configuration

Wine is configured by typing winecfg on the command line. This will map all drives for wine and create a .wine on your home folder the first time it's run and then open the Wine configuration dialog. It's recommended that you eject all removable drives before running winecfg as these may confuse the installation.

The file user.reg inside the .wine folder controls wine's appearance.

Here is a "How to" by minio that shows how to make wine look more like the GTK industrial theme: http://ubuntuforums.org/showthread.php?t=55286

Sometimes, an application can depend on a Windows font that is not directly available by wine; it will then use to alphabetically the first font available, which might be some obscure fixed-space font, hebrew font or something. Try to cp /usr/share/wine/fonts/* ~/.wine/drive_c/windows/fonts/ in case you hit this problem.



src : http://en.opensuse.org/Wine

2009-03-28

installation PHP on OpenSuse

One of the many popular combinations in Linux is the LAMP setup. LAMP to expand is Linux Apache MySQL PHP. Most of the websites running on the internet these days or LAMP servers where

Linux is your flavor opensource operating system (openSUSE for us :-))
Apache2 is the master webserver on the planet
MySQL is your favorite opensource database
PHP is the popular web programming language

The easiest way to get the LAMP server installed would be to install LAMP from the YaST GUI as follows:

1. Computers - YaST - Install Software - Set filter to “Patterns” then select and accept “Web and LAMP” under Server functions. But, this installs things we don’t need from LAMP perpesctive like DNS, Perl modules etc.

LAMP Installation from YaST

I prefer the manual option to setup a LAMP Server.

So without wasting much of time, lets proceed to get LAMP up and running on your openSUSE in no time. I’m using openSUSE 11.0 but the procedure should equally work on earlier 10.3 and other 10.2 versions.

Install & Configure Apache2 Webserver

Install Apache webserver

opensuse11:~ # yast2 –install apache2

This should install apache webserver. To check try the following command:

opensuse11:~ # rcapache2 status
Checking for httpd2: unused

That tells you, the Apache webserver is installed but just not started yet.

To test if the webserver serves pages, add a file index.html into /srv/www/htdocs/ directory. This is the default web root directory for apache on your system.

opensuse11:~ # cd /srv/www/htdocs
opensuse11:~ # vi index.html

and enter some text say “Welcome to openSUSE 11.0

Start Apache2 Webserver

Now start the Apache 2 webserver so we can check if it works OK.

opensuse11:~ # rcapache2 start
Starting httpd2 (prefork) done

Now, open a web browser like Firefox and go to http://localhost and you should see the ext you entered (here “Welcome to openSUSE 11.0″)

Let’s proceed to install PHP5

Install PHP5

opensuse11:~ # yast2 –install php5 php5-mysql apache2-mod_php5

This should install PHP5, PHP5-MySQL module and the Apache2 PHP5 module.

For Apache2 to enable the PHP5 module, restart for changes to take effect.

opensuse11:~ # rcapache2 restart
Syntax OK
Shutting down httpd2 (waiting for all children to terminate) done
Starting httpd2 (prefork) done

Install & configure MySQL

opensuse11:~ # yast2 –install mysql mysql-tools

This should install MySQL Database Server and options mysql-tools (for administration) on your openSUSE. To check the installation, run the following command:

opensuse11:~ # rcmysql status
Checking for service MySQL: unused

The above indicates that the MySQL Server is installed but not started yet.

Start MySQL Server

opensuse11:~ # rcmysql start
Starting service MySQL done

By default there is no root password set for MySQL and it is important to set the password for the ROOT account.

Set Root Password

opensuse11:~ # mysqladmin -u root -p rootpassword

This should set the root password as “rootpassword”. Set the password to something more appropriate.

To check if Root password is set and the MySQL Client can logon to the MySQL Server try the following:

opensuse11:~ # mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.51a SUSE MySQL RPM

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

mysql> show databases;
+——————–+
| Database |
+——————–+
| information_schema |
| mysql |
| test |
+——————–+
3 rows in set (0.04 sec)

mysql>

In the above, I used mysql client to logon as root, entered the password and list the databases. That completes the installation of LAMP on openSUSE 11.0

To administer MySQL database, the easiest and the popular tool is phpMyAdmin, given that we have discussed PHP5, apache2 setup here which are required for phpMyAdmin, it makes sense to look at quickly setting up and configure phpMyAdmin

Install phpMyAdmin

opensuse11:~ # yast2 –install phpMyAdmin

This installs phpMyAdmin and setup a website at /srv/www/htdocs/phpMyAdmin directory. Change directory and use the sample config file to quickly setup phpMyAdmin.

opensuse11:~ # cd /srv/www/htdocs/phpMyAdmin
opensuse11:~ # cp config.sample.inc.php config.inc.php

Edit the file and look for

$cfg['blowfish_secret'] = ‘mysqladmin’;

Enter a value for blowfish secret (I’ve set it to mysqladmin here)

Thats done and has the default configs on it. Logon to phpMyAdmin from http://localhost/phpMyAdmin with the MySQL root username and password.

For advanced documentation, click here

phpMyAdmin Login

phpMyAdmin in Action


Counter Strike on openSUSE 11.0

Salah satu hal yang membuat saya kadang menggunakan laptop isteri yang memiliki dual boot openSUSE dengan Windows adalah karena bisa menggunakan games online counter-strike. Game lama sebenarnya, tapi saya kerap memainkannya karena memang cukup menyenangkan.

Saya pernah sebentar testing wine untuk mencoba menjalankannya. Gagal dan saya tidak berlanjut mencari tahu bug dan solusinya. Lagi nggak ada waktu :-P

Setelah kemarin ada kesempatan melakukan download CrossOver Office (versi komersil dari wine) secara legal sebagai bagian dari promo lame-duck, saya berkesempatan melakukan download CrossOver Office for Games dan melakukan ujicoba Counter Strike. Ternyata, berhasil :-))

Berikut adalah langkah-langkahnya :
  1. Instalasi CrossOver Games dengan melakukan eksekusi file sh dengan perintah sh install-crossover-games-7.1.2.sh. Ikuti wizardnya

  2. Buka menu CrossOver Games | Install Windows Software







  3. Install Counter Strike
  4. Run melalui menu yang ada di desktop

Posted by Muhammad Rivai Andargini

2008-08-29

GRUB…? It's for Linux

Still first course installation of Linux and confused to do I uninstall the format's computer directly, so great it would pass the boot again window that has been installed there was error in the GRUB not found what I of GRUB and try to see what benefits I get from this Zaki math: Good Reading)

GRUB, the Grand Unified Boot Loader, such as LILO, can memboot your Linux system, maintain and treat the booting and loading on your kernel. GRUB has many more features and easy to use, reliable and flexible compared with LILO. Drawing with basic knowledge LILO and partition the disk so you can use the GRUB this well.
In addition to Linux, GRUB can also memboot other Operating System, such as NetBSD, OpenBSD, the GNU Hurd, DOS, Windows 95, 98, Me, NT, and 2000. Although membooting an Operating System is a job that is not normal and interesting, the work is actually quite important. Boot Loader If you do not work well, you can be locked / trapped in your system (can not booting).
For me, GRUB Boot Loader is a reliable, as an example of the GRUB Linux kernel can be read directly from the partition minix, FAT, ext2, or Reiserfs. From my long-winded explain opportunities GRUB and LILO compares with the one we will start using GRUB this way.

I will start with a Linux OS that is currently still use LILO and GRUB not install at all. We can download the tarballs GRUB the latest version of the ftp://alpha.gnu.org/gnu/grub. At the time of writing this article I use GRUB version 0.5.96.1 (grub-0.5.96.1.tar.gz). Do not afraid to menginstallnya, boot records you will not be changed. We will mengkompile and install GRUB as other programs on umumnya.Kita can make a GRUB bootdisk, once again do not worry. I will tell before we do anything that can change the boot process.
I will put the source code and mengkompilenya in the directory / tmp, and then install everything in the directory / usr. As root, type the command as follows:
# Cd / tmp
# Tar xzvf / direktori/tarball/grub/berada/grub-0.5.96.1.tar.gz
# Cd grub-0.5.96.1
#. / Configure-prefix = / usr
# Make
# Make install
Now GRUB has been installed and we will start with putting the boot loader on a diskette.

Make Bootdisk
To make bootdisk, we will use some simple steps. First we will create an ext2 file system on a diskette, which will be used, and after that we mount to the system and copy some files to a floppy GRUB and then run the program "GRUB" that keep all the settings on the boot diskette records.
Enter a blank floppy, then type the following command:
# Mke2fs / dev/fd0
which means to make (format) file system ext2 on the diskette. Looks like Figure 1.

Figure 1. Formatting a disk with ext2.

Now we will make some directory and copy critical files (which have been installed at the GRUB is installed)
# Mkdir / mnt / floppy / boot /
# Mkdir / mnt / floppy / boot / grub /
Then copy the files stage1 and stage2 in the directory / usr/share/grub/i386-redhat / (if at the time to install Red Hat 7.2 select options GRUB Loader) and / usr/share/grub/i386-pc / (if it was install directly from the tarball GRUB)
# Cp / usr/share/grub/i386-redhat/stage1 / mnt / floppy / boot / grub
# Cp / usr/share/grub/i386-redhat/stage2 / mnt / floppy / boot / grub
Stay for longer we will have bootdisk working properly.
When you install the appropriate instructions at the top of a tar ball GRUB, the program is interesting that called grub is located in the directory / usr / sbin / grub. It is very interesting, because in fact, this program offers the same functions as the GRUB Boot Loader. Yes! Although Linux is already running, you can run GRUB, and can do the job command interface and the same when you use the GRUB boot disk or menginstallkan GRUB on the MBR in your Hard Disk.
We will use the program for the grub set up the boot sector on the boot disk us. Run grub, it will exit the display as follows ...

# / Usr / sbin / grub

GRUB version 0.90 (640K lower / upper memory 3072K)
[Minimal Bash-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device / filename. ]
grub>

Version of the above depending on the version of the GRUB installed in the system. If we install the tarballs we will see the difference version (Example tarballs this version 0.5.96.1). If we choose the option when installing Red Hat 7.2 version of the GRUB using version 0.90, as we see above.
grub> -> It is a command prompt grub / grub console.
If the grub we console type:
grub> root (fd0)
It will then display the information out as follows:

File type is ext2fs, using whole disk
which means that the devices fd0 File (/ dev/fd0) or floppy all its contents using ext2. The "root" was ask to see the GRUB stage1 and stage2 on fd0 devices, which in defaultya see in the GRUB boot / grub / partition on the disk that you specify (ie the device fd0).
We just copying files to the appropriate directory. Then we will ask to install GRUB Boot Records in the floppy diskette with us using the "setup (device)" in the GRUB console.
grub> setup (fd0)
the view that:

Checking if "/ boot/grub/stage1" exists ... yes
Checking if "/ boot/grub/stage2" exists ... yes
Checking if "/ boot/grub/e2fs_stage1_5" exists no ...
Running "install / boot/grub/stage1 d (fd0) / boot/grub/stage2 p / boot / grub / grub. Conf" Done ... Johnson Space Center.

Then the "quit" in the GRUB console to exit. Thus, we already have the GRUB boot disk that we will "play" to experiment more :-).
grub> quit
When you use GRUB Boot Loader as you, first make sure you know the partition where you save the kernel Linuxnya name and the partition that contains the root filesystem "/". Also make sure you see the LILO configuration, like some of the arguments that the need for mempassingkan arguments to the kernel, such as "append = ide-scsi" to mengemulasikan presence cdwriter as scsi, and the argument - an argument the other. If we already know all this information, we will start quietly.

Starting GRUB
To start the GRUB, we will shutdown the computer, and memboot from the boot disk that was created earlier. But if you want to run it from the system that has been running. You can run grub such as the above, all will be running the same, but you will not be what memboot it from here (because the system is running Linux).
When Memboot from bootdisk that we created earlier, GRUB will seek information from the BIOS and find the file that we have a copy delivered to the bootdisk before. The view will be the same as we run the above:

GRUB version 0.90 (640K lower / upper memory 3072K)
[Minimal Bash-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device / filename. ]
grub>

As you can see all the same as above, but we will memboot Linux System you from here.
In Linux, when we talk about the "root" filesystem, we will appointed directly to the main Linux partitions (/). But GRUB has its own definition of partition "root". Partition "root" GRUB is the partition that you save the Linux kernel. This may or not the file system root "normal" that you have. In the example, on Gentoo Linux partition we have a small, separate to save the Linux Kernel and information - information Booting. We leave this partition is not mounted, so will not fall apart if accidentally or intentionally system is suddenly crashes or mereboot back.
Now we are in the GRUB, we will show the location of the root. When we enter the root partition by memountnya GRUB will be read-only option, so can mengload Linux Kernel from there. One thing that is really fantastic in the GRUB GRUB is able to read FAT partitions, minix, ext2, FFS and Reiserfs.
Type the command root in the GRUB
grub> root (
Press the button TAB, will likely fill the disk partition that you have. If you have multiple partitions starting from hd0 (not the / dev / hda as usual). If you only have one hard drive, the GRUB will be filled with "hd0". If you have more than one hard drive please select the hard drive that is the kernel linuxnya, for example, "hd0" followed with a comma "," next to it. Up here do not press [Enter]!
grub> root (hd0,
Then press [Tab] to see the possibility of partitioning the hard drive you have in it.
grub> root (hd0, [Tab]

Possible partitions are:
Partition NUM: 0, Filesystem type is ext3fs, partition type 0 × 83
Partition NUM: 1, Filesystem type unknown, partition type 0 × 82
Partition NUM: 2, Filesystem type unknown, partition type 0 × 7
Partition NUM: 4, Filesystem type is reiserfs, partition type 0 × 83
Partition NUM: 5, Filesystem type is the GNU Hurd, partition type 0 × 63

Of course, the appearance will vary in accordance with the partition on your hard drive. On Linux, usually from 5 to partition the hard drive hda5, but on the other GRUB defined, namely (hd0, 4). GRUB use the naming / labeling hard disk partitions and started from 0, not a or 1.
We will memboot hard drive containing the Linux Kernel, as for example in the partition to -5,
grub> root (hd0, 0) [Enter]
File type is ext3fs, partition type 0 × 83
Then specify the location of the kernel. You put it in accordance with the location of the Linux kernel.
grub> kernel / boot/vmlinuz-2.4.7-10 ro root = / dev/hda5
Means the kernel is called vmlinuz-2.4.7-10 and located in the directory / boot, with mounting read-only to the root "/" in / dev/hda5.
You can add your kernel parameters such as the "root = / dev/hda5" and "mem = 256."
Note: kernel parameters "root =" is defined important to show you the root filesystem.
You have to mount the root filesystem, and load your Linux kernel. When you memboot your linux kernel, with a simple command using the "boot".
grub> boot
and the Linux boot process will begin.
GRUB configuration file (grub.conf) in the directory / boot / grub /. The following examples of the contents of grub.conf:

# Grub.conf generated by anaconda #
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a / boot partition. This means that
# All kernel and initrd paths are relative to / boot /, eg.
# Root (hd0, 0)
# Kernel / vmlinuz-version ro root = / dev/hda5
# Initrd / initrd-version.img
# boot = / dev / hda
Default = 0
timeout = 10
splashimage = (hd0, 0) / grub / splash.xpm.gz
title Red Hat Linux (2.4.7-10)
root (hd0, 0)
kernel / vmlinuz-2.4.7-10 ro root = / dev/hda5
initrd / initrd-2.4.7-10.img

The file is created during installation with Anaconda Installer from Red Hat 7.2.
If all goes well, you can load your Linux distribution with a GRUB bootdisk. GRUB is the boot loader should be calculated, because you can dynamically configure / change according to your wishes. Furthermore, the authors show how to create Loader GRUB menu of your typing 3 GRUB command line. But before that let us deepen our knowledge about the workings of GRUB.

How to Work GRUB
To set up the boot floppy, we do 2 things, we first copy 2 files from the directory / usr/share/grub/i386-redhat / to / boot / grub / floppy that berfilesystem ext2 and run the setup program from GRUB.
grub> setup (fd0)
Install GRUB loader "stage1" to the boot record on floppy and also configure the "stage1" to mengload to "stage2" directly from the ext2 file system. GRUB actually do this by creating a list that consists of blocks to the floppy containing data "stage2". So "stage1" does not need to know anything about the ext2 filesystem to load "stage2".
However, in some cases, installing the GRUB loader "stage1.5" to boot record after installing a "stage1." Loader "stage1.5" This will create a special "stage2" can be in loads without using a blocklist ancient / long (primitive blocklist), but by using standard-based approach to the path that is more flexible. This ability of the GRUB to identify the structure of the filesystem directly, which can make GRUB powerfull more than LILO. If there Defraksi on file at the bootdisk, directly, stage1 (owing to the ext2 stage1.5) can find stage2. This can not be done by LILO, because LILO is depending on the file folder. This map files must be re-run every time you update your kernel, or move something physical / rough on the disk, although the paths are not changed.
You will be amazed at the same time wonder if you made bootdisk with the FAT file system other than the ext2 file system. Yes! it can be done, because when we run the "setup (fd0)" GRUB will menginstallkan "stage1.5" in accordance with the type of file in the root. Even if there is no place for "stage1.5," GRUB can load stage2 with the way the approach to turn the ancient block-list.

Installing GRUB on the hard drive
Now we have to make bootdisk floppy GRUB, what if we want to menginstallnya in the hard disk? How very simple, we first determine where the root GRUB placed, and then create the directory / boot / grub / GRUB on the root partition. Remember the root of GRUB is not defined with the same root partition on Linux. Then copy the files stage1 and stage2 to the directory / boot / grub /. For example, if the directory / boot / grub / placed / dev/hda4 the root set to "(hd0, 3)"
grub> root (hd0, 3)
Now, living decided whether GRUB will be placed in the MBR? If yes, then put GRUB in the entire disk without partition, as for example in hd0 (/ dev / hda), then run the following command:
grub> setup (hd0)
If you menginstallnya in other partitions, living mentioned in the partition where, for example, on the partition hda5,
grub> setup (hd0, 4)
Now GRUB has been installed. If you memboot system then you will exit the GRUB console display (If you put them in the MBR) as the example above, we now live make a boot menu so that you do not type the command line per line at the top.

Making the GRUB menu
To make the GRUB boot menu, we only make a plain text file named menu.lst and in place in the directory / boot / grub / files between stage1 and stage1, following the example files menu.lst.
Default = 0
timeout = 10
splashimage = (hd0, 0) / grub / splash.xpm.gz
title Red Hat Linux (2.4.7-10)
root (hd0, 0)
kernel / vmlinuz-2.4.7-10 ro root = / dev/hda5
initrd / initrd-2.4.7-10.img

Windows 2000 title
root (hd0, 3)
chainloader 1

In Red Hat 7.2, the files in menu.lst-link to grub.conf.
The following explanation file GRUB boot menu at the top:
The first line, Default boot which will be run (starting from 0 next 1, 2 and so on). The second line, choose the time, if by the time of the set, the default will be selected. The third line (splashimage) to display the boot loader such wallpaper, which can also be replaced with the "color" according to taste, for example:
color white / blue blue / red
The display will drape the GRUB menu.
The next line is the Boot Linux, in accordance with the parameters of-its parameters, the root partition and so forth ... Also can use initrd (initial root disk).
The last line, is working with chainloader memboot (boot record) Windows 2000 on its own partition hda2 and membootnya. This is called a chain lifting with the techniques, GRUB will load to the partition boot record that it's correct and memboot system from there. These techniques work well in Windows and DOS versions of what.
You do not need to re-install GRUB to update the kernel / replace the new version of the kernel or change the location of your partition. You only need to change the file menu.lst. Only if there are some conditions in the GRUB need to re-install, if you will first replace the root filesystem on the GRUB, for example, from ext2 to reiserfs, the second replaces the file if stage1 and stage2 to the latest version.

Quick tips GRUB
GRUB can create a floppy bootdisk while rescuers (rescue disk). If the kernel on your hard drive deliberately / accidentally erased or corrupted, you can call kernelnya in the boot disk and the system will run smoothly. By the way, with a copy of your kernel to the floppy a GRUB bootdisk
# Mount / dev/fd0 / mnt / floppy
# Cp / path / directory / bzImage / mnt / floppy / boot /
# Umount / mnt / floppy
Now you diskette containing the Linux kernel, so you can membootnya in the GRUB console with the way:
grub> root (fd0)
grub> kernel / boot / bzImage root = / dev/hda5
grub> boot
In kernelnya parameters, the root shown to the root of the hard drive.