You can't install BSD to a LVM2 volume, so you'll need to shrink the LVM2 physical volume partition and create a regular partition instead.
Remember kids, lots of things can go wrong when you're messing around with resizing partitions and such. Be sure and have backups, just in case.
All these commands require root access, so run
su - first or prefix them with
You'll need to boot from a Fedora LiveCD or USB so you're not currently using the device you're working with. (Technically, any Linux live media will do, but distributions other than Fedora typically don't provide LVM tools on their live media by default.) Then, fire up a terminal.
To get started, activate LVM:
lvm vgchange -a y
Next, figure out the Unix device file and minimum size. First run:
Look on the
PV Name line, which should say something like
/dev/sda2. That's the device. Also take note of the size, so you know what to shrink it to. You might also want to take a look at the size of all your logical volumes, so you know what the minimum you can shrink it to is. (Don't worry,
pvresize won't let you shrink it too much. ;-) To figure that out, run:
With this information in hand, you can resize the LVM physical volume:
pvresize --setphysicalvolumesize <size> <device>
<size> is the desired size you want to shrink the LVM PV to and
<device> is the device the LVM PV is located on.
Now the fun part. You have to resize the partition the LVM PV is located on. Unfortunately, this requires deleting the old partition from the partition table and recreating it, so be careful.
First, ask LVM how many sectors are in your PV:
lvm pvs --units s
PSize, which is the size of your newly resized LVM PV in sectors.
Now, fire up
parted on your hard drive:
<device> is your hard drive, e.g. the device you used earlier minus the partition number, for instance
This lands you in a special parted shell. First, we want to switch it to display sectors instead of megabytes, so rounding errors won't cause issues:
Print your partition layout. You likely have a small boot partition on partition 1, and the LVM PV on partition 2.
Note the partition number and start location.
Once you've figured out the PV partition, remove it from the partition table. (This doesn't actually remove any data.)
2 is the appropriate partiton number.
Now, recreate the partition with the new size:
mkpart <partiton #> primary <start> <end>
<partition #> and
<start> are the partition number and start location you just looked up. To calculate the
<end>, and the
PSize you found earlier to the start location, plus 131072 sectors (64MB) for good measure.
Switch back to gigabytes and check the layout again. You should have around 50MB free at the end now!
Now you can reboot from the LiveCD, verify that Fedora still works, and then go ahead and install BSD in the empty space.
*Hat tip to this FedoraSolved entry which helped me formulate these instructions without missing anything.