Results 1 to 8 of 8

Thread: Reinstall only the grub boot loader

  1. #1
    Member
    Join Date
    Jan 2010
    Location
    Netherlands
    Posts
    84

    Default Reinstall only the grub boot loader

    I had Windows 7 installed, and backtrack R2 (just upgraded to R3). I then installed Windows 8 (formatted my Main windows HDD, not my backtrack HDD). Now Windows installed his boot loader.

    So, Is there anyway to get the GRUB loader back without reinstalling backtrack?

  2. #2
    Good friend of the forums comaX's Avatar
    Join Date
    Feb 2010
    Location
    Paris, France
    Posts
    338

    Default Re: Reinstall only the grub boot loader

    Running both KDE and GNOME BT5 flawlessly. Thank you !

  3. #3
    Very good friend of the forum maverik35's Avatar
    Join Date
    Sep 2009
    Location
    Debian land
    Posts
    734

    Default Re: Reinstall only the grub boot loader

    There are 3 ways to do it..It is easy..

    Just please one thing that is not written in guides and I belive they take it for granted: If you are to recover the grub using a live CD, here is the "taken for granted" issue and looks pretty logic, but many many people do not do it: use the 64 bit distro if trying to recover a 64 bit system with grub, and use 32 bit live cd for 32-bit distro to recover...IF you do not do that, when recovering grub, you will get mounting errors ("chroot: cannot run command `/bin/bash': Exec format error").

    If you use a 32 bit to recover a 64 bit, you can do a recover using this after mounting partition to recover : grub2-install --boot-directory=/mnt/boot/ --recheck /dev/sda and you will succsed, but the menu screen will be different and there will be no way to change it.


    Here is the way I do it, is the easiest way from live cd (remember to use the 32 or 64 bit version according to the one you want to recover):

    Insert Live CD (Ubuntu distro with grub2 like Lucid 10.04) and load Ubuntu. teh open a terminal and type:
    sudo fdisk -l (See your BT partition: sda1, sda2, etc)
    sudo mount /dev/sdax /mnt (mount it)
    sudo grub-install --root-directory=/mnt/ /dev/sda (install grub, here DO NOT install in sdax, just sda or whatever your HDD is mapped at).

    Reboot and if any OS is missing in grub menu, just enter BT and use the os-prober command in terminal: "os-prober", then just update grub: update-grub.

    Ready..

    The other method is mount partition and mount /dev, then: chroot /mnt and finally just: install-grub --recheck /dev/sda. Same thing, reboot and if any OS missing in grub menu, use os-prober and update-grub.

    Third option: Not my favorite at all, I'm debianist and 100% "terminal command guy", use SuperGrub disk, google and download it. Again, not to me, I do not use anything that makes things "Auto", but sure is a very good tool.


    Luck.
    Last edited by maverik35; 10-23-2012 at 10:10 AM.

  4. #4
    Just burned his ISO
    Join Date
    Sep 2012
    Location
    Indonesia
    Posts
    9

    Default Re: Reinstall only the grub boot loader

    Quote Originally Posted by maverik35 View Post
    There are 3 ways to do it..It is easy..

    Just please one thing that is not written in guides and I belive they take it for granted: If you are to recover the grub using a live CD, here is the "taken for granted" issue and looks pretty logic, but many many people do not do it: use the 64 bit distro if trying to recover a 64 bit system with grub, and use 32 bit live cd for 32-bit distro to recover...IF you do not do that, when recovering grub, you will get mounting errors ("chroot: cannot run command `/bin/bash': Exec format error").

    If you use a 32 bit to recover a 64 bit, you can do a recover using this after mounting partition to recover : grub2-install --boot-directory=/mnt/boot/ --recheck /dev/sda and you will succsed, but the menu screen will be different and there will be no way to change it.


    Here is the way I do it, is the easiest way from live cd (remember to use the 32 or 64 bit version according to the one you want to recover):

    Insert Live CD (Ubuntu distro with grub2 like Lucid 10.04) and load Ubuntu. teh open a terminal and type:
    sudo fdisk -l (See your BT partition: sda1, sda2, etc)
    sudo mount /dev/sdax /mnt (mount it)
    sudo grub-install --root-directory=/mnt/ /dev/sda (install grub, here DO NOT install in sdax, just sda or whatever your HDD is mapped at).

    Reboot and if any OS is missing in grub menu, just enter BT and use the os-prober command in terminal: "os-prober", then just update grub: update-grub.

    Ready..

    The other method is mount partition and mount /dev, then: chroot /mnt and finally just: install-grub --recheck /dev/sda. Same thing, reboot and if any OS missing in grub menu, use os-prober and update-grub.

    Third option: Not my favorite at all, I'm debianist and 100% "terminal command guy", use SuperGrub disk, google and download it. Again, not to me, I do not use anything that makes things "Auto", but sure is a very good tool.


    Luck.
    i agree with maverick.

  5. #5
    Member
    Join Date
    Jan 2010
    Location
    Netherlands
    Posts
    84

    Default Re: Reinstall only the grub boot loader

    Uhm forgot to mention that I'm using the new boot loader (aka windows 8). Isn't this any problem what so ever?

    still going to try what you described Maverick, thanks ALOT!
    Last edited by nivong; 09-21-2012 at 02:39 PM.

  6. #6
    Good friend of the forums comaX's Avatar
    Join Date
    Feb 2010
    Location
    Paris, France
    Posts
    338

    Default Re: Reinstall only the grub boot loader

    It doesn't change anything, you just have to rewrite your MBR (Master Boot Record), and that's totally independent from the OS you have installed.
    Running both KDE and GNOME BT5 flawlessly. Thank you !

  7. #7
    Just burned his ISO knovis512's Avatar
    Join Date
    Sep 2012
    Posts
    6

    Default Re: Reinstall only the grub boot loader

    ~@nivong~
    Im not sure if this will help you but I recently installed a 64bit Win7. I use GRUB4DOS to bootload XP,Android,Win7, BT5r2, and BT5r3. Depending on how many drives you have and/or partitions will dictate the way you would command your grub. But as far as configuring my MBRs and PBRs I always use HBCD (Hirens) and boot MiniXP. After booting I would use BOOTICE which allows you to select an MBR/PBR install for BOOTMGR - which I think your end result will want to be. If this is for you or interests you let me know and I post more detail.

    ~@maverik35~
    Thats a new one for me! I think I'll try that one too. I'm a bootloader freak (guess my 512 right?)

  8. #8
    Just burned his ISO
    Join Date
    Oct 2012
    Posts
    3

    Thumbs up Re: Reinstall only the grub boot loader

    Quote Originally Posted by knovis512 View Post
    ~@nivong~
    Im not sure if this will help you but I recently installed a 64bit Win7. I use GRUB4DOS to bootload XP,Android,Win7, BT5r2, and BT5r3. Depending on how many drives you have and/or partitions will dictate the way you would command your grub. But as far as configuring my MBRs and PBRs I always use HBCD (Hirens) and boot MiniXP. After booting I would use BOOTICE which allows you to select an MBR/PBR install for BOOTMGR - which I think your end result will want to be. If this is for you or interests you let me know and I post more detail.
    Hi Knovis,

    Would love to know how to install/use Grub4Dos instead of Grub2 on my Dual boot B|T5r3 & Win7. I want to be able to experiment with other OS's and know Grub4Dos better ATM !!!

    Thanks in Advance !!

    Steve.
    Last edited by g0tmi1k; 10-21-2012 at 04:04 AM. Reason: Fixed QUOTE tags

Similar Threads

  1. Installing BT to Grub loader
    By leandro030821 in forum Beginners Forum
    Replies: 1
    Last Post: 03-16-2010, 10:44 PM
  2. grub loader...
    By imported_swakins in forum OLD BackTrack 4 General Support
    Replies: 4
    Last Post: 09-04-2009, 03:58 AM
  3. Grub Loader Problem
    By KeyLogged in forum OLD Newbie Area
    Replies: 1
    Last Post: 06-28-2009, 08:35 PM
  4. BT3 install - Help setting up grub (boot loader)
    By snoopgst in forum OLD Newbie Area
    Replies: 4
    Last Post: 04-04-2008, 11:26 AM
  5. Backtrack install grub boot loader
    By will_rocks_ok in forum OLD Newbie Area
    Replies: 3
    Last Post: 02-15-2008, 05:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •