# How to partition/format the FBSD disk's free section in ext4?



## aurora (Oct 12, 2012)

Hello

I installed FreeBSD PPC on a Mac mini G4 with 40GB harddisk. I used about 23GB of disk space for FBSD and 
left the remaining 17GB section free for installing linux/Ubuntu PPC.

I have zero problems with the FBSD, it works perfectly fine on Mac mini, 
but I have a hard time installing Linux/Ubuntu on its free section presumably 
because I'm not able to partition/format it in Ext4.

On my attempt to partition/format that section with Disk Utility of Ubuntu,
here is how it looks:





When I try to add a partition to the 17GB section using Ubuntu's DU 
it fails with this message:


```
Error creating partition: helper exited with exit code 1: In part_add_partition: 
device_file=/dev/hda, start=23363101696, size=16644660224, type=
Entering MS-DOS parser (offset=0, size=40007761920)
No MSDOS_MAGIC found
Exiting MS-DOS parser
Entering Apple parser
Mac MAGIC found, block_size=512
map_count = 17
Leaving Apple parser
Apple partition table detected
containing partition table scheme = 2
got it
Error: The partition's data region doesn't occupy the entire partition.
ped_disk_new() failed
```

Please note the expression "Apple Partition Table detected" It looks as if it's a APT related problem. 
But I don't think it's because of APT. I think this is a more general issue seen in other Partition Tables. 

So the problem is, how can I partition/format this FBSD disk's free section in ext4? There's a tool called "gpart" in FBSD, 
but I don't think it can handle Ext4 formatting, or can it? I'm not sure. 

Waiting for the suggestions, thanks.


----------



## SirDice (Oct 12, 2012)

Your issue is with Ubuntu, not with FreeBSD.


----------



## aurora (Oct 12, 2012)

That's right.

But may I summarize the question like this

Is there's any tool in FreeBSD with which I can safely partition and format free space (of the harddisk on which FreeBSD is installed) in Ext4 format?


----------



## SirDice (Oct 12, 2012)

As far as I know, no. Only ext3 if I'm not mistaken.


----------



## aurora (Oct 12, 2012)

Ext3 is also ok. AFAIK, ext3 and ext4 are equivalent/compatible.
Which tool in FreeBSD does the Ext3 partition/formatting?


----------



## SirDice (Oct 12, 2012)

sysutils/e2fsprogs

Looking at the description it may even do ext4.


----------



## wblock@ (Oct 12, 2012)

That "unknown partitioning" is probably due to FreeBSD using GPT.  Unfortunately, there's no gpart(8) output, so it's hard to be sure.

Anyway, the question to ask the Ubuntu people would be "how do I install Ubuntu for multiboot in a GPT partition?" followed quickly by "okay, it's installed, but how do I install a GPT multiboot loader?" followed by "why did not I not use a simple VM?"


----------



## aurora (Oct 12, 2012)

I have installed it successfully, this evening I will try with this one and post the results. Thanks.

UPDATE: e2fsprogs seems to handle mainly the formatting but not partitioning. Therefore I couldn't manage to make the Linux Partition using it.


----------



## aurora (Oct 13, 2012)

wblock@ said:
			
		

> That "unknown partitioning" is probably due to FreeBSD using GPT.  Unfortunately, there's no gpart(8) output, so it's hard to be sure.



If you mean the gpart(8) output of my FSBD PPC installation, here it is:




And for further information, here's the DU output of a (20GB) harddisk on which Ubuntu 10.10 PPC is installed: (no FBSD installed and no disk space for FBSD could be allocated)







			
				wblock@ said:
			
		

> Anyway, the question to ask the Ubuntu people would be "how do I install Ubuntu for multiboot in a GPT partition?" followed quickly by "okay, it's installed, but how do I install a GPT multiboot loader?" followed by "why did not I not use a simple VM?"



you're correct on this one but only with the last part I don't agree because I'd like to achieve this dual boot system w.o. using any VM.


----------



## wblock@ (Oct 13, 2012)

It's not GPT, it is APM.  If this is on a Mac, that should have been mentioned.  If it is not a Mac, use a standard partition scheme, either MBR or GPT.


----------



## aurora (Oct 13, 2012)

wblock@ said:
			
		

> It's not GPT, it is APM.  If this is on a Mac, that should have been mentioned.  If it is not a Mac, use a standard partition scheme, either MBR or GPT.



It's a 2005 Mac mini G4 with PowerPC processor, I had mentioned at my first post. 

Because PowerPC Mac's are said to use only APM, I had to use APM, too. I don't think I can use MBR or GPT on it.


----------



## wblock@ (Oct 13, 2012)

Sorry, I missed that.  In that case, it's a Mac problem, and the multi-boot loader will have to be something available for the PowerPC Mac.


----------



## aurora (Oct 13, 2012)

Yes, what I should eventually have is a multi-boot loader for the PowerPC MAC and in http://en.wikipedia.org/wiki/Comparison_of_boot_loaders, I get difficulty seeing such a bootloader.


----------

