1 12 13 14 15 16 Previous Next 1,374 Replies Latest reply: Jul 10, 2014 1:49 PM by NikkuShouri Go to original post
  • 195. Re: Repairing Boot Camp after creating new partition
    Christopher Murphy Level 3 Level 3 (525 points)

    Looks like you'll need to go through the Windows Startup Repair process. There is an automated version available when you boot of the Window install DVD. And there's also the manual process which might be faster, or fix things the automatic one won't. Usually I suggest fixmbr, fixboot, rebuildbcd in that order.

  • 196. Re: Repairing Boot Camp after creating new partition
    Christopher Murphy Level 3 Level 3 (525 points)

    Fortunately gdisk runs on Windows also, so I'd go grab a copy. Go to the recovery/transformation menu 'r' and then print out the MBR and GPT to the screen with 'o' and 'p' and post them.

  • 197. Re: Repairing Boot Camp after creating new partition
    Mobzy3000 Level 1 Level 1 (5 points)

    Hey Chris,

     

    It doesn't recognize the keyboard when I try and press a key on the macbook air?

  • 198. Re: Repairing Boot Camp after creating new partition
    Christopher Murphy Level 3 Level 3 (525 points)

    This is a completely different issue, so you probably need to find a different thread or start a new one. I only have vague suggestions in this area, since I don't know what's actually the cause of this problem.

     

    One possible cause is that the disk has a hybrid MBR, which it doesn't need. It should be MBR only if you only intend to boot Windows from it. And this 2nd disk of yours may contain a latent GPT. You can use Windows 'diskpart clean' to remove the GPT from the 2nd disk, or you can use gdisk from OS X to do the same. If you use gdisk, you go to the expert menu > zap and have it remove the GPT and the MBR. Then you're starting totally from scratch on that disk. Do make sure you're pointed to the correct disk.

     

    The other thing I've read people doing, is creating a small (maybe 100MB?) partition on their primary disk, the SSD, for Windows to install boot files onto, with the rest of Windows on the HDD. So basically Windows is booting briefly off the main drive, then jumps to the other drive.

  • 199. Re: Repairing Boot Camp after creating new partition
    Christopher Murphy Level 3 Level 3 (525 points)

    I have no idea what you're referring to. The "press any key" message? Yeah you're going to have to force a shutdown, and reboot off the Windows install DVD to get to the repair options.

  • 200. Re: Repairing Boot Camp after creating new partition
    Mobzy3000 Level 1 Level 1 (5 points)

    Ah ok, yes sorry. I misread and thought that you where able to do the manual process without the windows CD.

     

    I'll give it a go now, thanks.

  • 201. Re: Repairing Boot Camp after creating new partition
    Mobzy3000 Level 1 Level 1 (5 points)

    Hey Chris,

     

    Im at the System Recovery Options menu and it is asking me to select an OS. There isn't an OS there for me to select and then it says that if this occurs, I shoud Load Drivers and install drivers for your hard disk. Would I have to install the Bootcamp drivers again?

  • 202. Re: Repairing Boot Camp after creating new partition
    Esteves91 Level 1 Level 1 (0 points)

    Thanks for the quick response .I'll open a new thread about this. Regarding your statment about the MBR, I am trying to boot from the HDD installed in the optical bay because my SSD is only 64GB im not sure all the windows OS files will be able to fit. Im assuming this is different then when you said to only put boot files of ~100MB. Do you happen to have any guide on moving these boot files. I'm not sure which ones to choose that my only concern. If i do move the boot files this then i believe i will need to try your step of removing the GPT and MBR (correct me if im wrong please).

     

    regardless thanks for all your help.

  • 203. Re: Repairing Boot Camp after creating new partition
    Christopher Murphy Level 3 Level 3 (525 points)

    It's something the Windows installer does, not something you do. The terminology Microsoft has chosen is a little confusing, but they explains this here. I can't tell you how to do it because I haven't done it. I know that if you give the installer a bare disk without anything else on it, it automatically produces a two partition installation as its preferred method. But with Boot Camp it always does just one. I recall this coming up in Mac Rumors forums in the context of getting newish Macs to boot Windows from Thunderbolt drives. Apparently there's something, possibly firmware related, that prevents some Macs from booting Windows off a 2nd or external disk, and one solution for this someone had found was putting a small FAT32 partition on their primary disk. I don't know if the Windows installer automatically finds this small partition on a completely different drive? Or if you have to point it to two drives, or what. Just make sure you have backups.

     

    Basically this trick does make sense though because of how bootloading works. It's easier for firmware to start bootloaders from the primary disk, once the bootloaders take over they can do pretty much whatever they want including jumping the rest of the boot process to a completely different drive.

     

    As for removing the GPT/MBR, that might not be necessary but it's probably best practices to make sure the 2nd disk (the HDD) is clean and not causing any confusion. Obviously computers are as easily confused as humans.

  • 204. Re: Repairing Boot Camp after creating new partition
    Esteves91 Level 1 Level 1 (0 points)

    thanks for the info. One last thing someone in the dicussions repsonsed to my thread and said that windows can only be installed on the primary drive disk in order to boot. Is this true? ive never heard anything like this.

  • 205. Re: Repairing Boot Camp after creating new partition
    Christopher Murphy Level 3 Level 3 (525 points)

    It's an unqualified statement is the short answer.

     

    The long answer is esoteric. Windows, OS X, Linux, can run off a network so long as it has the proper drivers, so this is not really a Windows question. This is a firmware question, and Macs don't have a configurable BIOS like most PC's so that introduces limitations. Mac firmware is EFI, but then there's a CSM which is a software BIOS. It's also not configurable. And for now, Apple only supports Windows with this CSM-BIOS mode, ergo Windows isn't booting via (U)EFI. And that's a big part of the problems people have, including the partitioning problems. Ideally we'd be able to boot Windows in UEFI mode, and then both Windows and OS X would use only GPT for partition scheme.

     

    So what this someone is referring to indirectly is that maybe Windows can only be installed on the primary drive on particular Macs, depending on the idiosyncracies of their firmware version. My recollection from the Boot Camp installation guide is Apple does say to remove all drives except the target drive for Windows, in a multi-disk boot setup. After installation, then you can reconnect all drives. But they say this for desktop computers. They don't expressly say you can do this with laptops. It should be possible in a laptop, but Windows on a 2nd drive may be an unsupported configuration as far as they're concerned for all I know. But that doesn't mean it can't be done.

     

    Working around firmware limitations is the hallmark of bootloaders, and why that whole process is complicated. The bootloader stage, the computer is very, very dumb. It doesn't have a GUI yet, it doesn't have decent error messages, and early on it doesn't even know what a file system is. So each stage of bootloading is about teaching it new things, one of which is how to locate boot files on another drive.

     

    But like on one of my older Macbook Pros, while I can (U)EFI boot OS X and Linux from a USB stick, the USB bus is simply not available with the CSM-BIOS mode. So I can't boot anything, including Windows, from USB. Not a Windows limitation, that's a firmware limitation.

     

    Anyway, I highly recommend a virtual machine for this. You will have no partition questions, no volume resizing issues, you get snapshots for the VM environment, you get sharing of files between Mac and Windows, backups are easier, restore is vastly easier. All the way around a VM is better. Except for games. And I'm not highly sympathetic to people who go through all this trouble just to play games. :-\ If you don't really need native booting of Windows, I'd use a VM, not Boot Camp.

  • 206. Re: Repairing Boot Camp after creating new partition
    JasonC2 Level 1 Level 1 (0 points)

    Hi all; I'm having a similar problem, and I seem to be making mistake after mistake trying to fix it. Just found this thread. So, here's where I'm at now:

     

    I currently have a (now screwed up) drive from a Mac Mini with bootcamp + Windows 7. The Mac side boots fine, the Windows side says "no bootable device found". The Windows partition does not show in the startup manager. It does show in Disk Utility. It also shows as a selection in startup disks (and the Mac still tries to boot to it by default). Here is the output of various commands:

     

    gpt (from OSX):

     

    $ sudo gpt -r -vv show /dev/disk0

    gpt show: /dev/disk0: mediasize=500107862016; sectorsize=512; blocks=976773168

    gpt show: /dev/disk0: Suspicious MBR at sector 0

    gpt show: /dev/disk0: Pri GPT at sector 1

    gpt show: /dev/disk0: Sec GPT at sector 976773167

          start       size  index  contents

              0          1         MBR

              1          1         Pri GPT header

              2         32         Pri GPT table

             34     409606

         409640   80078128      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC

       80487768    1269536      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC

       81757304        904

       81758208   59845802      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

      141604010  835169125

      976773135         32         Sec GPT table

      976773167          1         Sec GPT header

     

    fdisk (from OSX):

     

    $ sudo fdisk /dev/disk0

    Disk: /dev/disk0     geometry: 60801/255/63 [976773168 sectors]

    Signature: 0xAA55

             Starting       Ending

    #: id  cyl  hd sec -  cyl  hd sec [ start -       size]

    ------------------------------------------------------------------------

    1: EE    0   0   2 -   25 127  14 [ 1 -     409639] <Unknown ID>

    *2: AF   25 127  15 - 1023 254  63 [ 409640 -   80078128] HFS+

    *3: AB 1023 254  63 - 1023 254  63 [ 80487768 -    1269536] Darwin Boot

    *4: 07 1023 254  63 - 1023 254  63 [ 81758208 -   59845802] HPFS/QNX/AUX

     

    fdisk (from a Linux machine):

     

    $ sudo fdisk /dev/sdb

     

    WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.

     

    Command (m for help): p

     

    Disk /dev/sdb: 500.1 GB, 500107862016 bytes

    255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors

    Units = sectors of 1 * 512 = 512 bytes

    Sector size (logical/physical): 512 bytes / 512 bytes

    I/O size (minimum/optimal): 512 bytes / 512 bytes

    Disk identifier: 0x00000000

     

       Device Boot      Start         End      Blocks   Id  System

    /dev/sdb1               1      409639      204819+  ee  GPT

    /dev/sdb2   *      409640    80487767    40039064   af  HFS / HFS+

    /dev/sdb3   *    80487768    81757303      634768   ab  Darwin boot

    /dev/sdb4   *    81758208   141604009    29922901    7  HPFS/NTFS/exFAT

     

    gdisk (from a Linux machine):

     

    jason@ubuntu:~$ sudo gdisk /dev/sdb

    GPT fdisk (gdisk) version 0.6.14

     

    Partition table scan:

      MBR: hybrid

      BSD: not present

      APM: not present

      GPT: present

     

    Found valid GPT with hybrid MBR; using GPT.

     

    Command (? for help): p

    Disk /dev/sdb: 976773168 sectors, 465.8 GiB

    Logical sector size: 512 bytes

    Disk identifier (GUID): 584883BF-EEBA-402D-AC7B-658C2B1EE5F2

    Partition table holds up to 128 entries

    First usable sector is 34, last usable sector is 976773134

    Partitions will be aligned on 8-sector boundaries

    Total free space is 835579635 sectors (398.4 GiB)

     

    Number  Start (sector)    End (sector)  Size       Code  Name

       2          409640        80487767   38.2 GiB    AF00  Apple HFS/HFS+

       3        80487768        81757303   619.9 MiB   AB00  Apple boot

       4        81758208       141604009   28.5 GiB    0700  BOOTCAMP

     

    Command (? for help): i

    Partition number (2-4): 4

    Partition GUID code: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (Linux/Windows data)

    Partition unique GUID: 8AE632B6-2832-4368-B127-3D2C15F8BC16

    First sector: 81758208 (at 39.0 GiB)

    Last sector: 141604009 (at 67.5 GiB)

    Partition size: 59845802 sectors (28.5 GiB)

    Attribute flags: 0000000000000000

    Partition name: BOOTCAMP

     

    Partition 4 is the Windows partition. I renamed it to BOOTCAMP at some point while trying to fix it today. I've also been futzing with the type ID of that partition. I do not know what the correct settings should be.

     

    How I got here was sort of complicated but here's generally what happened:

     

    1. I had a working OSX + Bootcamp + Windows 7 setup.

    2. Using Easeus partition manager from a different Windows machine, I shrunk the size of the Windows partition down to 28.5GB. However, when applying the changes, a vague error occurred along the lines of "An error occurred while writing partition chains."

    3. When attempting to boot the Mac again, the Windows side worked fine, but the OSX partition didn't show up in the Mac's startup manager.

     

    At this point I didn't really know 100% what I was doing and probably should not have proceeded.

     

    4. Gdisk (GPT) showed the previous Mac partitions as unallocated space (as did Easeus). Fdisk showed the correct partition info. I used gdisk to rebuild the GPT from the MBR. At this point I was able to boot OSX again but now the Windows partition didn't show up in the startup manager. The machine was about in the same state it is currently in.

    5. At this point, fdisk (MBR) no longer showed any partitions except the first EE one. I tried rebuilding a hybrid MBR with gdisk; which caused fdisk to display all the partitions from the MBR, but did not change the system's behavior.

    6. I also tried messing around with the type IDs, changing the MBR id for the 4th partition to 07 (it was EF), and changing the GPT id for the 4th partition to 0700, various combinations of this, but with no effect.

     

    I feel like I'm very close to getting this right, but I just don't quite know how to fix it and I'm afraid that if I keep bumbling around I'll make the problem even worse.

     

    This all started when I attempted to shrink the bootcamp partition so I could clone the drive to a smaller disk, which should have been simple. But whatever I did has now cost me the entire day 9:30AM - 2PM and I haven't even started the drive clone copying yet. :-(

     

    Does anybody have any advice how to proceed? I do not have an OSX CD. I do have a Windows CD and a bunch of spare USB sticks, although I don't have a CD-ROM drive handy for the Mac Mini.

     

    Thanks a lot,

    J

  • 207. Re: Repairing Boot Camp after creating new partition
    Christopher Murphy Level 3 Level 3 (525 points)

    1. Make sure you're using gdisk 0.8.5, the linux version 0.6.14 is kinda old. You can use a Fedora 17 LiveCD which includes gdisk 0.8.4 or 0.8.5.

     

    2. The drive is missing GPT partition 1, which should be the EFI System partition, type code is EF00. The normal start and end sector values, if you originally partitioned this disk with the OS X Disk Utility: 40s and 409639s. Based on the free space after the GPT table, this is a safe assumption. So you should use gdisk to create a new partition, doesn't matter what partition number, 40s start and 409639s end, type code EF00.  This partition is required but the (U)EFI spec, and when booting in EFI mode from a GPT disk, it's possible the Mac firmware insists on finding an EFI System partition, and fails if it doesn't.

     

    3. You have 398GiB free space at the end of the disk. If you intend to use it, you should add another partition. Type codes 0700 for NTFS, AF00 for JHFS+/X, 8300 for Linux or 8e00 for Linux LVM.

     

    4. The type codes on the other partitions are correct.

     

    5. After this, go the gdisk main menu, and use the 's' command to resort the partition tables in order. Then remake the hybrid MBR: add partitions 4 5 to the MBR; EFI GPT first = yes; make 4 bootable; do not make 5 bootable. No other partitions to protect. Write it out.

     

    6. Windows partition managers, when booted in BIOS mode, tend to only look for and modify an MBR. They aren't generally able to deal with hybrid MBRs, and in any case there is no such thing as a standard hybrid MBR, and therefore they can be interpreted differently. So using any partitioning tool that is not EXPLICITLY capable of dealing with hybrid MBR (i.e. both MBR and GPT at the same time, a rare thing indeed) is begging for data loss, especially combined with volume resizing. It's why I keep harping on people to just use VMs. They're way way safer.

  • 208. Re: Repairing Boot Camp after creating new partition
    JasonC2 Level 1 Level 1 (0 points)

    Thank you so much. Recreating the EFI partition and rebuilding the MBR allowed me to boot into Windows again.

     

    After doing that Windows failed booting with error 0xC000000E (complaining that system configuration changed). I could have fixed this with the recovery CD but I do not have a CD-ROM drive handy, the drive was readable so I was able to fix it with bcdboot by attaching the drive to an existing Windows machine and doing bcdboot F:\Windows /s F: /v where "F:" was the Windows partition on the Mac Mini drive.

     

    Once I did that, the system booted, although had two "Windows" entries in the Windows boot menu. I cleaned this up by removing the broken unused entry with bcdedit.

     

    And now, it's all working great again. I am exactly where I was 8 hours ago, but at least I learned something.

     

    Once again, thank you for your help, it is greatly appreciated.

     

    I have one final question. I now need to resize, nondestructively, both an HFS and NTFS partition. I'm not going to attempt it with Easeus again. I also need to clone the drive afterwards - although I can at least do a sector-by-sector clone with Easeus which may work for that. Can you recommend a reliable tool that can do this? I have gparted, which I have not looked at closely yet, and also I've seen mention of iPartition, which I will buy if I know it will work. I'm not that familiar with software available for the Mac or with reliable disk editing tools.

     

    Thanks!

    Jason

  • 209. Re: Repairing Boot Camp after creating new partition
    Christopher Murphy Level 3 Level 3 (525 points)

    Is OS X booting also? Or is that still messed up?

     

    Honestly I'm not a fan of proprietary software when open source software is available, and exactly how it behaves is well understood and documented. So I use dd. You can do this from a Linux live cd, or you can use the dd in OS X *however* to do a sector copy you have to make sure the source disk does not have any mounted file systems. If they're mounted rw, they're changing, and by the time you've copied all sectors, the resulting copy has become completely inconsistent and likely not usable. Anyway something like:

     

    dd if=/dev/sda of=/folder1/folder2/seagate900G_sector.img bs=256K

     

    will do it. Use 256k and rdiskX on OS X, you'll get better performance using the raw device. You can also make separate images of the partitions instead of the whole disk. Use /dev/sdaX on linux, or /dev/rdiskXsY on OS X where X is the device and Y is the partition. You can get those values from 'diskutil list'.

     

    I'm not going to write out a tutorial on disk resizing here. It would take way too much time. It's way too perilous to describe how to do this without losing data on hybrid MBR disks with 5+ partitions. You are better off with a commercial application like iPartition, Winclone, or CampTune to do this. I haven't used any of them, so I can't give feedback on those products.

1 12 13 14 15 16 Previous Next