You are not logged in.

#1 2009-04-15 22:33:14

russianwizard
Member
From: Louisville KY
Registered: 2009-03-21
Posts: 39

Installing grub on a seperate partition

I want to install grub on a seperate partition, independant from my os. Whenever I try the setup or install commands in the grub program, it always gives me an error about an invalid device, or that it cant find grub. >.< grub-install proxuces similar errors, and all the tutorials on google are out dated >.<

Edit: I got grub-install to work, but it didn't produce a menu.lst file. What else do I have to do?

Last edited by russianwizard (2009-04-15 22:41:53)


SONY VAIO VGN-FS630/W, 1.73Ghz Pentium M, 512mb RAM (Intel 915GM) (Ubuntu 9.04, Arch & BT3)

Offline

#2 2009-04-15 23:37:55

Mektub
Member
From: Lisbon /Portugal
Registered: 2008-01-02
Posts: 647

Re: Installing grub on a seperate partition

I have a test laptop with many distributions installed.

The disk has several several partitions. Grub is in partition 2 (hd0,1).
This partition is small (30 MB) and has following files:


$ ls -R

boot/ lost+found/

./boot:

grub/

./boot/grub:

e2fs_stage1_5 grub.conf@ menu.lst stage1 ufs2_stage1_5
fat_stage1_5 iso9660_stage1_5 minix_stage1_5 stage2 vstafs_stage1_5
ffs_stage1_5 jfs_stage1_5 reiserfs_stage1_5 stage2_eltorito xfs_stage1_5

./lost+found:

These files were copied from a Linux distribution, f.e. ARCH.

menu.lst contains the following:

default=0
#timeout=5

title WinXP
rootnoverify (hd0,0)
chainloader +1

title Ubuntu-Hardy
rootnoverify (hd0,2)
chainloader +1

title gOS
rootnoverify (hd0,5)
chainloader +1

title Debian
rootnoverify (hd0,6)
chainloader +1

title Mandriva
rootnoverify (hd0,7)
chainloader +1

title PCLinuxOS
rootnoverify (hd0,8)
chainloader +1

title Fedora FC9
rootnoverify (hd0,9)
chainloader +1

title OpenSuse
rootnoverify (hd0,10)
chainloader +1

title Arch
rootnoverify (hd0,11)
chainloader +1

The GRUB partition must be activated (from a distro on disk or a LiveCD):

grub> root (hd0,1)
grub> setup (hd0)

This installs the boot manager in the Master Boot Record (MBR). When you boot, you will see above menu.

In the example I am giving here, partition 2 contains GRUB, partition 4 is an extended partition and partition 5 is the swap.

(I would insert here a picture from gparted if I only knew how).

When you install a new Linux version it is necessary to install the boot manager in the partition where the distribution
is being installed and not in the MBR.

If you already have installed distributions in some of the partitions, you must do it manually, f.e:

grub> root (hd02)        [Installs a  boot for partition 3]
grub> setup (hd0,2)

With this solution you dont need to touch the GRUB partition anymore, be it that you want to change the title.

Mektub


Follow me on twitter: https://twitter.com/johnbina

Offline

Board footer

Powered by FluxBB