[NTLUG:Discuss] Grub assistance
Leroy Tennison
leroy_tennison at prodigy.net
Wed Jan 23 21:28:10 CST 2008
David Simmons wrote:
>
>> OUCH! "..reformat the Linux disk," just because there is
> no MBR on the
>> disk?? That's HARSH!
>
> Yes....all you
> really need to do is boot with some type of rescue disk and issue:
>
> fdisk /mbr /dev/sda
>
> http://www.novell.com/coolsolutions/qna/1742.html
>
> _______________________________________________
> http://www.ntlug.org/mailman/listinfo/discuss
>
Now that I've deleted the previous emails which had the grub.conf
contents...
Some things to consider:
Read everything in a number of references before doing anything so that
you will have a full knowledge of what is going on with grub: "info
grub", "info grub-install", http://www.gnu.org/software/grub,
http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/en-US/Reference_Guide/,
particularly sections 1.2 and the early parts of 2.
http://www.pmg.lcs.mit.edu/~chandra/install/install_dualboot.html
(another way of looking at multi-boot)
The Grub stage1 file is written to the MBR and knows the (file system
independent) location of stage2 (or a specific stage1.5 if necessary).
Stage2 contains the full path to grub.conf so care needs to be exercised
when working with the MBR, etc.
Definitely get a rescue CD for a distro as close to yours (or exact) as
possible. You can run into file system type and version issues if they
are too different (older Red Hat not understanding reiserfs, older
distro not understanding a newer version of ext3 - have experienced both
of these).
grub-install can install to a floppy drive (if your machine has one) so
you could boot to a floppy and manually enter the commands to start
Linux (print out grub.conf before doing anything).
A suggested process is:
use dd to backup your mbr to removable media, you may need to restore it
later (if you have to fall back to a two drive system then have Windows
boot Linux and restore the MBR overwritten by MS' fdisk).
Consider using the information in the www.pmg... article to allow
Windows to dual-boot Linux. The issue is that the MBR points to stage1
and, if you pull the Windows drive before running the Microsoft 'fdisk
/mbr', stage1 won't be found: non-bootable system.
backup your grub.conf, edit it changing references to hd1 to hd0
backup /etc/fstab, edit it to make adjustments as well (might want to
consider changing references in it to UUID rather than /dev/..., this
avoids the drive references at least in it)
Pull the Windows drive but have it available to put back in if things
don't go well.
Boot either to the grub floppy or the rescue CD and use setup (grub
floppy) or grub-install (rescue CD) the make the Linux disk bootable.
More information about the Discuss
mailing list