Jump to content

Fixes for HFS+ partiton error


  • Please log in to reply
36 replies to this topic

#1
Dr. Hurt

Dr. Hurt

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 1,485 posts
  • Gender:Male
  • Location:Cairo, Egypt and NYC, USA
  • Interests:Wandering around on the internet!! Politics, Sci/Tech, Medicine.
EDIT:

I have been using os x for 1 year now and yesterday I broke my install but every-time I reinstall I get an HFS+ partition error. I have finally fixed it and thought I share my success.

Well, first you must know that this error occurs either because of a bad master boot record (MBR) or the partition id is not af.

To fix this, do the following:
1. Make sure that your partition id is af. You can check this by using spfdisk or diskpart.

If you partition id is af, then carry on to the rest of the steps.
2. Boot into your installation DVD (any version)
3. Open terminal from the utilities menu and type the following
fdisk -u /dev/rdisk0
NB. If OS X is on your second HD then use rdisk1 instead of rdisk0

An alternative way is to get make an MS-DOS start-up diskette and put fdisk on it, and boot from it.
In DOS, type
fdisk /MBR

I hope this helps the people who are having this problem. ;)

Edited by Joe Cargo, 10 February 2008 - 12:26 PM.


#2
cyclonefr

cyclonefr

    InsanelyMacaholic

  • Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 2,751 posts
  • Gender:Male
  • Location:Paris, France
does it rewrites a new darwin bootloader? with multiboot?

#3
BugsB

BugsB

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,513 posts
  • Gender:Male
  • Location:Kauai, Hawai'i
which command is needed when the OS X partition is not on the first harddrive?

#4
Dr. Hurt

Dr. Hurt

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 1,485 posts
  • Gender:Male
  • Location:Cairo, Egypt and NYC, USA
  • Interests:Wandering around on the internet!! Politics, Sci/Tech, Medicine.
Sorry for taking long to answer but I was at school.
This writes a new boot record with darwin boot loader.
If the HD is not the first one, I'm not really sure what it should be. I think it should be the same but with a 1 or 2 instead of the 0. You can use diskpart in windows to check your HD no.

In windows do the followng Run>diskpart>list disk

#5
Rammjet

Rammjet

    InsanelyMac V.I.P.

  • Gurus
  • 5,302 posts
  • Gender:Male

1) Make sure you partition id is "af" and that it is active and primary (not extended)
2) prepare your OS X installation DVD

All well and good if you haven't yet installed OSX, but if you have installed OSX and have the HFS+ Partition Error, go straight to the "fdisk" command.

does it rewrites a new darwin bootloader? with multiboot?

from the "man fdisk" page for the "-u" parameter: Update MBR code, preserving existing partition table.

which command is needed when the OS X partition is not on the first harddrive?

fdisk -u /dev/rdisk0 is for the first hard drive
fdisk -u /dev/rdisk1 is for the second hard drive
fdisk -u /dev/rdisk2 is for the third hard drive...

You can use diskpart in windows to check your HD no.

In Terminal (since you are there already), use: diskutil list
to find your hard drive number

#6
Dr. Hurt

Dr. Hurt

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 1,485 posts
  • Gender:Male
  • Location:Cairo, Egypt and NYC, USA
  • Interests:Wandering around on the internet!! Politics, Sci/Tech, Medicine.
Thank you Rammjet for making this clearer.

#7
BugsB

BugsB

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,513 posts
  • Gender:Male
  • Location:Kauai, Hawai'i
fdisk -u /dev/rdisk1 did not work to make my attached USB drive bootable via Grub4DOS (as is other external USB drive) - Mac OS x86 on 1st partition and active, copied by RSyncX as a backup with option "make bootable Mac OS X" which is known not to be able to make volumes bootable on a hackint0sh.

I checked if rdisk1 is the correct drive, it is. I did this from my standard OS x86 install in Terminal, even typed sudo -s before and entered my password.

#8
Dr. Hurt

Dr. Hurt

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 1,485 posts
  • Gender:Male
  • Location:Cairo, Egypt and NYC, USA
  • Interests:Wandering around on the internet!! Politics, Sci/Tech, Medicine.
I don't think that this will work on usb drives. Only hard disks directly connected to the motherboard.

#9
BugsB

BugsB

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,513 posts
  • Gender:Male
  • Location:Kauai, Hawai'i
still, fdisk displays the info correctly, even pretends to be writing, but it doesn't.

#10
cyclonefr

cyclonefr

    InsanelyMacaholic

  • Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 2,751 posts
  • Gender:Male
  • Location:Paris, France

from the "man fdisk" page for the "-u" parameter: Update MBR code, preserving existing partition table.
fdisk -u /dev/rdisk0 is for the first hard drive

let me explain u my situation :
im running a multiboot:
my first partition disk0S1 is used by windows XP (which was named SATA)
my second part is 0S2 and beeing used by OSX = MACOS (volume label=)

ive changed the name SATA to XP but it's still named SATA in the darwin bootloader...
does fdisk -u /dev/rdisk0 will fix it , and without breaking any multiboot,??

thanx Rammjet

#11
Rammjet

Rammjet

    InsanelyMac V.I.P.

  • Gurus
  • 5,302 posts
  • Gender:Male

ive changed the name SATA to XP but it's still named SATA in the darwin bootloader...
does fdisk -u /dev/rdisk0 will fix it , and without breaking any multiboot,??

I don't know if it will fix your partition naming problem, but it won't break your multiboot.

#12
cyclonefr

cyclonefr

    InsanelyMacaholic

  • Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 2,751 posts
  • Gender:Male
  • Location:Paris, France
hum it asked me "do u want to rewrite ur MBR" then i pressed 'y' is that fine? didnt seem to have done anything (1sec)
still having the same SATA partition name :blink:

#13
bgg71

bgg71

    InsanelyMac Protégé

  • Members
  • PipPip
  • 82 posts
this did not work on either internal or external drive. "hfs+ partition error" internal and "NTLDR missing on external"

#14
Bloodshot710

Bloodshot710

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 3 posts
I am having the HFS+ Partition Error and tried this but I get "fdisk: /dev/rdisk0s1: Permission denied" when I try to do fdisk -u /dev/rdisk0. Any ideas? Thanks

#15
BaselineAce

BaselineAce

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 256 posts
  • Gender:Male
  • Location:New York

I am having the HFS+ Partition Error and tried this but I get "fdisk: /dev/rdisk0s1: Permission denied" when I try to do fdisk -u /dev/rdisk0. Any ideas? Thanks

Did you try sudo fdisk -u /dev/rdisk0?

#16
Bloodshot710

Bloodshot710

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 3 posts

Did you try sudo fdisk -u /dev/rdisk0?

Tried that and it wouldnt boot at all after that. I just got a black screen. So I just reformatted (which I had already done numerous times) and that worked. So, thanks anyways!

#17
mdg

mdg

    InsanelyMac Sage

  • Donators
  • 255 posts
I think I might have an issue I can't resolve.

I just bought a 750 Gb Seagte 7200.10 HD. When it goes to initialize on my Hackintosh, it is initialized as a GUID partition by default, and then the partition is formatted with HFS+.

I then go in to Partition, select option, and select MBR as partition type, and tell it to partition/erase. It goes through and creates the partition, but doesn't format the partition with HFS+. It never mounts the partition to format and the would be partition is just gray'd out as disk1s1.

When I go to manually erase/format the partition, it give me an error that says something like the partition has blocks that are bigger than 4k, and DiskUtility just hangs (I have to force quit).

I know the MacPro uses these 750's as primary (an upgrade option when you buy one), and I just put one in to a Dual Process G4, and it is being used as the primary/startup disk so I don't think it's the disk incompatibility issue, but could be with a Hack??

I am using an Asus 945G based motherboard (P5L-VM 1394) with SATA.

I have 2 320's on there now and the machine works fine.

To try to eliminate the machine, I hooked it up in to an external USB enclosure and to a second Hackintosh I have, and same thing.

All of my Hanckintoshes are running 10.4. Semthex.

Anyone know what's going on here? The drives partition no problem and format with HFS+ if I choose GUID or Apple Format, but when I choose MBR, the partition is created but cannot be formatted with HFS+.

Many thanksi in advance for anyone's input/support.

Kind regards,

/mdg

#18
Detosx

Detosx

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 924 posts
  • Gender:Male
  • Location:Scotland

6) Open the terminal from the utility pulldown menu.
7) Type the following: fdisk -u /dev/rdisk0
8) When asked to confirm writing a new MBR accept it by typing "y"

I hope this helps all the people having the same problem as me. :D

This worked for me on my new Asrock Conroe and Seagate Sata 2, post install, so a big thanks to your good self.

See if this sounds familiar to someone searching for a solution right now:-

Using Acronis Disk Manager I had set up three partitions. FAT 32 primary, FAT32 primary active and FAT32 extended. Disk utility on the Mac Installer took a heck of a long time to erase the second FAT32 partition as journalled. I had to go back and erase it a second time because for some reason it was then invisible to the installer. Everything then seemed to work fine, quick and easy install, but on reboot I got the HFS+ partition error. I rebooted with acronis and saw that the first partiton had a red x against it. I deleted it and formatted it again, as before, as FAT32 primary. I found that the second partion, which I had renamed OS X, wasn't active and wouldn't give me the option to make it active, so I made the first partition active, then went back to the OS X partition and made it active...

Reboot brought the same error message. I then did a search and found your suggestion. It sounded a lot like something I have done before in windows and... it worked perfectly. It's great to have OS X up and running with so little hassle after failing miserably to get it to install on a Asus P5VD2-MX. A very big thanks to you and also to the very hard working Rammjet (queen giving a knighthood emoction).

#19
eds

eds

    InsanelyMac Protégé

  • Members
  • Pip
  • 24 posts
when I use the command fdisk -u/dev/rdisk0s2 (second partition on one drive) I get "fdisk: illegal option -- /". Not sure what I'm doing wrong. Please help!!!

Edited by eds, 16 December 2006 - 12:57 AM.


#20
Rammjet

Rammjet

    InsanelyMac V.I.P.

  • Gurus
  • 5,302 posts
  • Gender:Male
fdisk -u /dev/rdisk0


There is a space after the "-u" and drop the "s2". You don't repair MBR on a partition. The MBR is maintained by the disk.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy