grub question
D. Hugh Redelmeier
hugh-pmF8o41NoarQT0dZR+AlfA at public.gmane.org
Wed Mar 30 06:40:56 UTC 2005
| From: Francois Ouellette <fouellet-cpI+UMyWUv9BDgjK7y7TUQ at public.gmane.org>
| What is the command-line grub command to re-install it to the boot sector
| with the chainloader to the Linux partition?
|
| I accidentally wiped it with the Windoze installation disk and cannot
| find the command to do it from the FC3 rescue disk.
What I do in this case is boot from a grub floppy, get it to load the
system (FC3?) and then ask FC3 to install the boot sector.
[Warning: this is all from my imperfect memory.]
Making a grub boot floppy isn't too hard, but it is arcane. I keep
one lying around. They don't go obsolete very quickly -- I think I
still use one I built from RHL8. Here's how to get the documentation.
info grub
select "installation"
select "Creating a GRUB boot floppy"
It says (among other things):
# 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
153+1 records in
153+1 records out
If you don't have a working linux, you can probably do this from
KNOPPIX. You do have a KNOPPIX, don't you?
Once you have a working grub boot disk, boot it. Then type the
commands into its prompt.
Note: I am assuming that FC3 is on the 4the partition; adjust
accordingly.
Note: Grub counts up from 0, so the first drive is hd0 and the 4th
partition is 3.
root (hd0,3)
configfile /boot/grub/grub.conf
[Note: grub is ridiculously powerful. You can do a lot of things from
its command line.]
This should give you the normal FC3 bootup. Once FC3 is running,
install grub on the master boot sector. From a shell:
grub-install /dev/hda
I also like to install it on the boot sector of my LINUX partition(s):
grub-install /dev/hda4
That way I can have multiple linux installations and use chainloading
to select which partition to boot. This has advantages when kernels
are subsequently updated.
Good luck,
Hugh Redelmeier
hugh-pmF8o41NoarQT0dZR+AlfA at public.gmane.org voice: +1 416 482-8253
--
The Toronto Linux Users Group. Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
More information about the Legacy
mailing list