# Which filesystem for PowerPC Mac?



## aurora (Jul 5, 2011)

Hello,

I've been trying to install FreeBSD-9.0-20100418-SNAP-powerpc-disc1.iso on a 1.25GHz PowerPC Mac, but it seems there's confusion about which filesystem to use for Mac: HFS or HFS+?

First I boot the Mac with an Ubuntu 10.10 PPC live CD and format the harddisk as HFS. Then I boot from the FreeBSD CD, and it successfully boots with the FreeBSD/PowerPC Open Firmware loader. However, in the FreeBSD Disklabel Editor there's no harddisk or partition to be seen and no options (such as C - Create or A - autodefaults) ever work.

what could be wrong here?

My guess is, the HFS filesystem might be the problem because somewhere I've read that the Open Firmware loader understands only ISO 9660 and HFS+ filesystems.

I have tried formatting the harddisk for HFS+, but gparted of Ubuntu does not have that option. Actually it does have HFS+ among the options but it's grayed out, unusable.

So I'm stuck at this point.

Any help is appreciated, thanks in advance.


----------



## SirDice (Jul 5, 2011)

You can only install FreeBSD on UFS or ZFS.


----------



## aurora (Jul 5, 2011)

Hello SirDice,

Thank you for the tip. I experienced that problem with a "raw" harddisk, that is no OS, no partition or formatting on it. 

I have another harddisk on which Mac OS 10.4 is installed and if I go on with that harddisk, FreeBSD (Disk Label Editor) actually sees the harddisk e.g. the A - auto defaults works and brings the usual


```
ad0s3     /     998MiB  UFS2
swap     swap   944MiB  swap
ad0s3    /var   3916MiB UFS2+S
...
```
partitions (or are they called something else?)

That means that harddisk should have been partitioned and formatted correctly from the start.

When I analyze that harddisk on gparted from Ubuntu, I get this structure:


```
label      size        used     unused
/dev/hda1 ! (FileSystem unknown to Gparted)                31.5 KiB
unallocated  unallocated                                   128MiB
/dev/hda3    hfs+                               CF16GB     14.8 GiB    9.21GiB  5.58GiB
```

So the question is, how I can partition or format the "raw" harddisk like the one above. I'm working on it.


----------



## SirDice (Jul 5, 2011)

Do the partitioning from within the FreeBSD installer. There's no need to do this beforehand.


----------



## randux (Jul 5, 2011)

You can simplify things a little by using whichever fdisk you are familiar with, I personally set up new multiboots with a Linux LiveCD. If you create a partition and set the type to FreeBSD, the installer should find it and things will go smoother.


----------



## aurora (Jul 5, 2011)

Hello SirDice

I wish I was able to do the partitioning from the FreeBSD installer, but when I select A - Auto Defaults , it says 
	
	



```
You can do this in a disk slice at top of screen)
```
 But there's no slice to select at the top.

When I select C- Create, this error appears: 

```
A signal 11 was caught - I'm saving what I can and shutting down. If you can reproduce the problem, please turn Debug in the 
Options menu for the extra information it provides in debuggin problems like this.
```

Or when I select M - Mount pt. This error appears: 
	
	



```
Fatal Error: Bogus partition under cursor??? - PRESS ANY KEY TO REBOOT
```

Randux,  I'm not able to properly create a partition which may be used by FreeBSD, at all. 

I wonder what's wrong. Do you have any idea? Thanks.


----------



## sossego (Jul 5, 2011)

Sir Dice: 





			
				SirDice said:
			
		

> Do the partitioning from within the FreeBSD installer. There's no need to do this beforehand.


Gpart is the way to create partitions on PowerPC. PowerPC systems are not i386, amd64, or SPARC64- which can use the normal installer after the 
	
	



```
boot cdrom
```
 command. There are times it may be necessary to use a Linux disk to pre-create partitions. 
I  suggest you install FreeBSD to a PowerPC machine and build the system on it.





http://forums.freebsd.org/showthread.php?t=13827 The howto I wrote covers two methods of installing FreeBSD to PowerPC systems.  In the case of ZFS, it is best to ask the mailing list if it has been tested.


----------



## randux (Jul 5, 2011)

aurora72 said:
			
		

> randux,  I'm not able to properly create a partition which may be used by FreeBSD, at all.
> 
> I wonder what's wrong. Do you have any idea? Thanks.



No, I don't. I have done FreeBSD installs on other architectures, but I have only multibooted on Intel and I have only used this method on Intel boxes. I may have given you advice that doesn't work on PPC. I'm sorry if I wasted your time.


----------



## aurora (Jul 5, 2011)

Hello sossego,

Thank you for the link.

Hello randux,

Actually, I have already spent several hours trying to install FreeBSD on this PowerPC Mac. It's really tough, intalling on PowerPC, especially the partitioning that has to be made at the start.

Now, my latest solution idea is this: I will first install Mac OS on this PowerPC so that Mac OS installer will take care of all those partitioning and then install FreeBSD on it! That way is very likely to work because FreeBSD installer sees the harddisk the Mac OS partition as a proper FreeBSD partition (somehow!)

Is this the most efficient way of installing FreeBSD on a PowerPC? No, but there seems no other way for now.


----------



## sossego (Jul 5, 2011)

aurora72: Please read what I posted. Again, the tutorial covers what needs to be done.

What doesn't build   on PowerPC is:
KDE3
KDE4
GNOME3.

What is not available:
Java.
Firefox version > 3.6.

At least two of us here- tingo and myself- are active members of the PowerPC FreeBSD mailing list- apologies if I forget anyone here. Whenever possible- and depending on how I feel- I work on  GNOME3 and KDE4 to the PowerPC and SPARC64 ports.

Are you keeping MacOS on your machine?
If so, then create a 1M HFS file to allow the boot loader to be installed.
Create partitions for /, swap, /home, /tmp, /var, and /usr.

After creating these partitions, follow the tutorial's first post. What I had stated as Linux created can be applied to the MacOSX created partitions.


----------



## aurora (Jul 5, 2011)

Hello sossego,

I appreciate the guidance and it's good to see a brief list of common applications which do not work on PowerPC. I didn't know KDE3&4 and GNOME4 didn't work on PPC. However, the case of Java and FF 3.6 is not surprising because they had problems when I tried them on Mac OS X PowerPC. AFAIK, Java up to a certain version did work on Mac OS X PowerPC but I don't remember which version was that.

Back to my main problem: 

I have found out the basic cause of my problem, finally: The problem is the harddisk itself  The harddisk had a failure in S.M.A.R.T. status and I have noticed that only in the Disk Utility of Mac OS X. (I couldn't notice that in Gparted) That SMART failure went unnoticed also because it didn't interfere with the general working of the harddisk, it just seemed to work during partitioning with GParted.

Anyway, I have replaced the HD with another IDE HD and confirmed its SMART status as OK. Now the A - Auto defaults section works in the FreeBSD installer only if I do a "Apple Partition Table" using DU of Mac OS X. But because DU makes a HSF+ formatting, FreeBSD installer cannot go on after that. 

FreeBSD installer wants UFS2 formatting on a BSD partition right?

But when I make a BSD partition using Gparted, I can't make any UFS (neither UFS2) formatting because Gparted doesn't list them as available options. Actually there is UFS but it's grayed out, unselectable...


----------



## sossego (Jul 6, 2011)

The application is called Gpart not Gparted. It is easy to confuse the two at first.
Read through the tutorial, many of your questions are covered in the first few posts. 
With Gpart, you will label partitions as freebsd-ufs and freebsd-swap.

Because PowerPC systems cannot be installed using the normal method, one must create a partition for every main folder/branch. This is why /, swap, et al were suggested.

How much total space do you have on the drive and how much do you want dedicated to FreeBSD?


http://forums.freebsd.org/showpost.php?p=80838&postcount=1


----------



## sossego (Jul 6, 2011)

I need to correct something I wrote in this thread. 
KDE does build with some difficulty. GNOME3, however, neither completely builds nor works.


Back to the subject at hand.


----------



## aurora (Jul 6, 2011)

Alright, on the tutorial the "hows" are ok but I'm more interested in "whys" 

Here are the questions:

(1) At the beginning, it is instructed to place the SNAPSHOT Disc 1 in the tray but not let the disc be automatically mounted, instead to manually mount it through the command line. What's the purpose?

(2) What is "hfs1.boot"? 
(3) Should we really use 3 different CD's for installation? 

On this tutorial: http://people.freebsd.org/~nwhitehorn/ppcinstall.txt, the installation seems to be done without any additional Ubuntu or Debian CD.

It says the partitioning can be made from the FreeBSD install CD itself using the gpart, but he/she too seems to forget the necessity of FreeBSD-9.0-20100418-SNAP-powerpc-livefs.iso (Live FS CD), because the disc1 alone can't run gpart.

But in  nwhitehorn's tutorial, he/she says you should need one 800K partition of type Apple_Bootstrap before the FreeBSD installaion but there's no explanation why is this.

Grehan's tutorial looks beter from these respects: http://people.freebsd.org/~grehan/iso_install.txt because he/she adds explanations why we're doing this and that.

So, would you start making this tutorial more comprehensive by explaining those 3 questions I've stated above?

Thanks.


----------



## sossego (Jul 6, 2011)

aurora72 said:
			
		

> Alright, on the tutorial the "hows" are ok but I'm more interested in "whys"
> 
> Here are the questions:
> 
> (1) At the beginning, it is instructed to place the SNAPSHOT Disc 1 in the tray but not let the disc be automatically mounted, instead to manually mount it through the command line. What's the purpose?


The tutorial was constructed on a B&W G3. The command line is for systems which do not have an updated Open Firmware.
If available, just hold down the option key until you see a boot selection menu. Insert the disc and then choose the CD image



			
				aurora72 said:
			
		

> (2) What is "hfs1.boot"?


It is the FreeBSD PowerPC bootloader.


			
				aurora72 said:
			
		

> (3) Should we really use 3 different CD's for installation?


No. The disk image was still being developed when I started the installation. I use the Debian install CD to create partitions for FreeBSD; and, this is due to me dual booting. Look at the reference post which is linked on the first post.



			
				aurora72 said:
			
		

> On this tutorial: http://people.freebsd.org/~nwhitehorn/ppcinstall.txt, the installation seems to be done without any additional Ubuntu or Debian CD.


You can use that one, or the one here, or the one by tingo which is referenced in the first post.



			
				aurora72 said:
			
		

> It says the partitioning can be made from the FreeBSD install CD itself using the gpart, but he/she too seems to forget the necessity of FreeBSD-9.0-20100418-SNAP-powerpc-livefs.iso (Live FS CD), because the disc1 alone can't run gpart.


Disc 1 does have Gpart. You need to peruse through the tutorial. 



			
				aurora72 said:
			
		

> But in  nwhitehorn's tutorial, he/she says you should need one 800K partition of type Apple_Bootstrap before the FreeBSD installaion but there's no explanation why is this.


Because FreeBSD uses 2^X while Debian uses 10^X. 800k is the size of the hfs1.boot bootloader when the block size is 10^X. You need to use dd to place the image on the disc.



			
				aurora72 said:
			
		

> Grehan's tutorial looks beter from these respects: http://people.freebsd.org/~grehan/iso_install.txt because he/she adds explanations why we're doing this and that.


 Whitehorn works on code for the entire FreeBSD project; Grehan's work is for the PowerPC port.



			
				aurora72 said:
			
		

> So, would you start making this tutorial more comprehensive by explaining those 3 questions I've stated above?


 Just did. Would you like them added to the tutorial?




			
				aurora72 said:
			
		

> Thanks.


De nada.

My goal was and is to create tutorials that allow users a full or nearly full working system.


----------



## aurora (Jul 7, 2011)

Hello,

Thank you for the additional explanations. 

You might like to add those little explanations in paranthesis to help other newcomers coming across the tutorial. Remember, a lot of people are using relatively newer versions of PowerPC Macs. Mine is August 2005 Mac mini, for example.



			
				sossego said:
			
		

> aurora72 said:
> 
> 
> 
> ...



nwhitehorn says "Because sysinstall does not currently support partioning using APM, you will have to make partitions either prior to installation, or using gpart from the install CD shell (Fixit menu -> shell)."

When I do that (Fixit menu -> shell) the Disc 1 is ejected and a message 
	
	



```
Please insert FreeBSD live filesystem CD/DVD...
```
  appears, that is I still have no way of using gpart from the Disc 1, or do I have?


----------



## sossego (Jul 7, 2011)

Do not use that version.
ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/201102/FreeBSD-9.0-CURRENT-201102-powerpc-disc1.iso


----------



## aurora (Jul 8, 2011)

Hello

To use gpart, I've downloaded and burnt FreeBSD-9.0-CURRENT-201102-powerpc-livefs.iso, and it worked ok, gpart is now usable. 

However, there are still some issues:

1- After the Fixit menu and inserting the livefs CD, this message appears:


```
Warning: ldconfig could not create the ld.so hints file. Dynamic executables from the disc likley won't work.
```

2- After I passed on this warning and get the Fixit shell, when I enter just *ls*, ls doesn't work and this message appears:


```
/libexec/ld-elf.so.1: Shared object "libc.so.9" not found required by "ls"
```

Obviously, one of the shared objects required by the ls command isn't there. In this case, can I assume that LiveFS CD offers a very small set of commands because I cannot even use one of the most basic commands such as "ls"?

3- Anyway forget about the "ls", when I try gpart it works. I try those first:

`# gpart create -s APM ad0` 
(some message saying "ad0 is already present appeared)

`# gpart add -s 800K -t apple-boot ad0`
(this one worked by returning "ad0s2 added")

`# gpart add -s 600M -t freebsd-ufs ad0` 
(this one returned: "Autofill: No space left on device")

4- 

```
#gpart show ad0

=>        5 117210235   ad0  APM   (56G)
          5      1600     1  apple-boot  (800K)
       1605    260603        - free -    (127M)
     262208 116948016     2  apple-hfs    (56G)
  117210224        16        - free -     (8.0K)
```

So I have to clear up all the harddisk to go on, I guess.


----------



## sossego (Jul 8, 2011)

aurora72 said:
			
		

> Hello
> 
> To use gpart, I've downloaded and burnt FreeBSD-9.0-CURRENT-201102-powerpc-livefs.iso, and it worked ok, gpart is now usable.
> 
> ...


I never use the LiveFS CD. 



			
				aurora72 said:
			
		

> 3- Anyway forget about the "ls", when I try gpart it works. I try those first:
> 
> # gpart create -s APM ad0
> (some message saying "ad0 is already present appeared)
> ...


Either that or use the Apple disk utility to create free space.

http://www.netbsd.org/ports/macppc/partitioning.html

http://www.unix.com/man-page/FreeBSD/8/GPART/ It will help you.


----------



## aurora (Jul 11, 2011)

Hello sossego,

Now I have a fully working Fixit shell but when I try this command:

`# gpart modify -i2 -t freebsd ad0`

it returns this:

```
gpart: index '2': No such file or directory
```

FYI, 

`# gpart show ad0`

returns:


```
=>         3 117210237    ad0   APM       (56G)
           3 117210237          - free -  (56G)
```

for a 60GB harddisk, which is actually about 55GB.

How to get past this step? Thanks.


----------



## sossego (Jul 12, 2011)

http://forums.freebsd.org/showpost.php?p=124420&postcount=30

Look at the example for creating partitions with gpart. 

I am going to emphasize reading through the tutorial- the entire thread- and joining the mailing list for PowerPC.


----------



## aurora (Jul 12, 2011)

Hello

I've actually read through the entire tutorial but I still have problem in the gpart phase. It seems gpart allows adding only the first partition and does not allow the next one. Before I explain the problem further, here is a quote from freebsd-ppc Mailing List on June 2011:


> Hadn't seen that recipe before, but I managed to get it booted via cd already. Now the problem I have trying to run gpart bootcode -p /mnt/boot/boot1.hfs -i 1 ad0 I get:
> 
> ```
> gpart: /dev/ad0s2: Operation not permitted
> ...



Now for testing, I try to set a similar partitioning for my harddisk:

```
=>         3 117210237    ad0   APM       (56G)
           3 117210237          - free -  (56G)
```
`# gpart add -b 3 -s 2600M apple-boot ad0`

and gpart accepts that command and the result is this:


```
=>         3 117210237    ad0   APM        (56G)
           3   5324800      1   apple-boot (2.5G)
     5324803 117210237          - free -   (56G)
```

But it doesn't accept this next command:
`# gpart add -b 5324803 -s 2000M apple-ufs ad0`

It doesn't matter if I increase the -b to 5324823 to be on the safe side or change apple-ufs to freebsd-ufs or simply freebsd to make it more general, or add -i2 to explicitly state that I want a second partition, the error message is this:

```
gpart: index '2' : No space left on device.
```

(If I add -i2 the message becomes index '2' invalid argument)

So I cannot add a second partition. Am I doing something wrong here, what am I doing wrong?

Additional note about the quote: The author in that freebsd-ppc Mailing List, who partitioned the HD the way shown above stated that his/her system started to work after the problem was solved. I think that means, that HD structure must be valid and must be reproduced by gpart. That is I think I should be able to make a similar HD partitioning and install FreeBSD on it.


----------



## aurora (Jul 12, 2011)

Hello again,

I think I've found the root of the problem: The harddisk I was tryin to partition was a leftover from Mac OS's Disk Utility and it was partitioned by it. And it has left the harddisk to have a maximum of only 2 partitions. 

I have learnt this the hard way by examining the gpart 's options and tinkering with them.

Well, you see the "3" below:


```
=>         3 117210237    ad0   APM        (56G)
           3   5324800      1   apple-boot (2.5G)
     5324803 117210237          - free -   (56G)
```

It points to the total number of partitions plus 1 for the partitioning scheme. When it's 3 it means that there can be at most 2 partitions, that's why gpart didn't allow me to add the third partition. 

To overcome this restriction I have 
`# gpart destroy ad0`
and then re create the partitioning scheme from scratch.

And, yeah the "3" suddenly become "18" which meant I could have at most 17 partitions. and when I tried if I could really have that number of partitions, I saw I could. 

So, that problem about gpart is solved, I will go on installing freebsd for ppc now.


----------

