Differences between revisions 242 and 244 (spanning 2 versions)
Revision 242 as of 2015-12-17 12:22:11
Size: 33716
Editor: RogerShimizu
Comment:
Revision 244 as of 2015-12-17 17:00:50
Size: 33850
Editor: RogerShimizu
Comment:
Deletions are marked like this. Additions are marked like this.
Line 671: Line 671:
||Debian GNU/Hurd||No||Yes||No||No||[[https://lists.debian.org/debian-hurd/2015/12/msg00013.html|Yes]]||
||Debian GNU/Linux||No||Yes||No||No||No||
||Debian GNU/Hurd||No||[[https://lists.debian.org/debian-hurd/2015/12/msg00019.html|Depends]]||No||No||[[https://lists.debian.org/debian-hurd/2015/12/msg00013.html|Yes]]||
||Debian GNU/Linux||No||[[https://lists.debian.org/debian-hurd/2015/12/msg00020.html|Depends]]||No||No||No||

Translation(s): English - русский - Polski


<!> This FAQ still needs some parts to be updated for the upcoming wheezy release.


Contents

  1. Basic questions
    1. Q. What does the 'k' in "kFreeBSD" stand for?
    2. Q. What is the point of Debian GNU/kFreeBSD?
    3. Q. What version of kFreeBSD is supported?
    4. Q. Which Debian releases are available?
    5. Q. Which mirrors offer Debian GNU/kFreeBSD?
    6. Q. Are there instructions for downloading and installing kfreebsd, that don't require previous knowledge of Debian?
    7. Q. Is there any documentation available?
    8. Q. Who are the main contributors?
    9. Q. What hardware does this support?
    10. Q. Does Debian plan to drop support for the Linux kernel and replace it with a FreeBSD kernel?
  2. Technical questions
    1. Q. Can I run Debian GNU/kFreeBSD in a chroot under FreeBSD?
    2. Q. Can I share a swap partition between GNU/Linux and GNU/kFreeBSD?
    3. Q. Can I share partitions between GNU/Linux and GNU/kFreeBSD?
    4. Q. What's the status of amd64 support?
    5. Q. Is there any way to upgrade to Debian-*bsd an existing, running FreeBSD installation (whether it makes sense or not)
    6. Q. Can *.deb packages co-exist with classical BSD ports?
    7. Q. Are the *.deb packages for *bsd handled the same old way they did on Linux, or do they simply use the /usr/local filesystem?
    8. Q. What about some specs I once read about leaving the use of /usr/local to the system administrator? (Maybe these are concerning only to Linux...)
    9. Q. Are there any plans to support alternate CPU instruction sets, e.g. ARM, PPC or Sparc64?
    10. Q. What about all those packages which use ALSA?
    11. Q. Does dpkg's license affect packages build with it, e.g. the kFreeBSD kernels?
    12. Q: Which syscall kernel interface is used by binaries compiled for Debian GNU/kFreeBSD?
    13. Q: Is it possible to run FreeBSD binaries under Debian GNU/kFreeBSD kernel?
    14. Q: Is it possible to run Linux binaries under Debian GNU/kFreeBSD kernel?
    15. Q: How do I setup a firewall with Debian GNU/kFreeBSD?
    16. Q. Can I run Java programs?
    17. Q: How do I setup a diskless system?
    18. Q: How do I mount root filesystem by UUID?
    19. Q. What grub commands are necessary to boot Debian/kFreeBSD from a zfs root?
    20. Q. How does kfreebsd's config differ from upstream and why?
  3. Using Debian GNU/kFreeBSD
    1. Q. Where can I download kFreeBSD?
    2. Q. How can I burn CD-ROMs?
    3. Q. How do I trace system calls?
    4. Q. How do I run native FreeBSD under a chroot under Debian GNU/kFreeBSD?
    5. Q. How do I run native FreeBSD userland tools easily?
    6. Q. How do I debug the kernel?
    7. Q. Is there something like LXR for browsing the FreeBSD codebase?
    8. Q. What FreeBSD userland tools are still missing?
    9. Q. How do I configure keyboard layout on the console?
    10. Q. How do I scroll up on the console?
    11. Q. How do I configure grub to pass a parameter to the kernel?
    12. Q. I specified wrong root device in fstab, how do I remount it in single user mode?
    13. Q. How to use the rescue mode of the installer
    14. Q. How do I use serial console?
    15. Q. I just installed Debian GNU/kFreeBSD. Is there anything I can do to help making it more popular?
    16. Q. Is there ZFS support?
    17. Q. Can I use ZFS as root or /boot file system?
    18. Q. How can I build a package in a chroot?
    19. Q. How do I use pf (Packet Filter)?
    20. Q. Can I run this as a Xen DomU?
    21. Q. How do I boot Debian GNU/kFreeBSD into single user mode?
    22. Q. How do I make the kFreeBSD kernel launch another binary instead of /sbin/init?
    23. Q. What is this idle process and why is it using all available CPU time?
    24. Q. Why is my network card not recognised?
    25. Q. Is anyone running this in production?
    26. Q. How stable is kFreeBSD?
    27. Q. Are there any benchmarks available?
    28. Q. How do you support GPL-licensed file systems?
    29. Q. The system clock is stuck! How do I change the 'clocksource'?
    30. Q. The kernel doesn't wait long enough for disks to attach; fails to mount root filesystem
  4. Development questions
    1. Q. Where can I check buildd logs for a particular package on kfreebsd-*?
    2. Q. I'm a Debian maintainer. Is there any machine running GNU/kFreeBSD I can have access to?
    3. Q. Do I have the option of which libc to use?
    4. Q. How should I detect kfreebsd in debian/rules?
    5. Q. How do I detect kfreebsd with preprocessor directives in a C program?
    6. Q. Why was the choice made to use glibc?
    7. Q. Are there any repositories for the non-free stuff that was taken out?
    8. Q. What license is kFreeBSD released under?
    9. Q. Are the kernel patches needed to make Debian GNU/kFreeBSD work given back to FreeBSD?
  5. Unanswered questions
    1. Q. Can one run a Debian GNU/kFreeBSD chroot under Darwin?

Basic questions

Q. What does the 'k' in "kFreeBSD" stand for?

A. It's an abbreviation. It stands for "kernel of". Hence "kFreeBSD" means "kernel of FreeBSD", and "GNU/kFreeBSD" means "GNU with kernel of FreeBSD".

Q. What is the point of Debian GNU/kFreeBSD?

A. This answer has its own wiki page, see Debian GNU/kFreeBSD why.

Q. What version of kFreeBSD is supported?

A. jessie will have a 10.1 kernel and userland. The wheezy release had a 9.0 kernel (the default for new installs and upgrades) or optional 8.3 kernel (but may have reduced functionality). The squeeze release was based on the 8.1 kernel, see for details.

Q. Which Debian releases are available?

A. Debian GNU/kFreeBSD will be featured in the official Debian wheezy release. It was available in the official Debian squeeze release as a 'technology preview'. For details see the main wiki page.

Q. Which mirrors offer Debian GNU/kFreeBSD?

A. See official mirror list.

Q. Are there instructions for downloading and installing kfreebsd, that don't require previous knowledge of Debian?

A. Yes, see the installation manuals for kfreebsd-i386 and kfreebsd-amd64. Note that installing from USB drive is not supported in squeeze. If you can't install from network and you don't have a CD-ROM drive you can run the installer under QEMU and then copy the resulting image to a USB stick:

wget ftp://ftp.debian.org/debian/dists/squeeze/main/installer-kfreebsd-amd64/20110106+squeeze1/images/netboot/mini.iso
dd if=/dev/zero of=root.img bs=1M count=0 seek=4k
qemu-system-x86_64 -hda root.img -cdrom mini.iso
sudo dd if=root.img of=/dev/disk-id/NAME_OF_DEVICE

If you just want to play with kfreebsd quickly you can just fetch a QEMU image from http://people.debian.org/~aurel32/qemu/kfreebsd-amd64/

There are also some installation screenshots.

Q. Is there any documentation available?

A. Apart from the regular Debian documentation, there is this wiki page, and that's about it. You are welcome to contribute to the main wiki page of course. If you are interested in kernel features specifically then FreeBSD handbook might give you hints even thought it is targeted to users of FreeBSD userland.

Q. Who are the main contributors?

A. Contributors would be mostly: Aurélien Jarno, Petr Salinger, Luca Filipozzi, Robert Millan, Cyril Brulebois.

Q. What hardware does this support?

A. see the install instructions and the upstream documentation.

Q. Does Debian plan to drop support for the Linux kernel and replace it with a FreeBSD kernel?

A. No. Both kernels will co-exist in Debian.

Technical questions

Q. Can I run Debian GNU/kFreeBSD in a chroot under FreeBSD?

A. Yes, you will need:

  • A FreeBSD 9, 10 or later kernel.
  • libc0.1 2.11.3-1 or later (available in Wheezy/Sid or in any up-to-date Squeeze install).

You can follow this tutorial on how to build a Debian GNU/kFreeBSD chroot using debootstrap (ignore the references to using a FreeBSD Jail, however, that's a separate problem).

Q. Can I share a swap partition between GNU/Linux and GNU/kFreeBSD?

A. Yes, but it's not recommended. See http://www.tldp.org/HOWTO/Linux+FreeBSD-3.html for details on how to proceed. Also note that Linux tends to save suspend-to-disk data to the swap partition, which makes sharing swap less attractive.

Q. Can I share partitions between GNU/Linux and GNU/kFreeBSD?

A. Yes, recommended options are ext2fs and zfs.

  • For ext2fs, when creating the filesystem, pass "-O none" to mke2fs for best results.
  • For zfs, create the filesystem from GNU/kFreeBSD, then use zfs-fuse on GNU/Linux.

A few other file systems may be used to transfer data, but only in one direction:

  • For ufs (either 1 or 2), it was only supported readonly by Linux. Write support was highly experimental and likely to cause panics. ufs is no longer supported in kernels built for Debian jessie and later.
  • For ext3fs, kFreeBSD can only access it in readonly mode.
  • For ext4fs, kFreeBSD 10.1 will be able to access it in readonly mode
  • For reiserfs, readonly support has been added to kfreebsd 6.x (see 335019).

  • For xfs, readonly support has been added to kfreebsd 7.x (see 335020 for details). Write support is also planned.

  • For btrfs, readonly support can be archieved by using the grub-mount utility (note that this requires FUSE support, which can be enabled with fuse4bsd).
  • The udf filesystem (used by DVDs) can be used as a read-write partition from Linux but, kFreeBSD can only access it in readonly mode.

Q. What's the status of amd64 support?

A. In slightly better than the i386 one.

Q. Is there any way to upgrade to Debian-*bsd an existing, running FreeBSD installation (whether it makes sense or not)

A. I am unsure about this. You can prepare a filesystem on a different partition/slice and use chroot to install the basic files. Look inside the latest ISO, there is base/base.tgz inside install.iso. Unpack it into the created chroot.

Q. Can *.deb packages co-exist with classical BSD ports?

A. It is not a good idea. Please use a chroot for things like this.

Q. Are the *.deb packages for *bsd handled the same old way they did on Linux, or do they simply use the /usr/local filesystem?

A. In the same way as on any other Debian system -- the usual prefix is /usr.

Q. What about some specs I once read about leaving the use of /usr/local to the system administrator? (Maybe these are concerning only to Linux...)

A. There are (almost) no files from any *.deb in /usr/local/. It is really left for local system administrator.

Q. Are there any plans to support alternate CPU instruction sets, e.g. ARM, PPC or Sparc64?

A. There was an attempted MIPS port, see Debian_GNU/kFreeBSD_MIPS

Q. What about all those packages which use ALSA?

Short A. Don't use ALSA.

Long A. We have salsa which emulates some basic alsa features, which is sufficient for some packages, but far from all of them.

Q. Does dpkg's license affect packages build with it, e.g. the kFreeBSD kernels?

A. No.

Q: Which syscall kernel interface is used by binaries compiled for Debian GNU/kFreeBSD?

A: The native FreeBSD one.

Q: Is it possible to run FreeBSD binaries under Debian GNU/kFreeBSD kernel?

A: Yes, please just use the full chroot with FreeBSD libraries.

Q: Is it possible to run Linux binaries under Debian GNU/kFreeBSD kernel?

A: Only as long as standard FreeBSD Linux Compatibility Layer is sufficient. Some symlinks might be missing. The basic linux-i386 chroot of etch and lenny under kfreebsd-amd64 and kfreebsd-i386 works. The FreeBSD Linux Compatibility Layer claims it supports up to 2.6.16 syscalls. Please note that squeeze supports only 2.6.18 and above Linux kernels, but you can cheat and alter advertised version of linux emulation by setting compat.linux.osrelease via sysctl. You also need debootstrap 1.10.35 or later.

Then use:

sysctl compat.linux.osrelease=2.6.18
debootstrap --foreign --arch=i386 squeeze ./linux-chroot http://http.debian.net/debian

Mount the necessary file systems (/dev, /proc, etc) and chroot in. Then remove /var/cache/apt/archives/sysvinit_* and in chroot run:

dpkg --force-depends -Ei /var/cache/apt/archives/*.deb

repeatedly until all packages have been installed.

Q: How do I setup a firewall with Debian GNU/kFreeBSD?

A: You can use PF, the OpenBSD Packet Filter, which has been ported to the kernel of FreeBSD, and is available as part of the Debian GNU/kFreeBSD distribution.

A complete guide on PF is available at http://www.openbsd.org/faq/pf/index.html

Q. Can I run Java programs?

A. Yes! OpenJDK 7 is available in jessie.

Q: How do I setup a diskless system?

A: Support for network boot is still work in progress. It's possible to set it up with some tweaking, see this HOWTO: http://robertmh.wordpress.com/2011/02/04/diskless-debian-gnukfreebsd-howto/

Q: How do I mount root filesystem by UUID?

A. The following applies only to UFS2. Use e.g.

# grub-probe -t fs_uuid --device /dev/ad0s1
4cc08aab6455cf88

to figure out the UUID of your current root filesystem and then use it in fstab as follows:

/dev/ufsid/4cc08aab6455cf88      /               ufs     rw              0       1

Note that your /boot/grub/device.map might still refer to the disk by its real name as there is no way to refer to the whole disk by UUID. However, this does not seem to be a problem. In fact, it seems that everything works if you create an empty device.map. By applying

--- /etc/grub.d/10_kfreebsd.orig        2011-02-09 22:52:50.000000000 +0200
+++ /etc/grub.d/10_kfreebsd     2011-02-09 22:44:09.000000000 +0200
@@ -136,6 +136,7 @@
 
   case ${GRUB_FS} in
     zfs)               kfreebsd_device=$(grub-probe -t fs_label --device ${GRUB_DEVICE})$(grub-mkrelpath / | sed -e "s,/*@$,,") ;;
+    ufs2)              kfreebsd_device=/dev/ufsid/$(grub-probe -t fs_uuid --device ${GRUB_DEVICE}) ;;
     *)                 kfreebsd_device=${GRUB_DEVICE} ;;
   esac

grub.cfg will pass root=/dev/ufsid/XXX parameter to kernel. This has possibly been fixed in upstream bzr revision 2827.

Q. What grub commands are necessary to boot Debian/kFreeBSD from a zfs root?

A. Since wheezy, this is done for you by the installer.

Assuming that the zpool your rootfs resides in was created by the Debian installer and that it also contains /boot:

kfreebsd /@/boot/kfreebsd-$version.gz
kfreebsd_module_elf /@/lib/modules/$version/opensolaris.ko
kfreebsd_module_elf /@/lib/modules/$version/zfs.ko
kfreebsd_module /@/boot/zfs/zpool.cache type=/boot/zfs/zpool.cache
set kFreeBSD.vfs.root.mountfrom=zfs:$name_of_zpool_that_contains_rootfs
set kFreeBSD.vfs.root.mountfrom.options=rw
boot

If you don't know what your zfs root pool is called, you can find out this way (from the grub prompt):

insmod zfsinfo
zfsinfo (hdX,Y)

Q. How does kfreebsd's config differ from upstream and why?

A. You can take a look at the changes made to sys/amd64/conf/GENERIC for the 9.x kernel or 8.x kernel.

Using Debian GNU/kFreeBSD

Q. Where can I download kFreeBSD?

A. See the main wiki page.

Q. How can I burn CD-ROMs?

A. Nothing special here, just use wodim:

apt-get install wodim
wodim foo.iso

Q. How do I trace system calls?

A. You can use ktrace/kdump. Here's a cheatsheet, read man pages for details:

GNU/Linux

GNU/kFreeBSD

start: strace -o mytrace -s4096 -f -p PID
stop: ctrl-c
view: less mytrace

start: ktrace -f mytrace -d -p PID
stop: ktrace -c -p PID
view: kdump -f mytrace -m 4096

Q. How do I run native FreeBSD under a chroot under Debian GNU/kFreeBSD?

A. First extract the binaries from the FreeBSD ISO image:

wget ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/ISO-IMAGES/8.1/FreeBSD-8.1-RELEASE-i386-disc1.iso

mdconfig -a -t vnode -f FreeBSD-8.1-RELEASE-i386-disc1.iso  -u 0
mount -t cd9660 -o ro /dev/md0 /mnt
mkdir /srv/freebsd-8.1
cat /mnt/8.1-RELEASE/base/base.??|tar vzxf - -C /srv/freebsd-8.1
cat /mnt/8.1-RELEASE/manpages/manpages.??|tar vzxf - -C /srv/freebsd-8.1
umount /mnt
mdconfig -d -u 0

Then mount devfs under the chroot with e.g.

mount -t devfs devfs /srv/freebsd-8.1/dev

Note: bind-mounting (-t nullfs) /dev won't work here.

Note2: You probably want to add /srv/freebsd-8.1/dev to /etc/fstab so that it's mounted on every boot.

Q. How do I run native FreeBSD userland tools easily?

First setup a FreeBSD chroot (see Q&A above), then create a new file named /usr/local/bin/freebsd with the contents

exec chroot /srv/freebsd-8.1 "$@"

and make it executable. You can now run freebsd useland tools easily by prefixing the commands with freebsd:

# uname
GNU/kFreeBSD
# freebsd uname
FreeBSD

Q. How do I debug the kernel?

A. Recompile the kernel with debugging symbols and support for built-in debugger:

# Make sure you have at least 4 gigabytes of disk space.
apt-get source kfreebsd-8
cd kfreebsd-8-8.1
export QUILT_PATCHES=debian/patches
quilt push -a
quilt new debugger.diff
quilt add sys/i386/conf/GENERIC
editor sys/i386/conf/GENERIC
# Add the following options:
# makeoptions DEBUG="-g"
# options DDB
# options KDB
dch -i
# Add a new changelog entry.
# You probably want to use something like "+debugger" in the version number and
# UNRELEASED in place of "unstable".
quilt refresh
debuild
sudo debi
sudo reboot

Here's an example debugging story:

"ifconfig wlan0 create wlandev ath0" fails with "ifconfig: SIOCIFCREATE2: Bad address". By reading the source code I guess that this might be caused by copyin() failing in wlan_clone_create() function. I hit ctrl-alt-esc to enter the debugger prompt and add a breakpoint to that function:

KDB: enter: manual escape to debugger
[thread pid 12 tid 100013 ]
Stopped at kdb_enter+0x3d: movl $0,kdb_why
db> break wlan_clone_create
db> c

and then proceed with the failing command using

root@debian:~# ifconfig wlan0 create wlandev ath0
[thread pid 1309 tid 100088 ]
Breakpoint at  wlan_clone_create:  pushl %ebp
db>

Using the command "x/x $ebp,10" you can inspect the stack which contains arguments that were passed to the wlan_clone_create function. On kfreebsd-i386 the following should be true:

address

contents

$ebp + 4

return address (usually the caller unless a tail call optimization is done)

$ebp + 8

the first argument

$ebp+12

the second argument

$ebp+16

the third argument

...

...

Beware that the debugger silently converts between decimal and hexadecimal: 1+4*4 == 11 but 1+(4*4) == 17!

If the in-kernel debugger is too primitive for your taste you can also use gdb. The easiest solution is to run the system under qemu started with the "-s" option and the to connect to it using gdb:

gdb flavor-8.1-1-686/sys/i386/compile/DEBCUSTOM/kernel.debug
target remote localhost:1234

Q. Is there something like LXR for browsing the FreeBSD codebase?

A. Yes, see http://fxr.watson.org for kernel stuff and cvsweb for userland.

Q. What FreeBSD userland tools are still missing?

glabel(8)

iostat(8)

and more...

Q. How do I configure keyboard layout on the console?

A. Run "dpkg-reconfigure kbdcontrol".

Q. How do I scroll up on the console?

A. Hit scroll lock. Then use page up, page down or arrow keys to scroll.

Q. How do I configure grub to pass a parameter to the kernel?

A. You need to open /etc/grub.d/10_kfreebsd and add your options after the line that reads

kfreebsd                ${rel_dirname}/${basename}

This should be easier in the future.

Q. I specified wrong root device in fstab, how do I remount it in single user mode?

A. You can enter single user mode by adding -s option to kernel in grub to the end of the kfreebsd command. You can then mount the root file system read-write with

mount -u -o ro /dev/ad0s1 /
mount -u -o rw /dev/ad0s1 /

and fix your /etc/fstab. (Two mount commands are needed due to a bug).

Q. How to use the rescue mode of the installer

A. In grub, press 'e' to edit one of the Install entries and add this line:

set kFreeBSD.rescue/enable=true

then Ctrl+X to boot (the installer should display "Rescue mode" in the top-left corner).

TODO: write this up in the kfreebsd-* d-i manuals; add a GRUB entry to do this easily?

Q. How do I use serial console?

A. Add the -h option to kernel in grub to the end of the kfreebsd command. Or -D to enable serial output and regular console output at the same time. At least in Squeeze, you probably also want to edit /etc/inittab and /etc/securetty to update the serial device name to cuau0.

Q. I just installed Debian GNU/kFreeBSD. Is there anything I can do to help making it more popular?

A. Yes! You can install/enable popularity-contest (see http://popcon.debian.org/) to increase our user count. Also you can register yourself as Debian GNU/kFreeBSD user in http://buildd.net/cgi/archvote.phtml. And of course, you can tell all your friends about it. =)

Q. Is there ZFS support?

A: Yes! You need to install the zfsutils package, if you didn't already set up ZFS at install time.

apt-get install zfsutils

Q. Can I use ZFS as root or /boot file system?

A. Yes, and the installer for wheezy now lets you configure this at install time! reference

In squeeze, you could not use GRUB to boot from multi-device arrays nor use gzip compression (default compression is fine). You may want to read about the latest developments in GRUB which will make this possible: http://lists.debian.org/debian-bsd/2011/02/msg00125.html.

If you're not repartitioning this disk from scratch, it's likely that GRUB install will fail later on (see #614768.

Q. How can I build a package in a chroot?

A. Perhaps using sbuild. Or it is possible to set up pbuilder, using the patch and the configuration mentioned in #560332. Andi noted some limitations in #542837, it would be nice to investigate.

Q. How do I use pf (Packet Filter)?

A. Configure it in /etc/pf.conf (see man 5 pf.conf), then load+enable your ruleset:

sudo pfctl -ef /etc/pf.conf

Q. Can I run this as a Xen DomU?

A: HVM mode works perfectly (amd64 and i386). "jessie" has PVHVM support for better performance.

For PV mode, a special kernel flavour was available in wheezy (e.g. kfreebsd-image-8.2-1-xen) but it is i386 only and not considered stable by upstream.

Q. How do I boot Debian GNU/kFreeBSD into single user mode?

A. In GRUB, edit the entry's line starting with "kfreebsd" and add a " -s" (space, hyphen, "s") at the end. Then boot.

Q. How do I make the kFreeBSD kernel launch another binary instead of /sbin/init?

A. In GRUB add a set kFreeBSD.init_path=/sbin/something, although /bin/sh and /bin/bash don't seem to work...

Q. What is this idle process and why is it using all available CPU time?

A. It is a kernel thread that executes architecture specific instructions to save energy when there is nothing else to execute. If you are curious, see "man runqueue" or take a look at the source code.

Q. Why is my network card not recognised?

A. Network interfaces supported by the original FreeBSD kernel are listed at:

http://www.freebsd.org/releases/8.3R/hardware.html#ETHERNET http://www.freebsd.org/releases/9.0R/hardware.html#ETHERNET

But if a NIC or its driver requires non-free blobs, Debian cannot include it in our DFSG-free kernel packages. There is no mechanism yet in GNU/kFreeBSD to load non-free blobs if they were shipped separately (e.g. from /lib/firmware/), so they are not available at all.

Drivers or NICs requiring non-free components include:

  • bce: Broadcom NetXtreme II BCM5706 1000Base-SX

  • bce: Broadcom NetXtreme II BCM5706 1000Base-T

  • bce: Broadcom NetXtreme II BCM5708 1000Base-SX

  • bce: Broadcom NetXtreme II BCM5708 1000Base-T

  • bce: Broadcom NetXtreme II BCM5709 1000Base-SX

  • bce: Broadcom NetXtreme II BCM5709 1000Base-T

  • bce: Broadcom NetXtreme II BCM5716 1000Base-T

  • bce: HP NC370F Multifunction Gigabit Server Adapter
  • bce: HP NC370i Multifunction Gigabit Server Adapter
  • bce: HP NC370T Multifunction Gigabit Server Adapter
  • bce: HP NC371i Multifunction Gigabit Server Adapter
  • bce: HP NC373F PCIe Multifunc Giga Server Adapter
  • bce: HP NC373i Multifunction Gigabit Server Adapter
  • bce: HP NC373m Multifunction Gigabit Server Adapter
  • bce: HP NC373T PCIe Multifunction Gig Server Adapter
  • bce: HP NC374m PCIe Multifunction Adapter
  • bce: HP NC380T PCIe DP Multifunc Gig Server Adapter
  • bce: HP NC382i DP Multifunction Gigabit Server Adapter
  • bce: HP NC382m DP 1GbE Multifunction BL-c Adapter
  • bce: HP NC382T PCIe DP Multifunction Gigabit Server Adapter
  • ce: Cronyx-Tau32-PCI serial adapter
  • cp: Cronyx-Tau-PCI serial adapter
  • ct: Cronyx Tau-ISA
  • cxgbe: Chelsio PE9000
  • cxgbe: Chelsio T302E
  • cxgbe: Chelsio T310E
  • cxgbe: Chelsio T320X
  • cxgbe: Chelsio T302X
  • cxgbe: Chelsio T320E
  • cxgbe: Chelsio T310X
  • cxgbe: Chelsio ?T3B10

  • cxgbe: Chelsio ?T3B20

  • cxgbe: Chelsio ?T3B02

  • cxgbe: Chelsio ?T3B04

  • cxgbe: Chelsio ?T3C10

  • cxgbe: Chelsio S320E-CR
  • cxgbe: Chelsio N320E-G2
  • cxgbe: Chelsio Terminator 4 FPGA
  • cxgbe: Chelsio T440-dbg
  • cxgbe: Chelsio T420-CR
  • cxgbe: Chelsio T422-CR
  • cxgbe: Chelsio T440-CR
  • cxgbe: Chelsio T420-BCH
  • cxgbe: Chelsio T440-BCH
  • cxgbe: Chelsio T440-CH
  • cxgbe: Chelsio T420-SO
  • cxgbe: Chelsio T420-CX
  • cxgbe: Chelsio T420-BT
  • cxgbe: Chelsio T404-BT
  • fatm: FORE PCA200E
  • fxp: Intel 82550 Pro/100 Ethernet
  • fxp: Intel 82550 Pro/100 Ethernet
  • fxp: Intel 82550 Pro/100 Ethernet
  • fxp: Intel 82551 Pro/100 Ethernet
  • fxp: Intel 82551 Pro/100 Ethernet
  • fxp: Intel 82551QM Pro/100 M Mobile Connection
  • fxp: Intel 82557/8/9 Pro/100 Ethernet
  • fxp: Intel 82557 Pro/100 Ethernet
  • fxp: Intel 82557 Pro/100 Ethernet
  • fxp: Intel 82557 Pro/100 Ethernet
  • fxp: Intel 82558 Pro/100 Ethernet
  • fxp: Intel 82558 Pro/100 Ethernet
  • fxp: Intel 82559ER Embedded 10/100 Ethernet
  • fxp: Intel 82559ER Pro/100 Ethernet
  • fxp: Intel 82559 PCI/CardBus Pro/100
  • fxp: Intel 82559 Pro/100 Ethernet
  • fxp: Intel 82559 Pro/100 Ethernet
  • fxp: Intel 82559 Pro/100 Ethernet
  • fxp: Intel 82559 Pro/100 Ethernet
  • fxp: Intel 82562EM/EX/GX Pro/100 Ethernet
  • fxp: Intel 82562ET/EZ/GT/GZ PRO/100 VE Ethernet
  • fxp: Intel 82562ET (ICH5/ICH5R) Pro/100 VE Ethernet
  • fxp: Intel 82562EZ (ICH6)
  • fxp: Intel 82562GX Pro/100 Ethernet
  • fxp: Intel 82801BA/CAM (ICH2/3) Pro/100 Ethernet
  • fxp: Intel 82801BA (D865) Pro/100 VE Ethernet
  • fxp: Intel 82801CAM (ICH3) Pro/100 Ethernet
  • fxp: Intel 82801CAM (ICH3) Pro/100 Ethernet
  • fxp: Intel 82801CAM (ICH3) Pro/100 Ethernet
  • fxp: Intel 82801CAM (ICH3) Pro/100 VE Ethernet
  • fxp: Intel 82801CAM (ICH3) Pro/100 VE Ethernet
  • fxp: Intel 82801CAM (ICH3) Pro/100 VM Ethernet
  • fxp: Intel 82801CAM (ICH3) Pro/100 VM Ethernet
  • fxp: Intel 82801CAM (ICH3) Pro/100 VM Ethernet
  • fxp: Intel 82801DB (ICH4) Pro/100 Ethernet
  • fxp: Intel 82801DB (ICH4) Pro/100 Ethernet
  • fxp: Intel 82801DB (ICH4) Pro/100 VE Ethernet
  • fxp: Intel 82801DB (ICH4) Pro/100 VE Ethernet
  • fxp: Intel 82801DB (ICH4) Pro/100 VM Ethernet
  • fxp: Intel 82801DB (ICH4) Pro/100 VM Ethernet
  • fxp: Intel 82801FBM (ICH6-M) Pro/100 VE Ethernet
  • fxp: Intel 82801GB (ICH7) 10/100 Ethernet
  • fxp: Intel Pro/100 946GZ (ICH7) Network Connection
  • fxp: Intel Pro/100 VE Network Connection
  • fxp: Intel Pro/100 VM Network Connection
  • sf: Adaptec ANA-62011 (rev 0) 10/100BaseTX
  • sf: Adaptec ANA-62011 (rev 1) 10/100BaseTX
  • sf: Adaptec ANA-62020 10/100BaseFX
  • sf: Adaptec ANA-62022 10/100BaseTX
  • sf: Adaptec ANA-62044 (rev 0) 10/100BaseTX
  • sf: Adaptec ANA-62044 (rev 1) 10/100BaseTX
  • sf: Adaptec ANA-69011 10/100BaseTX
  • sn: SMC91C90/91C92
  • sn: SMC91C94/91C96
  • sn: SMC91C95
  • sn: SMC91C100
  • sn: SMC91C100FD
  • sn: SMC91C110
  • ti: 3Com 3c985-SX Gigabit Ethernet
  • ti: Alteon AceNIC 1000baseSX Gigabit Ethernet
  • ti: Alteon AceNIC 1000baseT Gigabit Ethernet
  • ti: Farallon PN9000SX Gigabit Ethernet
  • ti: Netgear GA620 1000baseSX Gigabit Ethernet
  • ti: Netgear GA620 1000baseT Gigabit Ethernet
  • ti: Silicon Graphics Gigabit Ethernet
  • txp: 3Com 3cR990B-SRV Etherlink Server with 3XP Processor
  • txp: 3Com 3cR990B-TXM Etherlink with 3XP Processor
  • txp: 3Com 3cR990-SRV-95 Etherlink Server with 3XP Processor
  • txp: 3Com 3cR990-SRV-97 Etherlink Server with 3XP Processor
  • txp: 3Com 3cR990-TX-95 Etherlink with 3XP Processor
  • txp: 3Com 3cR990-TX-97 Etherlink with 3XP Processor

Please consider using a different NIC if possible; try to find one that is supported by a DFSG-free driver. Old PCI 100base-T or even Gigabit NICs are often cheap and very easy to find. They will likely work better and save you much trouble.

But if you are sure you want to build a custom kernel with non-free blobs built in, there are instructions at:

http://bugs.debian.org/642468#10

(You can use "apt-get source kfreebsd-9" to get the most recent kernel source, instead of the wget command line suggested there).

Q. Is anyone running this in production?

A: Debian GNU/kFreeBSD systems are used by some of its developers as their desktop/workstation, and even in some production environments as web servers, mail servers, file servers (ZFS with NFS or Samba or iSCSI [istgt]), wireless access points (hostapd) and more.

If you're using GNU/kFreeBSD in production for something interesting, mention it here!

Q. How stable is kFreeBSD?

A: The kernel of FreeBSD is generally very stable, and security issues requiring a restart are rare.

I'm using wheezy with the 9.0 kernel and ZFS on production servers. One mailserver reached 606 days' continuous uptime until it suffered hardware failure.

ZFS may be unstable on kfreebsd-i386, or on systems with insufficient RAM. 2GiB total system memory is enough for some workloads, but 4GiB is recommended. The optional 'deduplication' feature requires considerably more memory (probably at least 8GiB).

There have been problems in the past running GNU/kFreeBSD in some versions of VirtualBox. It seems perfectly stable on Xen and KVM however.

Q. Are there any benchmarks available?

GNU/kFreeBSD is sometimes featured in Phoronix articles and benchmarks, but proper configuration and tuning probably makes the most difference in any use case.

Benchmarks of the upcoming jessie release - performing as well as GNU/Linux in most of the benchmarks; UFS without softupdates is slower than ext4 however: http://www.phoronix.com/scan.php?page=news_item&px=MTg2MzA

Q. How do you support GPL-licensed file systems?

A: GPL-licensed or CDDL-licensed (e.g. ZFS) code is compiled into separate, loadable kernel modules; you should not use both at the same time because of their incompatible licenses.

In kfreebsd-9 and later, ext2fs was reimplemented with BSD-licensed code, therefore it can be used simultaneously with ZFS.

Q. The system clock is stuck! How do I change the 'clocksource'?

A. See output of sysctl kern.timecounter for available clock sources and use sysctl kern.hardware to see/override the default setting.

Many applications depend on a reliable clock source. Symptoms of a clock not ticking would be: output from date not changing, top hangs, ntpd starts but refuses connections from ntpq, ntpdate hangs, login prompt doesn't appear on the local consoles even though getty is running.

You can select a different clock source at boot time using a GRUB option such as "set kFreeBSD.kern.timecounter.hardware=i8254" doesn't work...

To disable a buggy ACPI clock, you can use a boot-time GRUB parameter "set kFreeBSD.debug.acpi.disabled=timer". The kernel will fall back to a different clock source such as TSC or i8254.

Q. The kernel doesn't wait long enough for disks to attach; fails to mount root filesystem

A. You can use GRUB parameters 'set kFreeBSD.kern.cam.scsi_delay=2000' for SCSI disks, or 'set kFreeBSD.kern.cam.boot_delay=60000' for others (such as USB, which are most likely to suffer this problem). This sets a maximum time in milliseconds to wait for the device given by 'vfs.root.mountfrom' to attach, before giving up.

Development questions

Q. Where can I check buildd logs for a particular package on kfreebsd-*?

A. At the usual place for almost all build logs: https://buildd.debian.org/status/

Q. I'm a Debian maintainer. Is there any machine running GNU/kFreeBSD I can have access to?

A. Yes, see http://io.debian.net/ and http://asdfasdf.debian.net/. All DDs automatically have an account.

Q. Do I have the option of which libc to use?

A. No.

Q. How should I detect kfreebsd in debian/rules?

A. If you really must do something differently on kfreebsd you can use

  • ifeq ($(DEB_HOST_ARCH_OS), kfreebsd)
    • ..
    endif

Q. How do I detect kfreebsd with preprocessor directives in a C program?

A. Take a look at the following truth table:

__FreeBSD_kernel__

__GLIBC__

__FreeBSD__

__FreeBSD_version

__GNU__

FreeBSD

Only in recent versions (DO NOT RELY ON IT!!)

No

Yes

801000

No

Debian GNU/kFreeBSD

Yes

Yes

No

No

No

Debian GNU/Hurd

No

Depends

No

No

Yes

Debian GNU/Linux

No

Depends

No

No

No

Q. Why was the choice made to use glibc?

A. Because otherwise far more packages would need patches to build on Debian GNU/kFreeBSD. All packages in Debian GNU/Linux are known to work fine with (e)glibc. So most of the work is in only one package, the libc. The no more active Debian GNU/NetBSD port tried to use the BSD libc, but not using the glibc was probably one of the reasons why it stalled.

Q. Are there any repositories for the non-free stuff that was taken out?

A. More information can be found from a bug report.

Q. What license is kFreeBSD released under?

A: The kernel is of course BSD-licensed. But remember that the port is based on GNU libc (LGPL), and many essential tools have GNU GPL or other licenses. Please refer to individual packages' copyright files.

Q. Are the kernel patches needed to make Debian GNU/kFreeBSD work given back to FreeBSD?

A. Yes, you can see the patches http://svn.debian.org/wsvn/glibc-bsd/trunk/kfreebsd-8/debian/patches/ but not all are accepted by upstream. Q2: Why? A2: Some of the patches see the "Status:" lines in the patches themselves.

Unanswered questions

Q. Can one run a Debian GNU/kFreeBSD chroot under Darwin?


CategoryPermalink