-
All replies
-
Helpful answers
-
Aug 24, 2014 6:29 AM in response to addrumby Loner T,On my machine with a 256GB SSD, I get an error trying to set it to value outside the available range. The i386 boot message can be safely ignored, but other messages should not. If this does not work, GPT fdisk may be necessary. Disk manufacturers play tricks with advanced formatting options which adjust page size (4k instead of 512) to allow larger than the 2TB disks to be managed, but that causes other alignment issues.
This can be run interactively. If you do not get an error when putting the size of your disk, then you need to use the print, write and confirm the write.
1. Type sudo fdisk -e /dev/disk0
2. Type '?' to see help and keywords.
3. Type 'edit 1' to edit the first and only MBR entry.
4. Accept the 'EE' default for Partition Id.
5. Accept default for CHS mode.
6. Type '1' for partition offset.
7. Type the actual value for partition size.
8. Type 'p'rint to view your entry.
9. Type 'w'rite to write it to disk.
10. Confirm the write command with a 'y'es.
The GPT and MBR are independent of each other. Reboot and try your BA steps again. If you get any other errors not covered here, please stop and post here.
Here is a sample session which has errors.
sudo fdisk -e /dev/disk0
fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory
Enter 'help' for information
fdisk: 1> ?
help Command help list
manual Show entire man page for fdisk
reinit Re-initialize loaded MBR (to defaults)
auto Auto-partition the disk with a partition style
setpid Set the identifier of a given table entry
disk Edit current drive stats
edit Edit given table entry
erase Erase current MBR
flag Flag given table entry as bootable
update Update machine code in loaded MBR
select Select extended partition table entry MBR
print Print loaded MBR partition table
write Write loaded MBR to disk
exit Exit edit of current MBR, without saving changes
quit Quit edit of current MBR, saving current changes
abort Abort program without saving current changes
fdisk: 1> edit 1
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: EE 1023 254 63 - 1023 254 63 [ 1 - 409639] <Unknown ID>
Partition id ('0' to disable) [0 - FF]: [EE] (? for help)
Do you wish to edit in CHS mode? [n]
Partition offset [0 - 500118192]: [63] 1
Partition size [1 - 500118191]: [500118191] 5860533168
'1565565872' is out of range.
Partition size [1 - 500118191]: [500118191]
-
Aug 24, 2014 6:50 AM in response to Loner Tby addrum,When you say the "actual value for partition size", does this mean what I want it to be? i.e 3TB / 3000000000kb ?
-
Aug 24, 2014 7:20 AM in response to addrumby Loner T,The fdisk utility uses 32-bit numbers (you may have a special version of fdisk on your machine to support a larger drive). The number 4294967294
that you currently have in your fdisk output is 2 ** 32. It may not let you set the value to a larger number. If you notice in my fdisk sample session when I tried to put the value 5860533168 it actually put the value 5860533168 - 4294967294 = 1565565872.
From your GPT output if you look at the following line, notice the number of blocks. The number of bytes in media size (3,000,592,982,016) is divided by sector size (512). You want to use the number 5,860,533,168 (which is the number of available sectors, not bytes).
gpt show: /dev/disk0: mediasize=3000592982016; sectorsize=512; blocks=5860533168
-
Aug 24, 2014 7:15 AM in response to Loner Tby addrum,Adams-iMac:~ Adam$ sudo gpt -vv -r show /dev/disk0
gpt show: /dev/disk0: mediasize=3000592982016; sectorsize=512; blocks=5860533168
gpt show: /dev/disk0: PMBR at sector 0
gpt show: /dev/disk0: Pri GPT at sector 1
gpt show: /dev/disk0: Sec GPT at sector 5860533167
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT table
34 6
40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
409640 5858853952 2 GPT part - 48465300-0000-11AA-AA11-00306543ECAC
5859263592 1269536 3 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
5860533128 7
5860533135 32 Sec GPT table
5860533167 1 Sec GPT header
So this is my output of the command you used in a previous post, I want to use the part in bold for step 7? Just want to make sure I get this right! Thanks for being patient
-
Aug 24, 2014 7:27 AM in response to addrumby Loner T,I put some additional details in my response earlier to provide a better explanation, but you are correct, the number you want to use is the number of blocks.
It is likely that when you used Bootcamp earlier, there was no MBR to begin with, so Bootcamp could put the correct values. BA should not be using the utilities like fdisk that Apple provides to us mere mortals. . It probably writes data directly to an MBR structure and even if the first entry is incorrect, it would be interesting to see what happens when you are actually able to install Bootcamp.
-
Aug 24, 2014 7:29 AM in response to Loner Tby addrum,Right. So I tried entering the number of blocks and comes up with the same error that you posted in your sample:
fdisk: 1> edit 1
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: EE 1023 254 63 - 1023 254 63 [ 1 - 4294967294] <Unknown ID>
Partition id ('0' to disable) [0 - FF]: [EE] (? for help)
Do you wish to edit in CHS mode? [n]
Partition offset [0 - 1565565872]: [63] 1
Partition size [1 - 1565565871]: [1565565871] 5860533168
'1565565872' is out of range.
-
Aug 24, 2014 7:43 AM in response to addrumby Loner T,1. Please download GPT fdisk from SourceForge.
2. Run sudo gdisk /dev/disk0
3. Use 'b'ackup option and save the current GPT. Copy this to an external location.
4. You now have two choices
a. Use gdisk (it may give you the same error).
b. Use gdisk/fdisk to initialize a new MBR with the entire disk.
The man page for fdisk (the 'i'nitialize flag) can be seen here - https://developer.apple.com/library/mac/documentation/Darwin/Reference/Manpages/ man8/fdisk.8.html
-
Aug 24, 2014 7:51 AM in response to Loner Tby addrum,Okay, I've backed up the current GPT. Which would be my best choice? Could you give steps for the preferred one? I'm way out of my depth here and don't want to balls anything up
-
Aug 24, 2014 8:28 AM in response to addrumby Loner T,Gdisk is probably easier.
1. sudo gdisk /dev/disk0
2. Type 'r' for Recovery and Transformations menu.
3. Type 'h' to create a new Hybrid MBR.
4. Allow it to put the EFI part into the Hybrid MBR (The 'good for GRUB' question).
5. Put partitions 2,3 in the Hybrid MBR.
6. Print it.
7. Write it.
8. Reboot and test.
Here is my sample session, with the help menu.
sudo gdisk /dev/disk0
Password:
GPT fdisk (gdisk) version 0.8.9
Warning: Devices opened with shared lock will not have their
partition table automatically reloaded!
Partition table scan:
MBR: hybrid
BSD: not present
APM: not present
GPT: present
Found valid GPT with hybrid MBR; using GPT.
Command (? for help): ?
b back up GPT data to a file
c change a partition's name
d delete a partition
i show detailed information on a partition
l list known partition types
n add a new partition
o create a new empty GUID partition table (GPT)
p print the partition table
q quit without saving changes
r recovery and transformation options (experts only)
s sort partitions
t change a partition's type code
v verify disk
w write table to disk and exit
x extra functionality (experts only)
? print this menu
Command (? for help): p
Disk /dev/disk0: 1954210120 sectors, 931.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 6ED0C429-00D1-4759-B50E-04B6FB80D0E3
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1954210086
Partitions will be aligned on 8-sector boundaries
Total free space is 1293 sectors (646.5 KiB)
Number Start (sector) End (sector) Size Code Name
1 40 409639 200.0 MiB EF00 EFI System Partition
2 409640 1452940543 692.6 GiB AF00 Customer
3 1452940544 1454210079 619.9 MiB AB00 Recovery HD
4 1454211072 1954209791 238.4 GiB 0700 BOOTCAMP
Command (? for help): r
Recovery/transformation command (? for help): ?
b use backup GPT header (rebuilding main)
c load backup partition table from disk (rebuilding main)
d use main GPT header (rebuilding backup)
e load main partition table from disk (rebuilding backup)
f load MBR and build fresh GPT from it
g convert GPT into MBR and exit
h make hybrid MBR
i show detailed information on a partition
l load partition data from a backup file
m return to main menu
o print protective MBR data
p print the partition table
q quit without saving changes
t transform BSD disklabel partition
v verify disk
w write table to disk and exit
x extra functionality (experts only)
? print this menu
Recovery/transformation command (? for help): x
Expert command (? for help): ?
a set attributes
c change partition GUID
d display the sector alignment value
e relocate backup data structures to the end of the disk
g change disk GUID
h recompute CHS values in protective/hybrid MBR
i show detailed information on a partition
l set the sector alignment value
m return to main menu
n create a new protective MBR
o print protective MBR data
p print the partition table
q quit without saving changes
r recovery and transformation options (experts only)
s resize partition table
t transpose two partition table entries
u replicate partition table on new device
v verify disk
w write table to disk and exit
z zap (destroy) GPT data structures and exit
? print this menu
Expert command (? for help): o
Disk size is 1954210120 sectors (931.8 GiB)
MBR disk identifier: 0x6152249D
MBR partitions:
Number Boot Start Sector End Sector Status Code
1 1 409639 primary 0xEE
2 409640 1452940543 primary 0xAF
3 1452940544 1454210079 primary 0xAB
4 * 1454211072 1954209791 primary 0x07
-
Aug 24, 2014 9:21 AM in response to addrumby Loner T,Please see iMac 13,2 Late 2012 3TB Boot Camp Windows 7 Install - SOLVED! (unsupported)
This is one method, but you can see it is unsupported. If Windows partition is forced with the first 2.2TB, the MBR stuff works, but Software Upgrades can cause problems. Would you have the output from the fdisk and gpt commands when you had it working? (Highly unlikely, but worth the question ).
-
Aug 24, 2014 10:50 AM in response to Loner Tby addrum,Unfortunately I don't sorry. I'm a little confused from all these commands. Would it be easier if I created a partition for Windows myself and installed manually using a USB? I'm comfortable with doing that as I've done it with Ubuntu etc on other systems, just not one with OS X.
-
Aug 24, 2014 11:10 AM in response to addrumby Loner T,There are two ways to install Windows on a Mac.
1. Using Bootcamp and a Hybrid MBR, this is the traditional method. This what the Bootcamp Assistant uses and this simulates BIOS using a compatibility layer called CSM-BIOS. The use of a MBR with 2.2 Tb limits this method and the problems you are running into are related to this method and a 3TB drive.
2. Using Bootcamp drivers only, but partitioning using Disk Utility and using a GPT (Guid Partition) and using EFI. This method has issues with drivers and graphics/audio on older Macs but allows a bit more flexibility. Windows 7 does not fully support this, but Windows 8+ has better support.
You have two parameters in your decision - the Mac year/model and the version of Windows. If you are inclined to use option 2, which is what Ubuntu (or many Linux variants) would use on a Mac as well.
For Option 2.
1. Create Free Space using Disk Utility of how large you want Windows partition to be. You will lose about 200MB to a partition called MSR (Microsoft System Reserved).
2. Plug in the USB stick with Windows ISO and Bootcamp drivers.
3. Restart your Mac and hold the Alt key. From the selection, there should be one called 'EFI Boot' and should be from the USB. Select it.
4. If you have keyboard/mouse/graphics issues, use wired mouse/keyboard. If there is a black screen, post back here.
It would be good to know what GPU you have, just to avoid screen issues.
Assuming this "iMac (27-inch, Late 2013), OS X Mavericks (10.9.2)" you can use Option 2. I have Windows 8.1 EFI booted on a Late 2013 15" rMBP.
-
Aug 24, 2014 11:52 AM in response to addrumby Loner T,This is the rMBP on which I have an EFI installation. Partitions 4 and 5 are Windows 8.1 MSR and NTFS file systems respectively. If you also notice, the MBR is the entire disk (512Gb).
gpt show: /dev/disk0: mediasize=500277790720; sectorsize=512; blocks=977105060
gpt show: /dev/disk0: PMBR at sector 0
gpt show: /dev/disk0: Pri GPT at sector 1
gpt show: /dev/disk0: Sec GPT at sector 977105059
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT table
34 6
40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
409640 487712920 2 GPT part - 48465300-0000-11AA-AA11-00306543ECAC
488122560 1269536 3 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
489392096 32
489392128 262144 4 GPT part - E3C9E316-0B5C-4DB8-817D-F92DF00215AE
489654272 487450624 5 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
977104896 131
977105027 32 Sec GPT table
977105059 1 Sec GPT header
Disk: /dev/disk0 geometry: 60821/255/63 [977105060 sectors]
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: EE 1023 254 63 - 1023 254 63 [ 1 - 977105059] <Unknown ID>
2: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
3: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused

