Solved freebsd-boot slice still needed?

I am setting up a dual-boot system and i am confused about the partitions needed for FreeBSD.

The computer boots via BIOS and it uses the GPT partitioning scheme.

My disk has 3 partitions so far:

1. 16MB - Bios Boot
2. 100GB - ext4
3. 4GB - Linux swap

I am now about to create the partitions for the FreeBSD installation.

The handbook says:
A standard FreeBSD GPT installation uses at least three partitions:
  • freebsd-boot - Holds the FreeBSD boot code.
  • freebsd-ufs - A FreeBSD UFS file system.
  • freebsd-zfs - A FreeBSD ZFS file system. More information about ZFS is available in The Z File System (ZFS).
  • freebsd-swap - FreeBSD swap space.

But last time i checked, my other FreeBSD 12.2 machine doesn't have a freebsd-boot partition, only one UFS and one freebsd-swap. But this one uses MBR rather than GPT.

My questions:

1. Do i need a freebsd-boot partition in my current setup or does it work without?

2. Given that i only want a single partition for / and one for swap.
Can i use a single additional slice and create 2 partitions in it or should i create 2 more slices? Are there differences performance-wise?

TIA
 
Do i need a freebsd-boot partition in my current setup or does it work without?
With GPT you need a freebsd-boot partition.

Can i use a single additional slice and create 2 partitions in it or should i create 2 more slices?
Slices are created on MBR partitioned disks. GPT only has partitions.

MBR -> Slice -> bsdlabel(8) partitions, i.e. ada0s1a or ada1s4d.
GPT -> partitions, i.e. ada0p2 or ada1p7.
 
With GPT you need a freebsd-boot partition.
I have a disk without such a partition... There is only a bios-boot, several freebsd-ufs, linux-data and ms-basic-data partitions all of which are bootable with the aid of a grub loader. Not sure what exactly goes in the bios-boot partition or if it is possible to mount it to check its contents...
 
I have a disk without such a partition.
I can confirm that it's not needed to have a freebsd-boot partition with GPT.
(Edit: If you already have a bios-boot partition)

I managed to install 13.0-RC2 without such a partition.

The current partition layout looks like this:
1. Bios Boot
2. ext4
3. Linux Swap
4. UFS
5. FreeBSD swap

Booting using GRUB2 works like a charm.
 
I can confirm that it's not needed to have a freebsd-boot partition with GPT.
That's not entirely correct. For a FreeBSD only install you definitely require a freebsd-boot partition, which I assumed you were using.

In your case it's booting via the bios-boot partition of Linux. In any case you're going to need a boot partition to boot a GPT partitioned disk. Linux uses bios-boot which has the same function as the freebsd-boot partition of FreeBSD.
 
Ok. Classical misunderstanding.

I was asking
Do i need a freebsd-boot partition in my current setup
which i thought would have made clear that i was using a
1. 16MB - Bios Boot
partition already.

Sorry for not being more clear about that. :p

Linux uses bios-boot which has the same function as the freebsd-boot partition of FreeBSD.
This was the point i was unsure of. Do i need both boot partitions or just only one.

Thanks for clearing this up.
 
I can confirm that it's not needed to have a freebsd-boot partition with GPT.
(Edit: If you already have a bios-boot partition)

I managed to install 13.0-RC2 without such a partition.

The current partition layout looks like this:
1. Bios Boot
2. ext4
3. Linux Swap
4. UFS
5. FreeBSD swap

Booting using GRUB2 works like a charm.
Just wondered how you installed GRUB2.... I'm looking for a really small Linux distribution, no GUI. I've just spent a while installing Debian and on reboot it says 'Missing operating system' !!!!! I used Archlinux in the past and I remember it being fairly straightforward, but can't get the hang of it any more.

Why can't we have Grub2 for FreeBSD any more?
 
I also like Void. Its grub can boot FreeBSD on GPT without problem, though I do have to make a custom.cfg (or edit /etc/grub.d/40_custom). This is on two UEFI laptops.

It is small, you don't need to install a GUI, you can install it from another Linux installation, (probably not needed in your case), good documentation, and in my experience at least, rather fast at answering requests for sort of fringe packages (in my case, fcitx-mozc, for Japanese input).

Disadvantages are that some things that are made in deb and rpm format aren't made for it, and rather than a forum, they use a subreddit, but, unless you're doing something really unusual, it's pretty easy to set up.
 
edit /etc/grub.d/40_custom
For the record, this is how my /etc/grub.d/40_custom looks like:
Code:
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

menuentry "FreeBSD 13.0" --class freebsd --class bsd --class os {
    insmod ufs2
    insmod bsd
    set root=(hd0,gpt4)
    kfreebsd /boot/loader
}
 
With GPT you need a freebsd-boot partition.
To be more exact, you only need a freebsd-boot partition if all of the following is true:
  • The drive uses the GPT partition scheme.
  • You boot via CSM (legacy BIOS), not UEFI.
  • You use FreeBSD’s native bootstrap, not a 3rd-party bootstrap like Linux’ GRUB (which provides its own boot partition).
 
On dual-boot systems, i always install Linux first so i can use GRUB2 from Linux without hassle.

I love Void Linux. Rolling release, no systemd, very fast. I am currently in the process to replace all my Debian installations with Void.
Never heard of Void but will give it a go... Not sure which archive to download - I don't need a GUI just something which will install a boot loader...
 
OK, I've installed it and it looks OK, apart shell history not working...I'm used to up-arrow recalling my commands...

Unfortunately I have not yet managed how to get GRUB working... ie no boot loader
 
apart shell history not working...I'm used to up-arrow recalling my commands...
Try to login as user "anon" and use sudo. I believe the regular users use a different shell where history is working.
I have not yet managed how to get GRUB working
Here's a tutorial on how to repair GRUB2 from a live USB environment: https://howtoubuntu.org/how-to-repair-restore-reinstall-grub-2-with-a-ubuntu-live-cd
This is for Ubuntu but i am sure this works on any Linux.

PS: We are not allowed to discuss Linux maintenance here so i hope the mods don't yell at us. ;)
 
We can if we talk about how we hate Linux. (See below, where I turn it into how we should hate Linux). Anyway, at the # prompt just type bash. I believe the default shell, at least for root is a limited csh with no expansion or history. Once it says bash, you can use history. If you do xbps-install -Sy grub though, you should be good. But it would be better to ask these questions on their subreddit. (As mentioned there's no forum).

Oh yeah, to avoid the Wrath of the Moderators. (Hrrm is that better as a TV series or heavy metal band name?) Unlike FreeBSD, Linux is so bad, that you now have to do the above. Aren't you glad you use FreeBSD? :)

Trolling along,
 
Oh yeah, to avoid the Wrath of the Moderators. (Hrrm is that better as a TV series or heavy metal band name?) Unlike FreeBSD, Linux is so bad, that you now have to do the above. Aren't you glad you use FreeBSD? :)

Actually I forget about how nice it is to use FreeBSD until I need to use Linux and then everything is an uphill struggle... all the different distributions, packet management systems, repositories, sources of help... it's a nightmare!
 
The current partition layout looks like this:
1. Bios Boot
2. ext4
3. Linux Swap
4. UFS
5. FreeBSD swap

Booting using GRUB2 works like a charm.

Can you remember how you partitioned the disk? ie did you use gpart() to create the partitions? I do have a bios-boot (512k) but I created it several years ago, and can't remember what purpose it serves or how big it is supposed to be ...
 
Can you remember how you partitioned the disk?
I used the GParted Live USB.
can't remember what purpose it serves or how big it is supposed to be
GRUB2 needs it. It installs parts of it in there. I don't know the technical details.

Recommended size is 1MB, but i didn't find a filesystem which can be so small. I used fat16 which minimal size is 16MB.

The size requirements for a BIOS boot partition are quite low so it can be as small as about 30 KiB; however, as future boot loaders might require more space, 1 MiB might be a reasonable BIOS boot partition size.
 
Much information here is wrong or murky, so to clarify:

freebsd-boot is called by the legacy bootcode. It's only "required" because that's the way it's coded; the MBR bootcode looks for a freebsd-boot partition.

An efi disk doesnt require freebsd-boot because it has it's own loader.

Other loaders probably won't require a freebsd-boot partition
 
Back
Top