Linux – How to add a Linux Partition on FreeBSD

freebsdlinuxpartition

Today I installed FreeBSD 9.0 PPC on my Mac mini G4 with 40GB HDD.

During installation, (using the FSBD utility 'gpart') I have allocated a total of about 23GB for FreeBSD leaving 17GB totally free (neither partitioned, nor formatted) for a later Linux installation.

Now, when try to install Linux (Ubuntu 10.10 PPC) on the remaining 17GB, the Linux/Ubuntu installer (or Linux's Disk Utility for the same matter) wants presumably a linux partition and when I try to add a (Linux) partition on that area using Linux 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

Now, I'm trying to add a Linux partition on FreeBSD running on the harddisk. I use seemingly most suitable tool for this job: gpart. Here is the 'gpart show ad0'

enter image description here

But it seems unable to add a Linux partition because "man gpart" doesn't list either "Linux Partition" nor anything like Ext2 or Ext3/Ext4. The closest thing to Linux Partition in gpart is "mbr" but it doesn't work:

#gpart add -t mbr ado

So, how to add properly a Linux Partition on FreeBSD?

Thanks.

Best Answer

Here are some details about the Apple Partition Map (which your PPC Mac Mini is using) and how Linux interacts with it: http://www.t2-project.org/handbook/html/t2.partition.apple.html

The FreeBSD online manual recommends using sysinstall (# /stand/sysinstall ) to slice disks, but I don't think that will work for your mini's Mac disk label (APM). And upon review of the manual pages for gpart I'm not sure how it handles APM drives other than to try and convert them to GPT which won't help at all.

Have a look over this forum post as it seems he had success with the same config you are working on: "[Solved] How I installed FreeBSD 8.0 on a PowerPC mac mini" https://forums.freebsd.org/showthread.php?t=11033

Related Question