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:
#boot=/dev/sda
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 ![]()
Want to stay up to date with the latest Linux tips, news and announcements? Subscribe to our free e-mail newsletter or RSS feed to get all updates.
You can Email this page to a friend.
You may also be interested in other helpful articles:
- Howto: Dual boot AIX and Linux in a clustering environment
- OLPC Dual Boot Windows and Linux PC Coming Soon
- nixCraft FAQ roundup
- XO Laptop: Hello Windows ~ Goodbye Linux :(
- Run your Open Source Application in Windows Vista
Discussion on This Article:
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!
Tags: bootloader_problems, boot_loader, dual_boot_system, fedora_linux, fix_linux_mbr, fix_windows_mbr_problem, grub_bootloader, master_boot_record, red hat rescue, redhat linux rescue, redhat rescue, redhat rescue cd, redhat rescue disk, rhel, rhel rescue mode



Excellent! Just what I needed!
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?
thanks a lot
This was very useful, I fixed my installation in few minutes.
Thanks mate. The solution worked perfect. Even a novice like me could understand and execute. Thanks again
Thankyou-now I can boot linux
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 ahmedbarakat@gmail.com
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
Your note has saved me so many hassles. Thanks.
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
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.
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