Reconfigure your Linux/Win dual boot to install Vista Service Packs
The following guide is written to help those who dual boot Windows Vista/7 or possibly XP with Linux and need to install service packs to their Windows installation. Because of the checks performed by the Windows Update the active boot manager must be the Windows partition, not a Linux one. You can change back to the Grub or Lilo after updating if you like but it’s just as simple not to.
Be careful what you do with your system and do not rush through this process. It might take some time but it is worth getting right.
So, how do we get around this irritating problem?
Let’s start at the beginning.
When you install Linux (and this covers pretty much all distros), how your pc boots is altered. You’re computers’ drive probably starts off looking like this:
- Partition 1 C: NTFS *bootable flag
- Partition 2 E: Recovery (Might not have this one, depends on where your got your pc from and how it was initially set up)
After installing the distro of your choice it might look more like:
- Partition 1 NTFS (now smaller, probably, after a resize)
- Partition 2 EXT4 Linux *bootable flag
- Partition 3 SWAP
- Partition 4 Recovery
The important thing to note is which partition is now bootable. After setting up Linux usually the default setting is to use its partition for booting rather than Windows’ boot manager. Grub is the most used but Lilo still knocks about these days.
The problem here is that if Windows does not boot from its own manager and you attempt to install second service pack you will get an “Update failed” notice each time you try and then half an hour of your life sucked out while you wait for it to revert changes. I’ve sat and stared at that screen now to know how soul destroying that can feel. Especially when you actually want to get some work done.
So how’d you solve this? Well, thankfully I’ve done some googling and reading up to offer you an answer but before you do anything else you need some cd’s, well one at least but certainly some downloads.
- Find yourself a Linux Live CD. I used Zenwalk but any live cd with a partition editor will do. Parted is enough but if you’re in a graphical environment gparted should also work just fine. System Rescue CD is a small download and a very useful disk to have around anyway.
- Next you’ll need your Vista DVD. Don’t worry if you don’t have one. You can download just the recovery elements of the disk (all we need for the purposes of this) in a ready to burn iso from this torrent. Thanks should go to neosmart.net for making this available.
- If all else is confusing you and you’d like a helping hand you can also use EasyBCD if you are able to boot into Vista. A very useful and completely free program for setting up, recovering or editing your bootup manager. If you choose to downloads this you might get away with not needing your Vista CD.
Step One
Boot up your chosen Live CD and load up it’s partitioning manager, most likely gparted. If you are using sysreccd then choose a graphical environment and load up gparted or terminal and load parted.
Assuming you’re using gparted, start by selecting your drive. It will then load the partition tables and it will show you exactly how your hard drive is set up, like might look something like this:
From here it’s just a case of selecting the relevant partition and unsetting the boot flag then setting it on your Vista partition and clicking apply.
From the command line in parted:
A lot of Linux installers use this, Zenwalk being one
The first action (the line of commands along the bottom of the screen) is toggle bootable. So, select the partition with the set boot flag using the up and down keys, then press enter to untoggle it. Now (aghain using the up and down keys) select your NTFS partition. Make sure it is the one which holds your Windows installation. Do the same as above for it to set it to bootable.
Now, using the left and right arrow keys select “Write” confirm that you want to write the changes to disk (it warns you could lose data at this point – I didn’t – it’s only to cover itself incase something goes horribly wrong I think. Not likely to happen so confirm away!).
Step Two
Once that’s done, reboot this time with the Vista Recovery CD in the drive or reboot back into Vista if you’d rather use EasyBCD and their Recovering the Vista Bootloader Guide.
If you booted up into the recovery CD all you need do is press a button to boot from the CD then enter your language and keyboard layout preferences. That done it should auto-detect your Windows drive (if you tried that before without success – that’s normal. I had to change the boot flags around before this recognised my Vista install) and offer to repair it. If it does not then select repair from the menu. Wait for it to finish then reboot.
Once your back in Vista. Try the updates again, let it do it’s thing. This time though, it should work fine. Assuming there are no Anti Viru/Spyware or similar programs running which can cause problems. I know Norton is one such culprit so try and deactivate it before you start the update.
Several reboots later and you should *fingers crossed* be running sp2!
Step Three
At this point you’ll probably want to create Linux option for your boot manager. Well this is definitely where EasyBCD shines, follow it’s very simple instructions to easily add your Linux installs to the Windows bootloader. In my case I’ve added in my Fedora installation.
Add as many entries as you have installations et voila – you are done!
You now have a multibooting Vista and Linux desktop with as few problems as possible.
Resources of this post:
http://social.answers.microsoft.com/Forums/en-US/vistawu/thread/3eeb8d59-bcd3-449a-be0b-18a6c0b92891
http://neosmart.net/wiki/display/EBCD/Recovering+the+Vista+Bootloader+with+EasyBCD
http://support.microsoft.com/kb/927392
[…] bit of research to solve it. I like my Linux but I like staying up to date too – even in Windows. This tutorial should help you out, it did me […]
If only all bloggers spent enough time to come up with content such as this. But then again that would be asking too much.
I agree with Ester, excellent guide. You explain things very clearly and I especially like the fact that you have added the links to your resources at the bottom of your post. Most people are too afraid to link away from their blog. I’m still struggling with some aspects of the dual boot, but I’m getting up to speed quickly. Cheers!
Tks…
This information really helped me, I am sharing with a few friends….