bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Suggestion for addition to GRUB Manual


From: Steve Holmes
Subject: Suggestion for addition to GRUB Manual
Date: Tue, 14 May 2002 08:51:32 +0100

Hi

GRUB is a great program, and for people who need to know everything about
it, I'm sure the manual is excellent. However, I would suggest that most
people, like me, usually only want to know how to do a small number of
simple tasks such as creating a bootable floppy or getting a
duplicated/imaged system disk to run GRUB (as in my case) without getting
overwhelmed by the neverending technicalities.
For people like us (the vast majority of users) the manual is TOO much! We
haven't got the time to study it all. I still don't know what the "@command
{}" notation is about - but please don't tell me!
Also there is probably much confusion when browsing the manual between
'installing' the complete GRUB  'package' itself (as in
http://www.gnu.org/manual/grub-0.90/html_chapter/grub_19.html#SEC113) and
just setting-up or 'installing' the images to the MBR to make the disk
bootable.

For us lesser users, would you consider putting a 'Quick Guide' right up at
the top of the manual so we find it first?

*Quick Guide to Making a Disk Run GRUB at Startup*
=========================================
This guide assumes that you already have GRUB installed on a working disk -
it probably came with your operating system - if not, see 'How to obtain and
build GRUB'. For a disk to run/boot GRUB at startup, so that it can present
you with a menu of operating systems or kernels to which you can boot, you
will need both to have the GRUB files installed in a bootable filesystem eg:
/boot/grub, and to 'setup' GRUB in the Master Boot Record (MBR) of the disk.

You may need to do this if you are making a bootable floppy, have built your
own system hard disk, or if you have made an image of your system disk -
especially if the geometry of the source disk (which is already bootable)
and the image disk (which may not be bootable yet) are different. If your
image system disk runs GRUB and boots already, then you won't need the
following instructions.

If you are building a bootable floppy or new system disk, you will ned to
copy the grub directory eg: /boot/grub to the new disk first.

1.  To setup a disk's MBR with GRUB, the disk must be installed into the
machine exactly as it is to be booted. For example, if  your system disk is
the first hard disk on your system eg: the IDE Primary Master (or 'hd0' to
GRUB) and you have made an image of it to the Primary Slave disk ('hd1' to
GRUB), and assuming you would want your image to be bootable as the Primary
Master:  you must remove the original system disk, then change the image
disk jumper to Primary Master (hd0), before setting-up GRUB on it. Don't
forget you will have to re-detect IDE disks in your BIOS each time you start
with a different configuration.

2.  You will need to boot from another disk which already has GRUB
installed. For example: you can setup GRUB on a floppy if you already have
GRUB installed on your system disk, or if you are setting-up GRUB on a hard
disk you will need a bootable GRUB floppy.

To create a GRUB Boot Floppy on a UNIX-like system (destroying any data
currently stored on the floppy):-

# cd /usr/share/grub/i386-pc
# dd if=stage1 of=/dev/fd0 bs=512 count=1
1+0 records in
1+0 records out
# dd if=stage2 of=/dev/fd0 bs=512 seek=1
n+1 records in
n+1 records out

NB: The 'i386-' file may be named slightly differently eg: 'i386-redhat'.
Your floppy device file name may also be different.


3.  To setup GRUB, boot from the disk on which GRUB is already installed:-

If you boot from the GRUB Boot Floppy above, you will go straight to the
GRUB shell prompt 'grub>'. If you boot from a hard disk, enter: '/sbin/grub'
or on older systems: '/usr/bin/grub'.

At the GRUB prompt do:-

grub> root  (hd0,0)
Where (hd0,0) indicates that root is the first partition on the first hard
disk.
If your root partiton is the second partiton on the first disk, eg: if /boot
is your fist partition, then you would do 'root (hd0,1)'. The first
partition on the first floppy drive is (fd0,0). The response should show
that the root fs and partition types have been correctly identified.

grub> setup (hd0)
Where '(hd0)' reperesents the MBR on the first hard disk. For the first
floppy drive use '(fd0)'.
The response should show  2 "succeeded" messages.

4.  Test that the disk boots GRUB by rebooting:-
If you have just setup a hard disk and you booted from floppy, remove the
floppy and enter 'reboot'.
If you have just setup a bootable floppy, and you booted from your hard
disk, your BIOS will need to be set to boot first from the floppy drive.
Shutdown and reboot your system.
You should now boot to GRUB's menu.

Different aspects of this procedure are explained more fully elsewhere in
the manual eg: under 'Installation'. Please look over the Contents of the
manual to find other sections that you may need, such Error Messages, the
FAQ, etc.
= = = end = = =


I hope the above is technically correct, but I'm not 100% sure about the
procedure for building a new sytem or bootable floppy - is there anything
more to it? - I haven't tested that part. Please correct my mistakes or
omissions.
I have tested this procedure to get my Red Hat system disk images to be
bootable. I use PowerQuest Drive Image 5 which can resize ext2 partitions,
enabling images to non-identical disks, but when imaging to a destination
disk (eg:hd1/hdb) with a different geometry from the source (eg: hd0/hda), I
have to reinstall GRUB to the MBR of the image to make it bootable.

First I tried running: '/sbin/grub; root (hd1,0); setup (hd1); quit' (from
my original/source sys disk hd0) while the image disk was still installed as
hd1 (where the image was made to it). But then when I made the image disk
the primary master hd0, it wouldn't run GRUB.
I eventually discovered that I must install GRUB with the image disk
installed as hd0, so of course it had to be installed from a GRUB floppy.
Now I know that, the process is very simple.
Its probably obvious to you, and maybe its somewhere in the manual, but I
didn't find it.

Hope this is of some use.

Regards
Steve Holmes




reply via email to

[Prev in Thread] Current Thread [Next in Thread]