Mailinglist Archive: opensuse (2700 mails)

< Previous Next >
Re: [SLE] Moving Grub from MBR
  • From: Darryl Gregorash <raven@xxxxxxxxxxxxx>
  • Date: Sat, 02 Jul 2005 13:55:58 -0600
  • Message-id: <42C6F14E.9060400@xxxxxxxxxxxxx>

James Wright wrote:

James Wright wrote:

Don't you have Windows right behind the MBR? I'd be careful here. You
might wipe out Windows.

Greg Wallace

Yes I do have Windows, and that was my concern. Do you think Windows will boot (as it prefers to be on the first partition). I am wondering if I should shrink Windows a tad, and make a small first partition for the boot loader. After reconfiguring Grub for the new partition, would this potentially work? Thank you BTW Darryl, for the clear instructions. I can try this at home first, as I have the same partition setup at work and home (XP & Suse, just two partitions).

Check fdisk or cfdisk to see what cylinder the Win partition begins on. The first track of head 0 is supposed to be reserved for boot purposes, so Win should not be there at all, but who knows what Billy has decided to do along the way? By saving copies of the MBR and both partition boot records, you can try moving grub without resorting to such a trick. Read on to find out why...

If you do create such a partition, you will need to perform major surgery on your Linux boot information, as well as to the mounting table (/etc/fstab). The new partition will become /dev/hda1 (or in grub, (hd0,0) ) and must be a primary partition, and everything else will slide down one number. Thus the grub menu line to boot SuSE will become "root (hd0,2)" instead of the (hd0,1) it now is and the fstab line for the partition will become "/dev/hda3 / <etc>" (assuming it is a primary; hda5 if it's a logical extended partition) -- thank <fill in appropriate deity's name> you have SuSE installed on just one partition.

If XP can work with more that one primary partition on a drive, and I believe that it can, then your drive lettering in XP will also be off, and I believe even the grub 'hide" command wont' help here. OTOH, if XP will honour the "hidden" bit in a partion table entry, then you must still hide this new partition before chaining to XP's loader, in order to preserve the XP drive lettering. More surgery for menu.lst, but fortunately, Linux ignores partition table "hidden" bits, so you don't have to "unhide" it later to be able to boot into SuSE.

Then, if it all doesn't work, you have to reverse all that....

All in all, not something I would recommend doing, not even if I were watching over your shoulder -- in fact, not even if **Linus** was watching over your shoulder.

< Previous Next >