Installing and dual-booting Debian GNU/kFreeBSD

Now that Debian GNU/kFreeBSD is an official part of Debian, it is time to play around with the new toy. But in order to do such feat there are several issues that have to be resolved on the path to success. Assuming you use Debian GNU/Linux with GRUB2 (as seen in testing and unstable these days) and have a spare partition or two you can try it out on live hardware instead of an emulator.

Installing Debian GNU/kFreeBSD

  1. Use the Debian-Installer (D-I) monolithic images available at http://d-i.debian.org/daily-images/, and make a network install.
  2. The installer image uses GRUB2 instead of syslinux (for obvious reasons), thus you cannot set debconf priority before booting into D-I.
  3. Because Debian GNU/kFreeBSD is broken in testing as of this writing, you’ll need necessarily to set debconf priority to medium in D-I in order to install unstable a.k.a. Sid.
  4. Setting debconf priority is easy. The first installer prompt will ask for the language you want to use for installation. Don’t select a language, instead tab to the “Go Back” button, exit to D-I’s main menu, set debconf priority to medium and start again from the top.
  5. When selecting a mirror, select unstable as the distribution to install.
  6. When partitioning, you may create or use an already existing primary or logical partition, but the FreeBSD kernel will be happier if you use a primary partition.
  7. Do not, I repeat, do not install software. Skip this step. Aptitude is foobar today and perhaps for sometime yet. Read the report to learn how a bug report is written. Use apt-get by hand instead.
  8. Finish the install without installing GRUB2, The package in Sid is somewhat broken (or bug fixed, whichever you choose to believe) and refuses to install on UFS filesystems and will insist on installing on the MBR. Skip it. We will be using the GUB2 installed in the MBR by our Debian GNU/Linux install.

Dual booting Debian GNU/kFreeBSD

This is where all the advice on creating a boot entry for GRUB2 out there in the intarwebs is wrong. Why? Because kFreeBSD has been repackaged to match the packaging of Linux. So in order to boot Debian GNU/kFreeBSD from our main GRUB2 install, we need to add the following to /etc/grub.d/40_custom:

menuentry "Debian GNU/kFreeBSD" {
    insmod ufs2
    set root=(hd0,3)
    kfreebsd /boot/kfreebsd-8-0-1-686.gz
    #kfreebsd_module_elf /lib/modules/8.0-1-686/acpi.ko #not necessary, statically linked
    set kFreeBSD.vfs.root.mountfrom=ufs:/dev/ad0s3
    set kFreeBSD.vfs.root.mountfrom.options=rw

}

And run update-grub. Obviously that’s the set up in my box and it won’t work as is in yours. If you can’t find that information on your own, oh well.

Advertisements

What are Debian devs smoking? I want some, yeah!

This is just too good even for the The Daily WTF

# aptitude install -R devscripts
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Reading extended state information... Done
Initializing package states... Done       
Reading task descriptions... Done  
The following NEW packages will be installed:
  devscripts 
The following packages are RECOMMENDED but will NOT be installed:
  at bsd-mailx bzr chimera2 conkeror cvs cvsnt dctrl-tools debian-keyring 
  debian-maintainers dillo dput dupload edbrowse elinks elinks-lite elvis 
  elvis-console epiphany-browser equivs galeon git-core heirloom-mailx 
  iceape-browser iceweasel kazehakase konqueror libauthen-sasl-perl 
  libcrypt-ssleay-perl libparse-debcontrol-perl libsoap-lite-perl 
  libterm-size-perl liburi-perl libwww-perl libyaml-syck-perl links links2 
  lintian lsb-release lynx-cur mailutils mercurial midori netrik netsurf 
  netsurf-gtk netsurf-linuxfb netsurf-sdl netsurf-vnc openssh-client 
  patchutils strace subversion svk tla unzip w3m wdiff xemacs21-mule 
  xemacs21-mule-canna-wnn xemacs21-nomule 
0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 593kB of archives. After unpacking 1745kB will be used.
Writing extended state information... Done
Get:1 http://ftp.us.debian.org sid/main devscripts 2.10.59 [593kB]

WTF?