Re: Double checking grub-install ??

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2008-06-25 at 14:15 -0400, William Case wrote:
> I have to run fixmbr on my WindowsXP harddisk (sda).  I assume this
> use of fixmbr will blow away my grub.

It will change the master boot record to suit Windows.  If you'd
previously put GRUB on there, you'd lose it.

I'm not sure that I see the point of running fixmbr, then doing
something else to undo it.

> after running fixmbr I will go to my Fedora rescue disk and do:
> 
> grub-install --root-directory=/boot /dev/sdb
> 
> That is; I want grub stage1 on the mbr of sda while I want stage2 on
> sdb /boot.

Shouldn't really be necessary to do anything other than rewrite the MBR
(you could that by backing it up with dd before any changes, then
restoring it again the same way).

Running fixmbr should only affect the drive that Windows is on.  So the
only thing lost will be the MBR, the rest of GRUB will be unchanged
(stage2 will still be where it was before).  

When I've restored GRUB, I've done it this way:

Get into a GRUB shell:
 Type the "grub" command.

Tell GRUB where the boot partition (GRUB's root) is:
 Type a "root (hd1,0)" command line (second drive, first partition).

Tell GRUB where to write the boot record to (the MBR the BIOS will boot):
 Type a "setup (hd0)" command line (first drive MBR).

Make GRUB actually do it:
 Type the "quit" command.

That's just four commands.  Here's a copy and paste of the process on my
computer, though I'm doing everything on drive zero, since there's only
one disc in this box.

[tim@gonzales ~]$ su -
Password: 
[root@gonzales ~]# grub
Probing devices to guess BIOS drives. This may take a long time.

    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename.]

grub>  root (hd0,0) 
root (hd0,1)
 Filesystem type is ext2fs, partition type 0x83

grub>  setup (hd0)
 setup (hd0)
 Checking if "/boot/grub/stage1" exists... no
 Checking if "/grub/stage1" exists... yes
 Checking if "/grub/stage2" exists... yes
 Checking if "/grub/e2fs_stage1_5" exists... yes
 Running "embed /grub/e2fs_stage1_5 (hd0)"...  23 sectors are embedded.
succeeded
 Running "install /grub/stage1 (hd0) (hd0)1+23 p (hd0,0)/grub/stage2 /grub/grub.conf"... succeeded
Done.

grub> quit
quit
[root@gonzales ~]# 

NB:  Tabbing didn't work when I tried it.  But it has in the past.  I'm
not sure if that's down to the terminal on Fedora 9, or something else.

-- 
[tim@localhost ~]$ uname -r
2.6.25.6-55.fc9.i686

Don't send private replies to my address, the mailbox is ignored.  I
read messages from the public lists.



-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux