I've just installed Backtrack on my harddrive (got one), i also got Fedora and Windows 7. However, now i get the Backtrack-GRUB instead of my Fedora GRUB. How do i change that? I got a sda5 containing my Fedora GRUB so it should be easy to 'rewire' - i don't know how tho.

  • 1
    Do you mean that you want to restore the Fedora installed bootloader? Or just add new entries for Fedora and Windows? – Mr. Shickadance Mar 5 '11 at 20:45
  • I want to use the Fedora bootloader instead of the Backtrack one. However, i can't even get my Fedora to boot up by using the Backtrack bootloader. – Peter Bendix Poulsen Mar 6 '11 at 0:39

This is my first instinct as a long-time Gentoo user:

Mount the partition(s) with grub on it:

mount /dev/sda5 /mnt/fedora

# if Fedora had a separate /boot:
mount /dev/sda923 /mnt/fedora/boot 

and copy the relevant section in $FEDORA/boot/grub/grub.conf into your Backtrack grub.conf. Not Fedora, but quick and easy.


Mount the proc filesystem so that Fedora will see it too:

mount -t proc none /mnt/fedora/proc

Chroot into Fedora:

chroot /mnt/fedora

Here should come some magic to sanitize the chroot environment, I have no idea how that should look like in Fedora. This is Gentoo:

source /etc/profile && env-update

Now, fire up grub:


Grub commands copied from the Gentoo page:

Code Listing 2.8: Installing GRUB in the MBR

grub> root (hd0,0)    (Specify where your /boot partition resides)
grub> setup (hd0)     (Install GRUB in the MBR)
grub> quit            (Exit the GRUB shell)

Here, (hd0) is the first hard drive, and (hd0,0) is the first partition on it. /dev/sda5 usually comes out as (hd0,4), but make sure to double-check everything as you go along. Grub has auto-complete, so it should be easy.

A word of advice, whichever route you take: when you remove either distro, make sure you remember where your system boots from!


Backtrack probably overwrite the MBR with its records, thus causing the Backtrack GRUB to show up instead of the Fedora one. Now to bring back the Fedora GRUB you need to tell grub to create appropriate records in the MBR.

See the question restore suse grub for how to restore GRUB. You didn't mention if you are using Grub Legacy or Grub 2, but if both your Fedora and Backtrack installations use Grub 2 you can (from my answer on the linked question):

  1. Boot into Backtrack
  2. Mount Fedora somewhere, say /mnt/fedora
  3. grub-setup -d /mnt/fedora /dev/sda

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.