UEFI, GPT, Windows 10, FreeBSD 10, and rEFInd

Over the last few days have I experimented with UEFI and GPT in VirtualBox 4.3.26. The goal was to multiboot various operating system, in this case Windows 10 Enterprise Technical Preview 9926 x64 and FreeBSD/amd64 stable/10.

First, I thought of persuading the UEFI firmware to always present its boot menu. It sure beats remembering to press F12 each time I want to boot a different operating system. This proved impossible for a number of reasons.

Next, I came across The rEFInd Boot Manager. After a quick glance I saw this is exactly what I want, a UEFI boot manager. Continue reading UEFI, GPT, Windows 10, FreeBSD 10, and rEFInd

Migrating FreeBSD from i386 to amd64

I have (successfully) attempted to migrate a running i386 stable/9 system into a running amd64 stable/9 system, and attempted to migrate a running i386 stable/10 system into a running amd64 stable/10 system, only to see if these tasks are in fact feasible. The results speaks for themselves, given the boundary conditions outlined below.

If your system has a separate root filesystem of less than 1 GiB, then I suggest you consider scrapping the 32-bit system altogether, and install a fresh 64-bit system. If you wish to continue having a separate root filesystem, make that filesystem no smaller than 2 GiB to accommodate future expansion. You may gain additional free space by deleting /boot/kernel*/*.symbols prior to installing a new kernel. If this isn’t good enough, then you should limit the modules installed using the MODULES_OVERRIDE directive in your kernel configuration file. (When 11.0 comes out, all kernel symbol files will live in /usr/lib/debug/boot/kernel, relieving the stress on the root filesystem.)

The boundary conditions are:

  • base built from the appropriate stable branch of the source code tree,
  • amd64 snapshot for the appropriate stable branch to speed up parts of the transition,
  • the system being able to run with the GENERIC kernel until a new custom kernel is optionally installed,
  • if your system needs a custom kernel to function properly, one can be precompiled on a spare 64-bit system and transferred to the subject at the right moment,
  • ports built from the ports collection with ports-mgmt/portmaster as a vital instrument, and
  • the ports listed below.

Continue reading Migrating FreeBSD from i386 to amd64

Making a FreeBSD/amd64 XENHVM kernel boot on XenServer 6.2.0

See http://lists.freebsd.org/pipermail/freebsd-xen/2013-August/001681.html and http://lists.freebsd.org/pipermail/freebsd-xen/2013-August/001683.html.

[R]emove [the] DVD device from [the] problem[atic] virtual machine:
# xe vm-list params=uuid name-label="<your-vm-name>"
# xe vbd-list empty=true params=uuid vm-uuid=<your-vm-UUID>
# xe vbd-destroy uuid=<vbd-UUID>

I can confirm the above steps really makes a FreeBSD stable/9 amd64 XENHVM kernel tick on XenServer 6.2.0.

stable/10 and head works out of the box without the need of removing the DVD drive. Yay!

Just remember to install the two ports sysutils/xen-tools and sysutils/xe-guest-utilities, and adding xenguest_enable="YES" to the /etc/rc.conf file.


Jeg børstet støvet av noen tilårskomne filer forleden dag. Jeg fant et lite program som jeg skrev en gang i 2000. Programmet teller ned til slutten av Unix-epoken.

Den opprinnelige definisjonen av datatypen time_t, 32-bit heltall med fortegn, vil få overflyt i midten av januar 2038. Moderne 64-bit OS som FreeBSD/amd64 9.0 har for lengst gått over til 64-bit time_t. Bare ta en titt i fila /usr/src/sys/amd64/include/_types.h, omtrent ved linje 83. Problemet med overflyten i år 2038 vil fortsatt gjelde alt utstyr og (binære) filformater som bruker den gamle definisjonen, slik som FreeBSD/i386 9.0. Ta en titt i fila /usr/src/sys/i386/include/_types.h, omtrent ved linje 91. Den engelske utgaven av Wikipedia har en utfyllende artikkel om problemet.

Kildekoden for det søte, lille programmet mitt, er gjengitt under. Continue reading endofepoch.c