Fix a dual boot Windows Vista and Linux problem

How do you fix a dual boot system if you had to reinstall Windows Vista and you can no longer boot to Fedora Core 6 (FC6) or Fedora Linux ? Nobody wants to reinstall FC 6 or Fedora Linux again!

Almost all versions of Microsoft Windows (including XP, Vista and old versions) overwrite GRUB bootloader in MBR (master boot record). As a result Windows boot loader becomes a new boot loader and GRUB will not appear on screen (you will not able to see GRUB menu options).

But don’t worry you can easily fix the problem. Please note that if you are using Debian or Ubentu Linux just follow these instructions. Following instuctions are Fedora Linux only and should work with RHEL / CentOS too:

Step # 1: Boot from Fedora Core Linux 1st CD or DVD

Set BIOS to boot from CD/DVD rom. At boot: prompt type command linux rescue
boot: linux rescue

Just follow on screen instructions, when prompted let installer search Linux installation. If the search operation is successful, your old Linux installation will be available at special directory called /mnt/sysimage.

Step # 2: Prepare system for GRUB reinstallation

Type the following commands at shell prompt:
# chroot /mnt/sysimage
# cd /boot/grub

chroot command allows to run rest of all *COMMAND* with root directory set to NEWROOT called /mnt/sysimage. Without chroot environment you will not able to restore GRUB on Fedora Core 6.

Step # 3: Find out your GRUB bootloader installation location

If you have only one IDE hard disk default should be /dev/hda. You can use any of the following command to determine your device name:
# grep '#boot' grub.confOuput:


Above output clearly point out that /dev/sda device where my GRUB bootloader was previously installed.

You can also try out fdisk -l command to list partitions and disk information:
# fdisk -l

Step # 4: Reinstall GRUB

Use grub-install command to install GRUB on your drive /dev/sda
# grub-install /dev/sda

Please note that if above command returned any error return with –recheck option to probe a device map even if it already exists
# grub-install --recheck /dev/sda

Step # 5: Reboot system

Exit from chrooted environment and reboot Linux:
# sync;sync;exit;exit
# reboot

Now GRUB will be able to boot both Windows Vista and Fedora Core 6. In UNIX/Linux dd command can be used to backup and restore the MBR 🙂

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 23 comments so far... add one
CategoryList of Unix and Linux commands
Disk space analyzersncdu pydf
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
23 comments… add one
  • Keith Jan 19, 2007 @ 20:11

    Excellent! Just what I needed!

  • Wayne Craig Mar 2, 2007 @ 15:09

    I have installed Windows Vista on a seperat hard drive. Windows XP Home edition was running fine I installed the new hard drive and then installed Windows Vista Home Premium on the new drive. Did not use dual boot at the time of installation. How do I institute Bual boot from here?

  • kingless Apr 21, 2007 @ 22:52

    thanks a lot 🙂

  • John May 10, 2007 @ 21:35

    This was very useful, I fixed my installation in few minutes.

  • bhatta Oct 3, 2007 @ 16:27

    Thanks mate. The solution worked perfect. Even a novice like me could understand and execute. Thanks again

  • peter Nov 1, 2007 @ 8:16

    Thankyou-now I can boot linux

  • ahmed barakat Jan 5, 2008 @ 17:06

    very nice steps, but when I start the rescue, it tells me it failed to mount some parts of my system,
    the problem that after changing the root
    I find that /dev’ folder has no devices
    so grub-install gives error: “can’t find /dev/hda, or it’s not a block device”
    Do u have any idea how can I handle that please send to me on my personal mail
    It’s very important I have a lot of data on my fedora core 6 installation, I don’t want to reinstall it

    Best Regards,
    Ahmed Barakat

  • Deepak Jan 28, 2008 @ 20:03

    Your note has saved me so many hassles. Thanks.

  • constantine Apr 21, 2008 @ 23:37

    hi i installed vista and then linux fedora8 then i formated the partition that the linux was on how can i fix my boot sector to work on vista again please help

  • JM May 25, 2008 @ 8:23

    Hi, I think you have to boot with the Vista CD/DVD and use the repair utility. Don’t know on Vista but on XP/2000 the command was FIXMBR. It’s seam that’s Vista as overtaken the mbr whitout asking on my multiboot system, that’s bad.

  • Naba Jun 21, 2008 @ 12:03

    the following error message appear when attempting to logon from my Linux desktop….

    When I attempt to log in as as user i’m seeing the following error directly after entering the password and username.

    “Your session only lasted less that ten seconds. If you have not logged out yourself, this could mean that there is some installation problem or that you may be out of diskspace. Try logging in with one of the failsafe sessions to see if you can fix the problem”

    Checkbox – View Details (~/.xsession-errors file) which when checked dsiplays the following.

    /home/user/.Xclients: line 8: /home/user/.Xclients-default: No such file or directory

    /home/user/.Xclients: line 8: exec: /home/user/.Xclients-default: cannot execute: No such file or directory

  • afeez Aug 3, 2008 @ 14:02

    hey installed server 2008 them redhat linux. now my system is now booting 2 windows. the linux just doesnt allow for windows 2 boot, as in it doesnt give even give any option for this 2 happen. plz help.

  • Joevn Aug 13, 2008 @ 13:56

    I have install Wins Vista and then Linux Ubuntu, the boot system working fine till, I uninstall Ubuntu, the Vista Boot sector wouldn’t work again. I have tried to put the Visa CD installer to the boot system. However, the system recover denied the access to configuration due to vista require administrator password. But I don’t remember the vista Administrator password, or i don’t think i even set one for it. Could you tell me how to clear Administrator password, please? Or anyone have any suggestion to overcome and fix my vista booting sector. THANKS, Mate

  • Sirajuddin Dec 16, 2008 @ 6:35

    Thanks very much. Its very useful. Can anyone tell me how to get a subscription or login permit to this nixcraft.

  • Henry Feb 17, 2009 @ 19:12

    This has been of great help to me. Worked perfectly and saved me weeks of misery and tens of attempts ‘successfully’ reinstalling Fedora Linux and having the system boot straight to Windows Vista as if the Linux installation did not happen.

  • matrix Apr 11, 2009 @ 15:44

    that was great. thx a lot…

  • dee Apr 19, 2009 @ 16:37

    THANKS!!!! help me a lot!

  • Sami Feb 5, 2010 @ 13:48

    Thank you! This is what I needed

  • amir Feb 6, 2011 @ 8:18

    hi guys i have win vista-after that i install linux centos now when i was in vista i format the drive that linux install on linux boot show up like every time but no option to select black screen of gnu grub of centos show up now i can’t go to vista help me what should i do?

  • Mike Mar 18, 2011 @ 5:06

    Thanks. I followed the steps and everything works.

  • Adam Jul 8, 2012 @ 16:55

    Hey I have the opposite problem! Every time i start my computer it starts with ubuntu linux and i need to boot with Windows Vista! How do i fix this so i can boot windows???

    • Adorn Sep 3, 2012 @ 3:34

      @Adam: Just Update grub or add windows entry manually.

  • Pankaj Jun 7, 2013 @ 16:19


    I installed RHL 4 successfully to make my laptop to be dual boot alongwith Vista home premimum, RHL option does not come up while booting, so I followed steps given in this blog, I am still unable to fix boot issue.

    Please advise.


Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum