Jump to content
InsanelyMac Forum
Rammjet

[How to] Setting Your Partition "Active" Using Fdisk in MacOSX

Recommended Posts

There are a lot of people who experience a b0 error on their first boot up after installation. Or the bootloader immediately takes them back to the Windows installation (on dual boot).

 

These people probably forgot to set the MacOSX partition "Active"

 

A common mantra provided here to newbies for setting up for installation is:

  • Make the partition Primary
  • Make the partition ID=AF (signifies an HFS partition)
  • Make the partition Active

There is a built-in Unix utility in MacOSX that can be used to set your partition "Active". It is called Fdisk

 

 

Setting Your Partition "Active" Using Fdisk

 

Words in bold below are things you must type (followed by Enter).

 

1. Boot your Mac OS X install dvd

2. Once the installer is running, go to the Utilities menu and open Terminal

 

3. Determine which disk your MacOSX partition is on

Type
diskutil list

 

Verify which disk number holds your partition (disk
0
, disk
1
, etc.)

 

4. Start using Fdisk

Assuming the MacOSX disk is the first disk ("disk0"), then

type
fdisk -e /dev/rdisk0
<== use "rdisk" with your disk number here !!

 

Ignore the error "fdisk: could not open MBR file ..."

 

5. Determine which partition for MacOSX needs to be set "Active"

Type
p

 

Verify which partition is for MacOSX (1, 2, 3, etc.)

 

6. Set the partition "Active"

Assuming it is partition 1, then

type
f 1
<== use your partition number here !!

 

7. Save and exit

Type
write

 

Type
y
(yes you are sure)

 

Type
exit
(to quit)

 

8. Remove the install DVD and reboot

Share this post


Link to post
Share on other sites
Advertisement

Or for the people that don't like to wait for the MacOSX disc to boot. You can just use a Win98 Boot Disk. Run FDISK and set partition active. Just My :P.

Share this post


Link to post
Share on other sites

My intent is to allow the user to get to Fdisk with tools I know he has on hand. So he doesn't have to search for anything else or download anything else.

Share this post


Link to post
Share on other sites
My intent is to allow the user to get to Fdisk with tools I know he has on hand. So he doesn't have to search for anything else or download anything else.

 

and this user thanks you!!

Share this post


Link to post
Share on other sites

Usually that means what you typed after the sudo command had a typo - it's not sudo it can't find, it can't find the command that sudo was supposed to execute.

 

sudo(space)fdisk(space)-e(space)/dev/rdisk0 <- replace 0 if necessary

Share this post


Link to post
Share on other sites

strange i did this twice i am still not able to boot osx completey by itself. i either need an install disk in the drive for 2 seconds or the ubcd. i have no idea whats going on. I still havent found the answer to my problem. do i need darwin or something to jumpstart the boot process? otherwise if i reboot its just a black screen with a blinking underscore

Share this post


Link to post
Share on other sites
Usually that means what you typed after the sudo command had a typo - it's not sudo it can't find, it can't find the command that sudo was supposed to execute.

 

sudo(space)fdisk(space)-e(space)/dev/rdisk0 <- replace 0 if necessary

 

 

Hi, i am trying to make my disk or partition active so OSX will boot. I typed in "diskutil list" and it returned me with "/dev/disk0, /dev/disk1, /dev/disk2, etc." how is it that yours has a "r" in front of "disk." Also when i typed the sudo command it also said "command not found." I tried putting the "r" in where you had it, but it didn't make a difference.

Share this post


Link to post
Share on other sites
Hi, i am trying to make my disk or partition active so OSX will boot. I typed in "diskutil list" and it returned me with "/dev/disk0, /dev/disk1, /dev/disk2, etc." how is it that yours has a "r" in front of "disk." Also when i typed the sudo command it also said "command not found." I tried putting the "r" in where you had it, but it didn't make a difference.

 

The intent of the "diskutil list" command is to determine the id number of your hard drive (0, 1, 2, etc).

 

Then you append that number to "sudo fdisk -e /dev/rdisk#" where "#" is the number you determined from "diskutil list"

 

If the command isn't found, you have a typo somewhere.

Share this post


Link to post
Share on other sites

I can't figure out the partition I need to make active after entering "p" into the terminal...which one is it from this screenshot?

 

Thanks

post-16521-1157860593_thumb.jpg

Share this post


Link to post
Share on other sites

Off hand, I would say 2. However, I would be more comfortable if I could see all of the output from the "diskutil list" command so I could be sure how you set up your drive. Half of it has scrolled off the top.

Share this post


Link to post
Share on other sites

It was 2, and that just plain didn't work for some reason... I just had a flashing undersore (what it does when searching for bootable drives)

 

So I then set it to 1 and xp booted for the first time in half a week so I was kinda stoked. Then I just said f*** it and did the Chain0 method. Now it works...only gripe I have about the Chain0 method is that I have to select OS X then pres enter at the darwin boot screen and select OSX again manually otherwise it doesnt work...anybody know anything about that?

 

Here is my com.apple.boot.plist:

 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Kernel</key>
<string>mach_kernel</string>
<key>Kernel Flags</key>
<string></string>
<key>Boot Graphics</key>
<string>Yes</string>
<key>Graphics Mode</key>
<string>1280x1024x32</string>
<key>Timeout</key>
<string>10</string>
</dict>
</plist>

 

Thanks

Share this post


Link to post
Share on other sites

Everything that you typed in fdisk looks correct and the responses from fdisk look correct.

 

What doesn't look right is that under "diskutil list", the 2nd partition says it is NTFS. If that is the OSX partition, it shouldn't say that. Did you format the OSX partition in Disk Utility during the installation?

Share this post


Link to post
Share on other sites

Heya Guys, so, im still quite new here and found this thread that appered to be the answer to my problem, but im not entirely sure what im doing haha, there so many different disk numbers when i do the diskutil list, im not sure what to pick, and when i picked what i thought was right it didnt let me do it, heres the terminal window, if somebody could give me a lil' help, thanks

 

http://www.flickr.com/photos/64403079@N00/257203325/

Share this post


Link to post
Share on other sites

/dev/disk0 contains your HFS+ partition

/dev/disk1 is your installation DVD

 

use: fdisk -e /dev/rdisk0

then set partition 1 to active (f 1)

Share this post


Link to post
Share on other sites

Try "sudo fdisk -e /dev/rdisk0" and give your password when asked.

 

If you are actually booted from the install DVD as the guide says, it shouldn't need permissions.

Share this post


Link to post
Share on other sites

Hi Thank you soo much rammjet, it was booting from HD, but only with install disk in the drive, but that sudo thing worked a treat. Helpful guys like you are what make the net great!

Share this post


Link to post
Share on other sites

I tried cloning a disk with carboncopy cloner but when I then attempted to start from the cloned disk, it would not boot (got an error on verbose indicating still waiting for root). I assume this is because the disk is not set correctly. (MBR not set to active?) Is this correct? Can it be fixed with Fdisk as described previously by setting the partition to active? I would like to be able to clone an OSX86 disk so that I can upgrade to a larger capacity drive.. and I can do this with my PPC macs without problems. Thanks. SG

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.



×