getting 'PIO_VFONT: Operation not supported' when trying to change font

I'm trying to change the console font using 'vidfont'. I select Terminus 32, press on OK but it gives me an error:

Code:
vidcontrol: PIO_VFONT: Operation not supported

I'm running 14.2-RELEASE-p1 on amd64 with latest patches, inside VirtualBox.

Is there anything I can try?
 
Are you doing this on an actual virtual console (/dev/ttyv0) or are you logged in and thus using pseudo terminals / virtual consoles like /dev/pts/0?

Because that can make a major difference.
 
To find out what terminal you are on: Use the tty(1) command. But ttyv0 looks like you are using the console.

FreeBSD has two different generations of console, called sc(4) and vt(4) (in order of age). I don't remember which is the default on 14.2, but they sometimes act differently, and support different functionality. Find some older discussions here on the forum, or read the man pages.
 
I'm running 14.2-RELEASE-p1 on amd64 with latest patches, inside VirtualBox.
The VirtualBox VM is running in BIOS mode. Since 14.2-RELEASE, BIOS systems loader supports text mode only in vt(4) console [1].

This means there is no font and no graphical images (ASCII instead of image FreeBSD logo at the boot menu) frame buffer support.

To get font support back, you need to enable UEFI mode for the VM: VBox VM Settings -> System -> Motherboard -> Extended Features: Enable EFI (special OSes only).

You have two options, recreate the VM with EFI support enabled, or add a ESP (EFI System Partition) to the existing VM.

If option two, there should be a 1M space left at the end of the virtual disk.

It should be sufficient for loader.efi, but if you plan to keep the VM over several future versions, it may insufficient if the loader.efi size increases.

In this case shut down the VM, increase disk size about 260m (VBox Tools -> Media -> Hard disks -> Attributes: Size ), start VM, gpart(8) recover, gpart(8) add "efi" partition , create ESP [2].

You might need to create a UEFI boot menu entry, see [2] and EXAMPLES section of efibootmgr(8).

Or, if you want to stay on BIOS mode, revert the changes made to the loader in the source code, rebuild loader [3].

If you are unfamiliar with the procedures, perhaps create a clone of the VM and operate on that clone.

[1]

[2]
Code:
Assuming disk device name ada0

Replace X with partition number

# gpart add -t efi ada0
# newfs_msdos -c 1 -F 32 /dev/ada0pX  

# mount_msdosfs /dev/ada0pX  /mnt
# mkdir -p /mnt/efi/freebsd
# cp /boot/loader.efi  /mnt/efi/freebsd

# efibootmgr -c -a -L FreeBSD -l ada0pX:/efi/freebsd/loader.efi

[3]
 
Good find T-Daemon!

However... I think there's more to this story. When I check vt(4) it confirms that the default on BIOS is text mode, but...
START-UP OPERATION WITH X86 BIOS SYSTEMS
The computer BIOS starts in text mode, and the FreeBSD loader(8) runs,
loading the kernel. If hw.vga.textmode is set, the system remains in
text mode. Otherwise, vt switches to 640x480x16 VGA mode using vt_vga.
...
hw.vga.textmode
Set to 1 to use virtual terminals in text mode instead of
graphics mode. Features that require graphics mode, like
loadable fonts, will be disabled.
So theoretically it should also be possible to use fonts when booting with BIOS. However, it's going to take more work to set it up.

Also... and in addition to what Daemon said above me: it's possible to have both the "BIOS boot mode" and the UEFI mode active at the same time. In fact... this is even supported by the official installer as well. I set up a text box yesterday to try and look into another issue I found on the forums and I was a bit too quick with selecting ok... as a result I ended up with both an efi and freebsd-boot partition.

Maybe food for thought?
 
Typing tty says /dev/ttyv0, so I'm on ttyv0. I also see that in /boot/loader.conf I've set kern.vty="vt" and hw.vga.textbode=0.

Then I did what you suggesred, T-Deamon, and created another VM with EFI enabled. And vidfont just worked. This was faster and easier than to make a new partitions or rebuild the loader. Both of which seem interesting as a process (escpecially the recompiling part) and I am keeping this on my bookmarks as something I could try for experience and insight.

So my problem is resolved, and thanks to everybody that participated!

I have one addon question. I was hoping to find a font used at older times on the default installation. Thinking 10.0 to 10.3. It resembled this:


slackware.png
this actual photo is from Slackware Linux using ter-114v, probably a variation of Terminus

I thought it may have been Terminus but it's not. At least not the Terminus I found on vidfont. Does this ring any bell? Was there another font in user on REL 10.4?

If no one remembers, then worst case scenario I will just install version 10 or 11 and see myself, which is easy.[/file]
 
Back
Top