Re: How do I make a boot disk so I can restore Grub?
From: Thomas D. Shepard (ImaSpammer_at_spam.sux)
Date: 01/25/05
- Next message: Alexander Ulyanov: "Re: TuxRacer now SLOOOOWWWW"
- Previous message: wildchild: "Re: network problem when installing Debian"
- In reply to: ANTant_at_zimage.com: "How do I make a boot disk so I can restore Grub?"
- Next in thread: ANTant_at_zimage.com: "Re: How do I make a boot disk so I can restore Grub?"
- Reply: ANTant_at_zimage.com: "Re: How do I make a boot disk so I can restore Grub?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 25 Jan 2005 02:58:42 -0800
On Mon, 24 Jan 2005 15:33:28 -0600, ANTant wrote:
> Hello. I need to install Windows 2000 SP4 on a second IDE HDD (hdb).
One of my favorite sayings (inspired by Python): "You don't *need*
windoze."
> Debian (Kernel v2.6.8) and its Grub is already installed on the first
> HDD (hda). I read that Windows will overwrite the MBR.
Yes it does. Billy Gates likes to assume that there is no operating system
in the universe other than his piece of crap.
I was told that I
> need to make a boot disk so I can restore MBR after Windows
> installation. How do I make a boot disk and be able to restore Grub on
> MBR. I hope I am saying this right since it is a bit technical for me.
>
Looking at what you wrote below, you seem to be off track a bit. Since you
already said you are using Grub (which is excellent), you should not be
talking about lilo at all. Lilo and Grub are two different bootloaders,
and all that lilo stuff is irrelevant to Grub. I prefer Grub and feel that
you should stick with it.
The documentation in the Grub info (not man) documentation explains
everything very well. Read it thoroughly before messing with any of this,
because you may very well find yourself manually issuing commands to Grub
to get back on line after you infect your system with windoze. Pay close
attention to the parts about chainloading.
The command for making a Grub boot floppy is simply "setup (fd0)" assuming
fd0 is your floppy drive and you are in grub and have already told grub
where your boot partition is. You should be running grub in standalone
mode (booting from it rather than launching it from the linux command
line) when you do this.
One very cool trick (documented in the latest
version of Grub) is to set up a menu option to make boot disks from the
Grub boot-up screen. Below is my /boot/grub/menu.lst file. It allows me to
select from two different linux kernels or to setup a boot floppy. The
entry that makes the boot floppy is entry number 2. Also note entry number
1, which installs the grub bootloader onto my "first" hard drive. This is
EXACTLY what you need except that you need to replace the "hd0,0" part
with the designation for wherever your boot partition is. This entry
number 1 is there for precisely the situation where the MBR gets clobbered
(which really isn't likely for me since my computer is not infested with
windoze). If I try to boot and see that my MBR is clobbered, I simply
ctl-alt-delete to start over and select this entry to restore the MBR. No
need to hunt for documentation or anything!
I have a separate partition for /boot. If your /boot directory is
actually on your root partition, and if your root partition is the first
one on the drive, then I *think* this becomes "root (hd0,0)/boot" But,
like I said, read the documentation really well before you mess with this.
(In my case, my boot partition is the first one on the drive, and the root
partition is the second one.)
Here is my Grub setup file (/boot/grub/menu.lst):
# This is the Grub (Grand Unified BootLoader) configuration file.
# See info grub for documentation.
# Thomas D. Shepard, 28 August 2004
# By default, boot this entry (counting from 0).
default 0
# Boot automatically after this many seconds.
timeout 10
# This is entry number 0.
# Boots kernel in file lfskernel in top directory of first partition
# in first hard drive.
# (hd0) means first hard drive. (hd0,0) means the first partition.
# The kernel is passed the command-line arguments "ro root=/dev/hda2"
# Which means to mount /dev/hda2 (the second partition of the first hard
# drive) read-only as the root partition.
#
title Boot Linux from the first hard drive
root (hd0,0)
kernel /lfskernel ro root=/dev/hda2
# This is entry number 1. It installs or re-installs Grub onto the boot
# sector of the first hard drive.
#
title Install Grub onto the MBR of the first hard drive (experts only)
root (hd0,0)
setup (hd0)
# This is entry number 2. It makes a Grub boot floppy.
#
title Make boot floppy (insert blank floppy first)
root (hd0,0)
setup (fd0)
# This is entry number 3. It boots vmlinuz-2.6.10.
#
title Boot Linux 2.6 from the first hard drive
root (hd0,0)
kernel /vmlinuz-2.6.10 ro root=/dev/hda2
>
> mkboot and lilo didn't work for me:
> # mkboot
>
[...]
-- Thomas D. Shepard I am sorry, but you can't email me. ImaSpammer@spam.sux is not a real email address. I figure if someone wants to harvest an email address to use for sending spam, they may as well use this one.
- Next message: Alexander Ulyanov: "Re: TuxRacer now SLOOOOWWWW"
- Previous message: wildchild: "Re: network problem when installing Debian"
- In reply to: ANTant_at_zimage.com: "How do I make a boot disk so I can restore Grub?"
- Next in thread: ANTant_at_zimage.com: "Re: How do I make a boot disk so I can restore Grub?"
- Reply: ANTant_at_zimage.com: "Re: How do I make a boot disk so I can restore Grub?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|