Quick question regarding gpart

I want to install FreeBSD on a MacBook and I've removed the hard drive and I've installed it in my BSD laptop. I will manually install FreeBSD using the ./install.sh script from a FreeBSD USB live system. For now on the MacBook hard drive I have the following partitions (I've previously installed OSX and then shrunk the partition):

Code:
# gpart show da2
=>       34  976773101  da2  GPT  (466G)
         34          6       - free -  (3.0K)
         40     409600    1  efi  (200M)
     409640  358350848    2  apple-hfs  (171G)
  358760488  618012391       - free -  (295G)

I want to create FreeBSD partitions with gpart, I've looked into some tutorials and I have some questions:

1. If I create partition 3 (which is next) of type freebsd-boot, what size should it be?

2. Is it ok if I create it with this command?
[cmd=]gpart add -s 128 -t freebsd-boot da2[/cmd]

3. From my understanding this partition is to hold bootstrap code. The partition should not be formatted, right?

4. If then I create the other FreeBSD partitions, and I use the command:
[cmd=]gpart bootcode -b /mnt2/boot/pmbr -p /mnt2/boot/gptboot -i 4 da2[/cmd] then what should be the parameter -i value? The freebsd-boot partition or the FreeBSD root partition that also holds the /boot directory where the rest of the bootstrap code is located.

I never used GPT until now, I've read the gpart(8) man page, please advice more readings on this subject.
 
Thank you for that link.

I've read that but it handles the case where FreeBSD is installed directly on the MacBook from sysinstall. In my case I install it on a FreeBSD machine/live system, on a regular PC, and then I move the drive to the MacBook.

Still that page is useful for configuring drivers.

I want more info on GPT installations, if you have more links please tell me.
 
overmind said:
I've read that but it handles the case where FreeBSD is installed directly on the MacBook from sysinstall.
No, read it again. Because OS-X uses GPT you can't even use sysinstall and you have to install by hand.
 
Plain installation on MacBook Pro section uses sysinstall:
Exit fixit mode and install FreeBSD into slice 3 using sysinstall.

There's also a section to install using ZFS but I don't need ZFS. My main question is what partition ID is used for the command:
[cmd=]gpart bootcode -b /mnt2/boot/pmbr -p /mnt2/boot/gptboot -i 1 da2[/cmd]

Is it the freebsd-boot partition or the freebsd-ufs partition where /boot directory is located? I am talking about the -i parameter.
 
Is it the freebsd-boot partition or the freebsd-ufs partition where /boot directory is located?
The freebsd-boot partition will only contain the bootcode. The root filesystem (including /boot/) will be in the first UFS partition.
 
Back
Top