recovering grub after installing XP
Tim Writer
tim-s/rLXaiAEBtBDgjK7y7TUQ at public.gmane.org
Tue Jan 20 00:02:53 UTC 2004
David Tilbrook <dt-hKuJ9UrQZDM at public.gmane.org> writes:
> The lowest partition on my laptop currently contains Windows2000
> which I want to replace by XP.
>
> I am using RH9.2 in the other partitions.
>
> I believe that when I install XP it will change the boot partition
> so that grub will no longer be in place, thus making it difficult
> for me to boot RH.
>
> What measures do I take before installing XP so that I can recover
> and reset the boot partition to bring up grub?
Make a boot floppy. Probably the easiest way is to use RedHat's:
mkbootdisk
The resulting boot floppy should contain your kernel and initrd.
Alternatively, you can put grub on a floppy. There are two ways to do this.
The quick and dirty way:
# cd /usr/share/i386-redhat
# dd if=stage1 of=/dev/fd0 bs=512 count=1
# dd if=stage2 of=/dev/fd0 bs=512 seek=1
This will boot you straight into grub but without a menu so you have to be
comfortable with the grub commandline.
A nicer way to create a grub floppy is:
# mkdosfs /dev/fd0
# mount -t vfat /dev/fd0 /mnt/floppy
# grub-install --root-directory=/mnt/floppy '(fd0)'
# vi /mnt/floppy/boot/grub/menu.lst
# umount /mnt/floppy
which gives you a grub menu (menu.lst) and allows you to put a kernel and
initrd on the floppy if you so desire.
Either way, a grub boot floppy is a nice rescue tool because (with it's
knowledge of Linux file systems) you can find your kernel and initrd on the
file system even if they've been moved.
Once you have Linux booted (after installation of XP), use:
grub-install
to reinstall grub (if necessary).
It's a good idea to confirm you can boot from the floppy before installing
XP.
Finally, a recent KNOPPIX CD makes a great rescue tool.
--
tim writer <tim-s/rLXaiAEBtBDgjK7y7TUQ at public.gmane.org> starnix inc.
905.771.0017 ext. 225 thornhill, ontario, canada
http://www.starnix.com professional linux services & products
--
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