# How to : Install GFX Grub In Ubuntu !



## Dark Star (Jan 18, 2008)

*www.imgx.org/pfiles/4638/GNU.pngGNU Graphics Grub is the new Grub boot screen which adds to Visual appeal of Boot Screen .. Unlike older grub GFX Grub has now much better themes and customization options.. So lets take a quick look at How To Install GFX Boot..

To install GFX Grub we have to remove older grub so that it should cause any dependencies problem.. To remove Grub Open Terminal . .*Main Menu -> Accessories -> Terminal * Now type the following code in Terminal


```
sudo apt-get remove grub
```
Download GFX Grub debian installer from here and install it by double clicking it *Download : **GFX Grub*

Before we get started take  backup of you Menu.lst file so that you can use it in mishap .. 
To take backup of Menu.lst file Navigate to* /boot/grub* and save it ..

Now Download some additional themes for_* GFX Grub Menu  Click Here*_

Now unzip the files and move it to /boot/grub .. Since it comes under root file system you need to gain root privileged to do that .. Type the following in Terminal


```
sudo su root
```
Enter  password and then type this *nautilus*  this will open a new Nautilus Window. .Navigate to */boot/grub* through root nautilus window.. Copy all the* message.xyz* file to */boot/grub*

Now since you have added theme .. Lets do final settings to make this GFX Grub work.. Open terminal and type this


```
sudo gedit /boot/grub/menu.lst
```
Add this line at the top of the* Menu.lst *file


```
gfxmenu /boot/grub/message.xyz # the xyz should be replaced with the theme name that you are going to use
```
Since you have removed you older grub you need to restore GFX Grub so that you boot through OS without any problem.. Open Terminal and do these

Type 

```
sudo grub
```
Then

```
find /boot/grub/stage1
```
You will get a output like (hd0,4) or something different depending upon you Hard Disk Partition 

Then type this 

```
root (hdx,x)
```
To install grub type this

```
setup (hdx)
```
Where "x" represent the value of hdd sector in which you have installed grub  

The last thing you have to do is to install Grub MBR . 


```
sudo fdisk -l
```
You will get an output like this 

```
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0dd6c6bd

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        3187    25599546    7  HPFS/NTFS
/dev/sda2            3188        8287    40965750    f  W95 Ext'd (LBA)
[B]/dev/sda3            8288        9607    10602900   83  Linux[/B]
/dev/sda4            9608        9729      979965   82  Linux swap / Solaris
/dev/sda5            3188        5737    20482843+   7  HPFS/NTFS
/dev/sda6            5738        8287    20482843+   7  HPFS/NTFS
```
Look for the bold Entry and finally install MBR in Filesystem 


```
sudo grub-install /dev/sdaX
```
Where X represent the number of you Hard Disk sector in which you have installed Grub...

Here is what My GFX looks like ...

*www.imgx.org/pthumbs/large/4637/GFX%20Grub.png​
Thats it reboot and see the magic   A new refreshing Grub Menu welcomes you 
Regards


----------



## Rahim (Jan 18, 2008)

Thanks for the info and the menu looks Professional.
But i am a little hesitant to try it and will wait till big boys here give some feedback


----------



## baccilus (Jan 18, 2008)

Getting the following orders. Already half way through, so i really need a solution 



> grub> root (hd0,1)
> Filesystem type is ext2fs, partition type 0x83
> 
> grub> setup (hd1)
> ...



I get the same error with 





> setup (hd2)


----------



## Dark Star (Jan 18, 2008)

^^ IT should be setup (hd0) not (hd1)


----------



## Rahim (Jan 18, 2008)

The numbering starts from "0", so do as Dark Star says and type hd0
BTW what is your o/p of 
	
	



```
find /boot/grub/stage1
```


----------



## baccilus (Jan 18, 2008)

Thanks. Rebooting now( After backing up my assignments  )


----------



## phreak0ut (Jan 18, 2008)

Nice tut dude!


----------



## baccilus (Jan 18, 2008)

Didn't work. But thankfully my system booted ( after showing some error messages which I couldn't read since they vanished soon.
@Rahim: It was 
 (hd0,1)


----------



## Rahim (Jan 18, 2008)

^^ aaww 
Are you sure you followed it  correctly?


----------



## baccilus (Jan 18, 2008)

Yup I did. One more thing..... My grub always boots into stage 1.5( and takes a long time). Is this important?


----------



## Dark Star (Jan 18, 2008)

^^ Post you menu.lst/fdisk -l  output under code tags  Have you done this sudo grub-install /dev/sdaX 


```
sudo apt-get install startupmanager[code] use this to decrease the time limit :)
```


----------



## baccilus (Jan 18, 2008)

Here it is:


```
gfxmenu /boot/grub/message.snow # the xyz should be replaced with the theme name that you are going to use
# menu.lst - See: grub(8), info grub, update-grub(8)
#            grub-install(8), grub-floppy(8),
#            grub-md5-crypt, /usr/share/doc/grub
#            and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not change this entry to 'saved' or your
# array will desync and will not let you boot your system.
default        0

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

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line)  and entries protected by the
# command 'lock'
# e.g. password topsecret
#      password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title        Windows 95/98/NT/2000
# root        (hd0,0)
# makeactive
# chainloader    +1
#
# title        Linux
# root        (hd0,1)
# kernel    /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
##      kopt_2_6_8=root=/dev/hdc1 ro
##      kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=e0b6f192-efa1-4a5c-b7b9-f668741111e8 ro

## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,1)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
##      alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
##      lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
##      lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##      altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
##      howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
##      memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## ## End Default Options ##

title        Linux Mint, kernel 2.6.20-16-generic
root        (hd0,1)
kernel        /boot/vmlinuz-2.6.20-16-generic root=UUID=e0b6f192-efa1-4a5c-b7b9-f668741111e8 ro quiet splash
initrd        /boot/initrd.img-2.6.20-16-generic
quiet
savedefault

title        Linux Mint, kernel 2.6.20-16-generic (recovery mode)
root        (hd0,1)
kernel        /boot/vmlinuz-2.6.20-16-generic root=UUID=e0b6f192-efa1-4a5c-b7b9-f668741111e8 ro single
initrd        /boot/initrd.img-2.6.20-16-generic

title        Linux Mint, kernel 2.6.20-15-generic
root        (hd0,1)
kernel        /boot/vmlinuz-2.6.20-15-generic root=UUID=e0b6f192-efa1-4a5c-b7b9-f668741111e8 ro quiet splash
initrd        /boot/initrd.img-2.6.20-15-generic
quiet
savedefault

title        Linux Mint, kernel 2.6.20-15-generic (recovery mode)
root        (hd0,1)
kernel        /boot/vmlinuz-2.6.20-15-generic root=UUID=e0b6f192-efa1-4a5c-b7b9-f668741111e8 ro single
initrd        /boot/initrd.img-2.6.20-15-generic

title        Linux Mint, 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 Professional
root        (hd0,0)
savedefault
makeactive
chainloader    +1
```

Time out time is 0 seconds on purpose. I pressed escape to go into grub menu which was still the old boring one.


----------



## Dark Star (Jan 18, 2008)

> # the xyz should be replaced with the theme name that you are going to use


Remove this and post sudo fdisk -l output


----------



## baccilus (Jan 18, 2008)

There is a 





> #


 sign before it. Shouldn't that nullify it's presence?

That fdisk command showing no output. Rebooting now.


----------



## Dark Star (Jan 18, 2008)

Its *sudo fdisk -l
Yes # do nulll its presence 
*


----------



## baccilus (Jan 18, 2008)

```
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        7012    56323858+   7  HPFS/NTFS
/dev/sda2            7013        9079    16603177+  83  Linux
/dev/sda3            9080        9243     1317330   82  Linux swap / Solaris
/dev/sda4            9244        9729     3903795    b  W95 FAT32
```

Wasn't showing earlier because I wasn't in root.


----------



## Dark Star (Jan 18, 2008)

_*sudo grub-install /dev/sda2 *_do this and reboot after that ; ? Btw have you done this or not /


----------



## Rahim (Jan 18, 2008)

The output seems fine. 
Install new Grub in sda2 where Linux is installed.


----------



## baccilus (Jan 18, 2008)

Ya had done this earlier too but it has given this report each time:

```
Due to a bug in xfs_freeze, the following command might produce a segmentation
fault when /boot/grub is not in an XFS filesystem. This error is harmless and
can be ignored.
xfs_freeze: specified file ["/boot/grub"] is not on an XFS filesystem
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'.
```

Come back guys. Don't leave me hanging.


----------



## coolpcguy (Jan 19, 2008)

^^ You can ignore this


----------



## blueshift (Jan 19, 2008)

This rocks!


----------



## Rahim (Jan 20, 2008)

^^Have you installed it successfully?


----------



## ankitsagwekar (Jan 20, 2008)

> setup (hdx) Where "x" represent the value of hdd sector in which you have installed grub
> 
> The last thing you have to do is to install Grub MBR .


how to install it to boot partition ?


----------



## Rahim (Jan 20, 2008)

^^ just do setup (hd0) to install in the MBR.


----------



## praka123 (Jan 20, 2008)

already,Im having a good grub splash in Debian  What am waiting for is,
GRUB-2


----------



## adi007 (Jan 21, 2008)

^^Thanks darkstar will try it soon..
Does the package  have any dependencies...
and will it work for grub for dos which i am currently using....


----------

