openSUSE Dual Booting with Windows 7 AND Loading Service Pack 1 for Windows 7

Just this very day (2-22-2011), Service Pack 1 for Windows 7 was released. Anyone using Windows 7 is generally advised to load this new Service Pack. If you have not yet installed openSUSE or Service Pack 1, then do not delay. Install the Service Pack 1 first before taking any further action with openSUSE. Once done, then consider loading openSUSE onto your computer. However, if you already dual boot openSUSE and Windows 7, there could be a complication. This can arise due to one of three basic problems:

  1. The Windows 7 Partition is not Marked Active for Booting.

  2. The Grub Boot Loader is loaded into the Master Boot Record (MBR)

  3. The Hard Drive Windows 7 is loaded on is not the selected BOOT Drive in your BIOS.

The Last condition is easy to fix. You just designate the Windows drive as the boot drive in your BIOS setup, boot directly into Windows 7, load the new Service Pack 1, rebooting a couple of times and when done, reselect the openSUSE hard drive as your boot drive in your BIOS setup and go on your marry way.

However, if your situation falls under the first two statements, then more effort is required before loading that Service Pack 1 is going to work for you. Now, before we go any further, by all means, attempt to load that new Service Pack 1 while running Windows 7. If it works it works and if it gives you an error message, then I suggest you follow the rest of this article.

First, you should download and use the very fine script file from please_try_again called findgrub and determine just where you have loaded that grub boot loaded. Here is the link:

Looking for Grub and Windows bootloader in all partitions.

Message #69 has the most recent version of findgrub that you can use. Run findgrub and print out and save all information from this program.

Basically, either grub is loaded into the MBR (Master Boot Record) OR it is loaded into one of the first four Primary Partitions 1, 2, 3, or 4. findgrub will tell you where it is at AND it can also determine what partition is the Windows booting partition for you.

Second, I suggest you download a copy of the GParted Boot Disk. Make and test the boot disk to make sure it is good. Here is a fine article from caf4926 about how to restore the grub boot loaded if you need to:

Re-Install Grub Quickly with Parted Magic

  1. If you determine you have loaded Grub into Partitions 1, 2, 3 or 4 then you are in luck. Boot from the GParted disk and change the active boot Partition to the Windows Partition Identified as bootable with findgrub. It is most often partition 1 or 2 and more doubtful it is 3 or 4. Here are some facts to understand.

Windows 7 when installed new from OEM or a clean install may create two Primary Partitions. One small booting Partition (first) and then a much larger second partition where the rest of Windows is located. You will be activating (Make Active) the first small partition. However, if this is a Laptop (and even on some desktops) be aware that a small restore partition could be present. Activating and booting from a restore partition could be bad and wipe out all data on the disk. So ask for help before activating a partition not identified as a booting windows partition by findgrub.

  1. If you loaded Grub into the Master Boot Record, you have some choices to make. Most often, your only real choice is to boot from a Windows 7 DVD, if you have one and allow it to “Repair” your installation. Basically replacing the MBR with generic booting code and marking the Windows boot Partition as Active for booting. Once done, Windows will boot normally, you can run the Service Pack 1 installation and then you are going to use the GParted disk to restore your openSUSE installation. Here is an article about restoring the MBR to get Windows 7 working again.

MBR - Restore Windows 7 Master Boot Record - Windows 7 Forums

If you do not have a Windows boot disk you could be in trouble and may need to borrow one from someone to get through this. When in doubt, then take no action. Do not attempt to load the Service Pack 1 again (after the first try that failed) and continue loading the normal Windows updates. Again, consider asking for help in these forums if you need to.

I hope that you find the above information useful in getting your Windows 7 updated with Service Pack 1 and being able to continue dual booting openSUSE and Windows 7 as you desire.

Thank You,

rotfl! Is the openSUSE forum supporting Windows maintenance now? I hope they are looking after you. :smiley:

No problem here. I made the Windows partition active, and booted into Windows. Then SP1 installed without problem.

I had already setup the Windows boot manager to get me back to grub. So I can still get into linux where I can change back to making the partition with grub (the extended partition in this case) active.

I do remember that installing SP1 on Vista (different computer) was very frustrating until I found out what it was that confused the Windows software.

Obviously not.
But I see this as a positive step taken by James, in order to head off potential heart ache for those that multi-boot with windows7. My guess is, there are more than a few.

I wonder if someone in the windows forum will take the time to provide such guidance?

I say. Thank you James for your valued contribution.

Thanks a lot for the info James. I’ve a multiboot lap (the one in signature) but got grub in the MBR. Hopefully the service pack 1 installation will be smooth for me. I’ll report back but I don’t plan to install until windows updater forces me to install it.

@Carl
I totally agree with your reasoning.

Best regards,
Greg

Further on this topic, in post#8 here I provided some images how to setup a Windows7 boot if one can boot openSUSE via grub but Windows is not showing up as a selection:
openSUSE 11.4 RC1 - Have you installed it? Did/Do You have Any Issus?

There are various threads as well on how to backup the MBR prior to a major MS-Windows install (or update that is likely to impact one). Here is such a thread: Recover mbr … as a result of this thread, as a precaution, I keep back backup of the MBR of all the computers in our house.

**BACKUP COMMANDS
**
Extreme precision is needed, but the MBR backup can be made with the command:

dd if=/dev/sda of=MBR-backup-only  bs=440 count=1

and

dd if=/dev/sda of=MBR-and-partitioning-backup  bs=512 count=1

where this backups ONLY the MBR on hard drive sda to the file “MBR-backup-only” (it does not backup the partitioning information) and backs up the MBR & partitioning to the file “MBR-and-partitioning-backup”. Note 440 is used instead of 446. There is good reason for that. 446 is NOT compatible with Vista nor Windows7, but 440 is compatible. 512 backups the partitioning information, but often one does not need that. Still, one never knows when it come in handy.

Then keep both of those files on a USB stick, clearly marked as to which computer they are intended for.

**RESTORE (only)
**
Then if one loses their MBR for any reason, one can boot to a liveCD, plug in the USB stick with the backed up files, and restore the ‘original MBR’ (which may help in some problem cases) by:

dd if=MBR-backup-only of=/dev/sda  bs=440 count=1

And if one loses the partitioning, and IF the MBR has not changed since the backup, then one can restore the ‘original MBR and partitioning’ (which may help in some problem cases) by:

dd if=MBR-and-partitioning-backup of=/dev/sda  bs=512 count=1

Note EXTREME precision is ESSENTIAL. If one makes a mistake in those commands in either typing, or choosing the wrong occasion to use them, one can totally destroy their MBR and their partitioning (forcing a complete reformat and re-install).

Edit - Note I boot to a liveCD BEFORE I install Linux, and I use the above ‘BACKUP commands’ to backup MS-Windows MBR (and copy it to a USB stick), so that IF the Linux install goes bad, I can still retsore the MS-Windows MBR.

Speaking of extreme precision being needed - I made a typo above and corrected it. NNTP users will notice the correction. The above is correct now.

I found this to slightly inaccurate: MBR - Restore Windows 7 Master Boot Record - Windows 7 Forums
I prefer this

Win7 Boot repair:
Boot off the windows 7 installation DVD
Proceed to the screen “Windows 7 / Install Now” BUT DO NOT click to install
Select to “Repair your computer”
Select/put the radio button/dot next to “Use recovery tools that can help fix problems” –> Next
Select “command prompt”
enter this command: Bootrec.exe /FixBoot
enter this command: Bootrec.exe /FixMbr
enter this command: exit
Click to Restart

No problem here. I made the Windows partition active, and booted into Windows. Then SP1 installed without problem.

How did u managed to do this, and how can i do this?
Btw, I’m using Ubuntu, but i get th error when trying to install Win 7 SP1.
So i start searching google and foun out that it is GRUB fault…

So how do I set the Win partition active in GRUB?
Then installing Win 7 SP1
And then resetiing the Partition to its default…how?

Thank you very much,
Spazzt

So a big thank you to everyone’s support here as it is very much appreciated. In particular I thank caf2926 and oldcpu for their help and corrections when needed.

How did u managed to do this, and how can i do this?
Btw, I’m using Ubuntu, but i get th error when trying to install Win 7 SP1.
So i start searching google and foun out that it is GRUB fault…

So how do I set the Win partition active in GRUB?
Then installing Win 7 SP1
And then resetiing the Partition to its default…how?

Thank you very much,
Spazzt
Spazzt, I think you need to reread the above material. I do not use Ubuntu, but Grub still must be loaded into one of five places. If it it in the MBR, your only choice is to use a Windows 7 disk to “repair” your installation and permit SP1 to install. Otherwise you can use a Linux boot disk to set the active partition back to Windows. You will need to use a newer version of GParted with Grub2 to return your setup back to normal if grub2 is in the MBR or ask for more help in a Ubuntu forum.

Thank You,

Last weekend, my wife installed Windows7 (without SP1) on our Dell Studio 1537 laptop.

Before the Windows7 install, the laptop had the configuration:


/dev/sda1 = Dell Utiliity partition (FAT32)
/dev/sda2 = Windows Vista recovery partition (NTFS)
/dev/sda3 = WinXP (NTFS)
/dev/sda4 = extended (flagged as the active boot partition)
/dev/sda5 = swap for Linux
/dev/sda6 = / for openSUSE-11.3 (EXT4)
/dev/sda7 = /home for openSUSE-11.3 (EXT4)

Grub provided only options to boot winXP (in /dev/sda3) and boot openSUSE-11.3 (in /dev/sda6). It managed this by /dev/sda4 being flagged as the active boot partition.

My wife advised she wanted the Dell Utility, WinVista recovery, and WinXP removed and replaced with Windows7. So with backups in place (including backing up the MBR with the above noted ‘dd’ commands in a previous post of mine in this thread), and after removing from the openSUSE-11.3 /etc/fstab any reference to sda1, sda2 and sda3, I booted to PartedMagic liveCD and using the gparted tool in that liveCD I deleted sda1, sda2 and sda3 and created a new blank sda1 formatted as NTFS. I also made sda1 the ‘active’ boot partition.

Of course with /dev/sda1 (a blank NTFS taking up the space that the old sda1, sda2 and sda3 used to take) now flagged as the active boot, it was not possible to boot to openSUSE (as /dev/sda4 needs to be flagged as the active boot for grub to be launched).

My wife then proceded to install Windows7, being very careful to select the custom setting in the install so that Windows7 was installed on only /dev/sda1 (which Windows7 installer easily identified, albeit it called the partition a different name) and not on the entire hard drive.

After the Windows7 install was complete (and the PC easily re-bootable to Windows7 but not to openSUSE Linux) I then booted again the PC to the Parted Magic liveCD. I backed up the windows7 MBR with the ‘dd’ command again (just to be cautious). I then changed the active boot partition back to /dev/sda4. And then, without restoring the MBR with any ‘dd’ backups, I rebooted the PC.

The PC booted fine with the old grub (launched via /dev/sda4 being the active partition). I selected openSUSE-11.3 in grub and openSUSE-11.3 booted fine. I then ran YaST and went into YaST boot control configuration application and changed the boot location for windows from the old (now removed) /dev/sda3 (that had winXP as a boot) to /dev/sda1 (where windows7 now resided). I exited YaST, restarted the PC, and again I had grub. I selected Windows7 in grub, and it booted windows7 fine.

This was amazingly easy.

To much surprise, despite my caution with MBR backups, none of them were needed. Still, its good to be safe. :slight_smile:

So oldcpu will you be installing SP1 then to see if you can get it to work and let us know of any changes you had to make for that to happen with Windows 7?

Thank You,

Sorry. I guess that I wasn’t clear enough.

I made the Win partition active using linux “fdisk”. In my case, grub is installed on partition 4 (the extended partition), and Windows 7 boots from partition 3. I used “fdisk /dev/sda” to get into fdisk. Then “a” “4” sets partition 4 no longer active, “a” “3” sets partition 3 active, and “w” saves the changes and exits from fdisk. I wrote that as “a” “4” to indicate that you type in the command “a”, hit enter, type in the “4” in response to the prompt for partition. Don’t actually type in the quotes.

The more important part is that I had earlier made a copy of the grub boot record to the Windows partition:

dd if=/dev/sda4 of=/windows/C/bootsect.lnx count=1

and had setup that in the Windows boot manager. I can never remember the details, so I google for “bcdedit linux” (without the quotes) for details on running bcdedit. That (the setup of the Windows boot manager) will only work when the Windows boot partition is active), though the Windows boot manager keeps working whenever you boot Windows even if not the active partition.

It’s the use of the Windows boot manager that gets me easily back into linux, so that I can run “fdisk” again to reverse the changes.

Incidently, if you have grub set to boot from the MBR, you would use something like

dd if=/dev/sda of=/windows/C/bootsect.lnx count=1

to generate that boot sector file. And that file is then your backup for the grub MBR that you can restore if Windows wipes it. But copy back only 440 bytes, as another poster indicated, when restoring.

Here’s my experience on the Windows 7 sp 1 installation.

For reference here’s my partitioning on the laptop from my signature :

Dysk /dev/sda: 320.1 GB, bajtów: 320072933376
głowic: 255, sektorów/ścieżkę: 63, cylindrów: 38913
Jednostka = cylindrów, czyli 16065 * 512 = 8225280 bajtów
Rozmiar sektora (logiczny/fizyczny) w bajtach: 512 / 512
Rozmiar we/wy (minimalny/optymalny) w bajtach: 512 / 512
Identyfikator dysku: 0x76692ca8

Urządzenie Rozruch   Początek      Koniec   Bloków   ID  System
/dev/sda1               1        1912    15357116   1c  Ukryta W95 FAT32 (LBA)
/dev/sda2   *        1913       11640    78140160    7  HPFS/NTFS
/dev/sda3           11641       38913   219070372+   f  W95 Rozsz. (LBA)
/dev/sda5           11641       37097   204475320    7  HPFS/NTFS
/dev/sda6           37097       37098        8032   82  Linux swap / Solaris
/dev/sda7           37098       37997     7229187   83  Linux
/dev/sda8           37998       38913     7357738+  83  Linux

/dev/sda1 → hidden Asus recovery
/dev/sda2 → Windows “drive C”
/dev/sda5 → Windows “drive D”
/dev/sda7 → openSUSE root
/dev/sda8 → openSUSE home

My /boot/grub/menu.lst file :

grzes@opensuse:~> sudo cat /boot/grub/menu.lst
root's password:
# Modified by YaST2. Last modification on Tue Jan 25 18:53:46 CET 2011
# THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader
# Configure custom boot parameters for updated kernels in /etc/sysconfig/bootloader

default 2
timeout 8
gfxmenu (hd0,6)/boot/message
##YaST - activate

###Don't change this comment - YaST2 identifier: Original name: linux###
title Desktop -- openSUSE 11.3 - 2.6.37-41
    root (hd0,6)
    kernel /boot/vmlinuz-2.6.37-41-desktop root=/dev/disk/by-id/ata-ST9320325AS_5VE83YJB-part7 resume=/dev/disk/by-id/ata-ST9320325AS_5VE83YJB-part6 splash=silent quiet showopts vga=0x317
    initrd /boot/initrd-2.6.37-41-desktop

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- openSUSE 11.3 - 2.6.37-41
    root (hd0,6)
    kernel /boot/vmlinuz-2.6.37-41-desktop root=/dev/disk/by-id/ata-ST9320325AS_5VE83YJB-part7 showopts apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 x11failsafe vga=0x317
    initrd /boot/initrd-2.6.37-41-desktop

###Don't change this comment - YaST2 identifier: Original name: windows###
title Windows
    rootnoverify (hd0,1)
    chainloader +1

Of course the update took ages to finish and required a reboot but to my great surprise Windows 7 did NOT overwrite my MBR so my dual boot was NOT broken.

Here’s the first thing I checked after the installation :
http://dl.dropbox.com/u/20761718/win7_sp1.png
So everything looking fine (sorry for polish).

Unfortunately the update log was not so “optimistic” :slight_smile:
https://dl.dropbox.com/u/20761718/win7_sp1OverallSuccess_after_retry_log.png
Niepowodzenie = failure in English.

As expected I then saw an unknown error :
https://dl.dropbox.com/u/20761718/win7_sp1unnownError.png

But my trust in Windows devs is really big so I clicked the “try to check solution online button” and it told me that the error means windows update are overloaded and the “solution” is to try the update after 10 - 15 minutes delay.

So I rebooted to check if the MBR is still not overwritten and it wasn’t. I could still boot both OS’es. I booted Windows again and forced it to check for updates and now it didn’t throw the unnownError and it seems to function correctly. I rebooted again to check if I can boot openSUSE as well and I could. I’m writing this post now from my favorite linux distro :slight_smile:

Best regards,
Greg

So glistwan your post has got me stumped. You know I have trouble with English some times, so any other language is simple not going to work. Did you successfully install the Windows 7 Service Pack 1 or not and if so, did you have to do anything with your openSUSE installation before hand to allow the Service Pack to install?

Thank You,

Here is one example of a failed attempt to load Windows 7 Service Pack 1. In this case the hard disk was setup as follows:

/dev/sda - MBR is loaded with Generic Booting Code
/dev/sda1 Primary NTFS Partition, Small Windows 7 Booting Partition (Normally would be Marked Active for booting if this was a Windows only installation, but it was not marked Active)
/dev/sda2 Primary NTFS Partition, All of Windows 7 Loaded Here
/dev/sda3 Primary EXT4 Partition, Marked Active for Booting, Contains Grub, For main / openSUSE Partition
/dev/sda4 Primary Extended Partition
/dev/sda5 Logical SWAP Partition
/dev/sda6 Logical EXT4 Partition, /home for openSUSE

When I attempted to update Windows, Here is the Error message:

http://thumbnails14.imagebam.com/12086/ffb6bb120852279.jpg](http://www.imagebam.com/image/ffb6bb120852279)

Windows 7 and Windows Server 2008 R2 Service Pack 1 (SP1) installation error:

0x800F0A12

If you receive error “0x800F0A12” when trying to install Service Pack 1 (SP1)
for Windows 7 or Windows Server 2008 R2, it means the installer canot access
the system partition of your computer’s hard disk to update files.

Usually, this partition is accessible to Windows (although you can’t browse it
in Windows Explorer). However, in some situations, access to the system
partition might be blocked after Windows has started. For example:

The system partition is not automatically mounted, or made accessible to
Windows, during startup.

A hard disk containing the system partition was removed prior to beginning
SP1 installation.

Windows is running on a storage area network (SAN), and access to the system
partition has been disabled.

A disk management tool from another software manufacturer was used to copy
(or clone) the disk or partition on which you’re trying to install SP1.
So the actual problem in this case was that the Windows boot partition /dev/sda1 was not marked Active for booting. I then booted from a GParted boot disk, changed the Active booting Partition from /dev/sda3 to /dev/sda1 for Windows, rebooted the PC into Windows 7 and then the Service Pack 1 installed normally. To get back to normal with openSUSE, I had to boot back on the GParted boot disk, set partition /dev/sda3 to Active for booting and rebooted the computer again. Now, the openSUSE grub menu was working again like normal.

Thank You,

Seeing that everyone is giving their story, so will I.
I didn’t even waste my time trying to install it without making changes, as grub is on my MBR and my extended partition marked as ‘boot’

So I grabbed the win7 dvd and did this:

Boot off the windows 7 installation DVD
Proceed to the screen “Windows 7 / Install Now” BUT DO NOT click to install
Select to “Repair your computer”
Select/put the radio button/dot next to “Use recovery tools that can help fix problems” –> Next
Select “command prompt”
enter this command: Bootrec.exe /FixBoot
enter this command: Bootrec.exe /FixMbr
enter this command: exit
Click to Restart

Ran the SP1 update and rebooted - Completed.

Reinstalled grub with Parted Magic, moving ‘boot’ off sda1, my extended was still marked so.
Done

Sorry for the convoluted explanation and English is not my native language :slight_smile:

Yes I did install it successfully. No MBR recovery required. I didn’t have to do anything before hand with opsenSUSE.

Best regards,
Greg

Noob question :
How do i dual boot OpenSuse 11.3 ( or the upcoming 11.4 ) with Windows 7 SP1 , if OpenSuse installed first ?

It’s possible but easier for noobs if they install windows first.
Here is a bit of a guide
Install openSUSE alongside Win7/Vista - A Guide