Windows 7 KB3033929

From richud.com
Jump to navigation Jump to search

This update won't install if Windows isn't directly booted, i.e. it needs to have Windows as active partition and a Windows MBR.

Fix , Windows 7 and openSUSE 11/12/13

Just for my info to a particular setup thats odd as openSUSE gets stuck in an extended partition, no need for chrooting to fix grub afterwards.

Mount Windows 7 ISO (x32 or x64) and extract boot.wim

Extract these from boot.wim (thanks for a post by SiliconChaos) and stick them on a USB stick windows can read.

\windows\system32\Bootrec.exe
\windows\system32\wer.dll
\windows\system32\en-US\Bootrec.exe.mui
\windows\system32\en-US\wer.dll.mui
  • boot openSUSE, note active partition with fdisk, 'sudo fdisk -l /dev/sda' - (sda4), the extended partition (ID 'f' aka W95 Ext'd)
  • set active partition with fdisk to windows boot partition (sda1), don't forget to write changes!
  • reboot - should boot directly into windows 7 (note update wont work yet)
  • Run 'Bootrec.exe /FixMbr' from files extracted earlier, it should say successful. (dont run bootrec.exe /fixboot as it will fail, hence setting active part above manually)

(This changes the first stage boot loader (MBR) code to Windows's.)

  • Do Windows updates which should now work and install KB3033929, then reboot.
  • boot any live linux distro, set original partition back active (sda4)
  • reboot, it should be back to grub (booting the boot loader) from extended partition.

Note, this only works because openSUSE installs the actual boot loader (VBR) on the extended partition rather than with the MBR (i.e. its on /dev/sda4 not /dev/sda) so it is happy still using the Windows MBR.(Normally you would need to put grub back)

Examples

Windows MBR and partition table

As used in above

$ sudo hexdump -n 512 -C /dev/sda
00000000  33 c0 8e d0 bc 00 7c 8e  c0 8e d8 be 00 7c bf 00  |3.....|......|..|
00000010  06 b9 00 02 fc f3 a4 50  68 1c 06 cb fb b9 04 00  |.......Ph.......|
00000020  bd be 07 80 7e 00 00 7c  0b 0f 85 0e 01 83 c5 10  |....~..|........|
00000030  e2 f1 cd 18 88 56 00 55  c6 46 11 05 c6 46 10 00  |.....V.U.F...F..|
00000040  b4 41 bb aa 55 cd 13 5d  72 0f 81 fb 55 aa 75 09  |.A..U..]r...U.u.|
00000050  f7 c1 01 00 74 03 fe 46  10 66 60 80 7e 10 00 74  |....t..F.f`.~..t|
00000060  26 66 68 00 00 00 00 66  ff 76 08 68 00 00 68 00  |&fh....f.v.h..h.|
00000070  7c 68 01 00 68 10 00 b4  42 8a 56 00 8b f4 cd 13  ||h..h...B.V.....|
00000080  9f 83 c4 10 9e eb 14 b8  01 02 bb 00 7c 8a 56 00  |............|.V.|
00000090  8a 76 01 8a 4e 02 8a 6e  03 cd 13 66 61 73 1c fe  |.v..N..n...fas..|
000000a0  4e 11 75 0c 80 7e 00 80  0f 84 8a 00 b2 80 eb 84  |N.u..~..........|
000000b0  55 32 e4 8a 56 00 cd 13  5d eb 9e 81 3e fe 7d 55  |U2..V...]...>.}U|
000000c0  aa 75 6e ff 76 00 e8 8d  00 75 17 fa b0 d1 e6 64  |.un.v....u.....d|
000000d0  e8 83 00 b0 df e6 60 e8  7c 00 b0 ff e6 64 e8 75  |......`.|....d.u|
000000e0  00 fb b8 00 bb cd 1a 66  23 c0 75 3b 66 81 fb 54  |.......f#.u;f..T|
000000f0  43 50 41 75 32 81 f9 02  01 72 2c 66 68 07 bb 00  |CPAu2....r,fh...|
00000100  00 66 68 00 02 00 00 66  68 08 00 00 00 66 53 66  |.fh....fh....fSf|
00000110  53 66 55 66 68 00 00 00  00 66 68 00 7c 00 00 66  |SfUfh....fh.|..f|
00000120  61 68 00 00 07 cd 1a 5a  32 f6 ea 00 7c 00 00 cd  |ah.....Z2...|...|
00000130  18 a0 b7 07 eb 08 a0 b6  07 eb 03 a0 b5 07 32 e4  |..............2.|
00000140  05 00 07 8b f0 ac 3c 00  74 09 bb 07 00 b4 0e cd  |......<.t.......|
00000150  10 eb f2 f4 eb fd 2b c9  e4 64 eb 00 24 02 e0 f8  |......+..d..$...|
00000160  24 02 c3 49 6e 76 61 6c  69 64 20 70 61 72 74 69  |$..Invalid parti|
00000170  74 69 6f 6e 20 74 61 62  6c 65 00 45 72 72 6f 72  |tion table.Error|
00000180  20 6c 6f 61 64 69 6e 67  20 6f 70 65 72 61 74 69  | loading operati|
00000190  6e 67 20 73 79 73 74 65  6d 00 4d 69 73 73 69 6e  |ng system.Missin|
000001a0  67 20 6f 70 65 72 61 74  69 6e 67 20 73 79 73 74  |g operating syst|
000001b0  65 6d 00 00 00 63 7b 9a  73 d4 69 7f 00 00 00 20  |em...c{.s.i.... |
000001c0  21 00 07 fe ff ff 00 08  00 00 00 00 80 0c 00 fe  |!...............|
000001d0  ff ff 1b fe ff ff 00 08  80 0c 00 00 e0 01 00 fe  |................|
000001e0  ff ff ef fe ff ff 00 68  42 25 00 80 00 00 80 fe  |.......hB%......|
000001f0  ff ff 0f fe ff ff 00 08  60 0e 00 60 e2 16 55 aa  |........`..`..U.|
00000200

$ sudo fdisk -l /dev/sda
Disk /dev/sda: 298.1 GiB, 320072933376 bytes, 625142448 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x7f69d473

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1            2048 209717247 209715200   100G  7 HPFS/NTFS/exFAT
/dev/sda2       209717248 241174527  31457280    15G 1b Hidden W95 FAT32
/dev/sda3       625108992 625141759     32768    16M ef EFI (FAT-12/16/32)
/dev/sda4  *    241174528 625108991 383934464 183.1G  f W95 Ext'd (LBA)
/dev/sda5       241176576 283129855  41953280    20G  c W95 FAT32 (LBA)
/dev/sda6       283131904 284157951   1026048   501M 83 Linux
/dev/sda7       284160000 288350207   4190208     2G 82 Linux swap / Solaris
/dev/sda8       288352256 414187519 125835264    60G 83 Linux
/dev/sda9       414189568 625088511 210898944 100.6G 83 Linux

Partition table entries are not in disk order.

Grub MBR and partition table

$ sudo hexdump -C -n512 /dev/sda
00000000  eb 63 90 d0 bc 00 7c 8e  c0 8e d8 be 00 7c bf 00  |.c....|......|..|
00000010  06 b9 00 02 fc f3 a4 50  68 1c 06 cb fb b9 04 00  |.......Ph.......|
00000020  bd be 07 80 7e 00 00 7c  0b 0f 85 0e 01 83 c5 10  |....~..|........|
00000030  e2 f1 cd 18 88 56 00 55  c6 46 11 05 c6 46 03 02  |.....V.U.F...F..|
00000040  ff 00 00 20 01 00 00 00  00 02 fa 90 90 f6 c2 80  |... ............|
00000050  75 02 b2 80 ea 59 7c 00  00 31 00 80 01 00 00 00  |u....Y|..1......|
00000060  00 00 00 00 ff fa 90 90  f6 c2 80 74 05 f6 c2 70  |...........t...p|
00000070  74 02 b2 80 ea 79 7c 00  00 31 c0 8e d8 8e d0 bc  |t....y|..1......|
00000080  00 20 fb a0 64 7c 3c ff  74 02 88 c2 52 be 80 7d  |. ..d|<.t...R..}|
00000090  e8 17 01 be 05 7c b4 41  bb aa 55 cd 13 5a 52 72  |.....|.A..U..ZRr|
000000a0  3d 81 fb 55 aa 75 37 83  e1 01 74 32 31 c0 89 44  |=..U.u7...t21..D|
000000b0  04 40 88 44 ff 89 44 02  c7 04 10 00 66 8b 1e 5c  |.@.D..D.....f..\|
000000c0  7c 66 89 5c 08 66 8b 1e  60 7c 66 89 5c 0c c7 44  ||f.\.f..`|f.\..D|
000000d0  06 00 70 b4 42 cd 13 72  05 bb 00 70 eb 76 b4 08  |..p.B..r...p.v..|
000000e0  cd 13 73 0d f6 c2 80 0f  84 d8 00 be 8b 7d e9 82  |..s..........}..|
000000f0  00 66 0f b6 c6 88 64 ff  40 66 89 44 04 0f b6 d1  |.f....d.@f.D....|
00000100  c1 e2 02 88 e8 88 f4 40  89 44 08 0f b6 c2 c0 e8  |.......@.D......|
00000110  02 66 89 04 66 a1 60 7c  66 09 c0 75 4e 66 a1 5c  |.f..f.`|f..uNf.\|
00000120  7c 66 31 d2 66 f7 34 88  d1 31 d2 66 f7 74 04 3b  ||f1.f.4..1.f.t.;|
00000130  44 08 7d 37 fe c1 88 c5  30 c0 c1 e8 02 08 c1 88  |D.}7....0.......|
00000140  d0 5a 88 c6 bb 00 70 8e  c3 31 db b8 01 02 cd 13  |.Z....p..1......|
00000150  72 1e 8c c3 60 1e b9 00  01 8e db 31 f6 bf 00 80  |r...`......1....|
00000160  8e c6 fc f3 a5 1f 61 ff  26 5a 7c be 86 7d eb 03  |......a.&Z|..}..|
00000170  be 95 7d e8 34 00 be 9a  7d e8 2e 00 cd 18 eb fe  |..}.4...}.......|
00000180  47 52 55 42 20 00 47 65  6f 6d 00 48 61 72 64 20  |GRUB .Geom.Hard |
00000190  44 69 73 6b 00 52 65 61  64 00 20 45 72 72 6f 72  |Disk.Read. Error|
000001a0  0d 0a 00 bb 01 00 b4 0e  cd 10 ac 3c 00 75 f4 c3  |...........<.u..|
000001b0  00 00 00 00 00 00 00 00  f7 d8 ae cf 00 00 00 20  |............... |
000001c0  21 00 07 5e 38 26 00 08  00 00 00 60 09 00 00 5e  |!..^8&.....`...^|
000001d0  39 26 07 fe ff ff 00 68  09 00 3c f0 bf 12 00 fe  |9&.....h..<.....|
000001e0  ff ff 07 fe ff ff 00 c8  74 37 00 80 83 02 80 fe  |........t7......|
000001f0  ff ff 0f fe ff ff 00 60  c9 12 00 68 ab 24 55 aa  |.......`...h.$U.|
00000200
$ sudo fdisk -l /dev/sda
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xcfaed8f7

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1            2048    616447    614400   300M  7 HPFS/NTFS/exFAT
/dev/sda2          616448 315185211 314568764   150G  7 HPFS/NTFS/exFAT
/dev/sda3       930400256 972572671  42172416  20.1G  7 HPFS/NTFS/exFAT
/dev/sda4  *    315187200 930400255 615213056 293.4G  f W95 Ext'd (LBA)
/dev/sda5       315189248 319371263   4182016     2G  c W95 FAT32 (LBA)
/dev/sda6       319373312 320399359   1026048   501M 83 Linux
/dev/sda7       320401408 353959935  33558528    16G 82 Linux swap / Solaris
/dev/sda8       353961984 542707711 188745728    90G 83 Linux
/dev/sda9       542709760 930371583 387661824 184.9G 83 Linux

Partition table entries are not in disk order.


Comments

blog comments powered by Disqus