20090806

Status of d-i on kfreebsd

I posted a quick status report about d-i on GNU/kFreeBSD.
It is already outdated, but better than nothing.

20090730

kFreeBSD progress report week 10

Read the progress report of week 10 of the project "d-i support for GNU/kFreeBSD".

If you have some spare time, please work on Parted UFS partitioning.
The Debian IRC development channels for this should be #debian-boot and/or #debian-kbsd.


Update 20090803:
Please read my email with links to iso images to test.

Update 20090804:
GNU Parted no more segfaults (in that point, at least).
Updated current help needed.

Update 20090806:
Fixed a (big) typo (week 8 -> week 10).

20090728

HOWTO build parted on Debian GNU/kFreeBSD

I assume you have Debian GNU/kFreeBSD i386 installed.
If you don't, please refer to the install notes.

Ensure that in your "/etc/apt/sources.list" you have these lines
deb http://ftp.debian.org/debian unstable main
deb-src http://ftp.debian.org/debian unstable main

Create a working dir.
$ mkdir sandbox

Download the sources of the Parted Debian package. From "sandbox"
$ apt-get source parted
This will create a "parted-1.8.8.git.2009.07.19" dir (and others files).

Recursively download all the patches in d-i/people/slackydeb/kfreebsd/d-i/parted/unstable/.

Copy all the patches (without the dir structure) to the "parted-1.8.8.git.2009.07.19" dir.

From "parted-1.8.8.git.2009.07.19"
* apply all the patches
$ for x in *.diff; do patch -p1 < $x; done
* regenerate the "configure" script
$ autoconf
* build the package
$ dpkg-buildpackage -tc

This will create some files; the most important are *.deb.
They are useful to test parted in a normal system, i.e. outside of d-i.
To install them
$ dpkg -i *.deb

WARNING: parted could destroy the content of your disk.
If unsure, please execute parted only in a GNU/kFreeBSD installation on a virtual machine, mounting only virtual hard disks.


Update 20090804:
Update instructions and add warning.

20090720

How you can help to port debian-installer on GNU/kFreeBSD

If you'd like to help porting debian-installer (d-i) on GNU/kFreeBSD, here you can find some tasks to work on.

Public development channels: #debian-boot and #debian-kbsd on irc.debian.org

Please consider that the progress report of week 8 of the project "d-i support for GNU/kFreeBSD" is a bit outdated, as you can read from the other emails in its thread.
I prepared an updated mini.iso to let you test its current status (note that syslogd is working).

If you'd like to hack on d-i itself, please read how to build d-i monolithic mini.iso on Debian GNU/kFreeBSD.

[DONE] Create a udeb for freebsd-net-tools

This work is needed because of being the short term solution to network configuration in the kfreebsd d-i port.

Port BusyBox "ip" and "route" applets on GNU/kFreeBSD

This work is needed because of being the long term solution to network configuration in the kfreebsd d-i port.
You can work on this hacking only the deb package, i.e. no need for building d-i.
Please read how to build BusyBox package on Debian GNU/kFreeBSD.

Port libparted1.8-udeb on GNU/kFreeBSD

This work should be needed for disk partitioning.
Perhaps the patches I wrote weeks ago are useful.


Update 20090722:
Development is very fast these days, so it makes no sense to update the blog to keep trak of the progress.
The best way to help at the moment is to "port libparted1.8-udeb on GNU/kFreeBSD".

HOWTO build debian-installer monolithic mini.iso on Debian GNU/kFreeBSD

I assume you are able to build BusyBox package.
If you don't, please refer to this post.

Create a working dir.
$ mkdir sandbox

Download the sources of the kfreebsd debian-installer (d-i) branch. From "sandbox"
$ svn co svn://svn.debian.org/svn/d-i/branches/d-i/kfreebsd
If you already downloaded them, simply update them. From "sandbox/kfreebsd"
$ svn update

Build kernel and modules udebs. From "packages/kernel/kfreebsd-kernel-di-i386"
$ ./debian/rules
$ dpkg-buildpackage -tc
This will create (among other files)
* kernel-image-7.2-1-486-di_0.1_kfreebsd-i386.udeb
* acpi-modules-7.2-1-486-di_0.1_kfreebsd-i386.udeb
Copy them into "installer/build/localudebs".

Build BusyBox (as described in the link above).
Copy the .udeb into "installer/build/localudebs".

Build rootskel udeb. From "packages/rootskel"
$ dpkg-buildpackage -tc
This will create (among others files) rootskel_1.80_kfreebsd-i386.udeb.
Copy it into "installer/build/localudebs".

Build netcfg udeb. From "packages/netcfg"
$ dpkg-buildpackage -tc
This will create (among others files) netcfg_1.50_kfreebsd-i386.udeb.
Copy it into "installer/build/localudebs".

Download
* dhcp3-client-udeb_3.1.2p1-1_kfreebsd-i386.udeb
* freebsd-net-tools-udeb_7.2-5_kfreebsd-i386.udeb
Copy them into "installer/build/localudebs".

Create the mini.iso. From "installer/build/"
$ su
$ make all_clean && make reallyclean && make build_monolithic

Test the resulting mini.iso. From "installer/build/dest/monolithic"
$ qemu -boot d -cdrom mini.iso


Update 20090723:
Reflect current status.

Update 20090723 2:
Link to more up to date udebs.

Update 20090803:
Link udebs of the progress report of week 10.

HOWTO build BusyBox package on Debian GNU/kFreeBSD

I assume you have Debian GNU/kFreeBSD i386 installed.
If you don't, please refer to the install notes.

Ensure that in your "/etc/apt/sources.list" you have these lines
deb http://ftp.debian.org/debian unstable main
deb-src http://ftp.debian.org/debian unstable main

Create a working dir.
$ mkdir sandbox

Download the sources of the BusyBox Debian package. From "sandbox"
$ apt-get source busybox
This will create a "busybox-1.13.3" dir (and others files).

Recursively download all the patches in d-i/people/slackydeb/kfreebsd/busybox/1.13/debian/ somewhere.

Copy all the patches (without the dir structure) to the "busybox-1.13.3" dir.

Apply all the patches. From "busybox-1.13.3"
$ for x in *.diff; do patch -p1 < $x; done

Build deb and static with the same config of udeb. From "busybox-1.13.3/debian/config"
$ cp udeb deb
$ cp udeb static

Build the package. From "busybox-1.13.3"
$ dpkg-buildpackage -tc

This will create some files; the most important are
* busybox_1.13.3-1_kfreebsd-i386.deb
* busybox-udeb_1.13.3-1_kfreebsd-i386.udeb

The udeb is useful in debian-installer (d-i).

The deb is useful to test BusyBox in a normal system, i.e. outside of d-i.
To install it
$ dpkg -i busybox_1.13.3-1_kfreebsd-i386.deb
To execute BusyBox binaries (instead of the normal one), call them as the first argument of "busybox"; e.g. to call BusyBox cat
$ busybox cat my_text_file.txt # NOT simply "cat"

20090717

kFreeBSD progress report week 8

Read the progress report of week 8 of the project "d-i support for GNU/kFreeBSD".

If you have some spare time, please port BusyBox "ip" and "route" on Debian GNU/kFreeBSD.
I think that the Debian IRC development channels for these should be #debian-boot and/or #debian-kbsd.


Update 20090720:
Linked the final progress report instead of a draft.
Updated the list of BusyBox applets.

Update 2 20090720:
Removed doc about building BusyBox because it is now a new post.

Update 3 20090720:
Removed doc about building debian-installer because it is now a new post.

20090622

HOWTO svn merge trunk to a branch

To sync d-i kfreebsd branch to d-i trunk, e.g. r59038, from a clean working copy of d-i kfreebsd branch (.) run
$ svn merge --dry-run -r 59022:59038 svn+ssh://user@svn.d-i.alioth.debian.org/svn/d-i/trunk .
--dry-run "try operation but make no changes".
If all is ok, run the same command without --dry-run and then
$ svn ci -m "Sync to r59038."

kFreeBSD progress report week 4

Read the progress report of week 4 of the project "d-i support for GNU/kFreeBSD".

20090617

d-i kfreebsd branch setup

I tried to merge debian installer (d-i) trunk in the kfreebsd branch, without success.
My mentor helped me, cleaning the kfreebsd branch and making it equal to trunk.
Then I merged the changes from the old (r47541) kfreebsd branch [0].
Some patches from [1] applied cleanly, i.e. [kernel modules] and [kernel others]. You can retrieve the 2 refreshed patches from [installer] and [rootskel].

Now I have to commit my local (little) changes, needed to create a (not working at the moment) kfreebsd d-i image.

You can follow the d-i kfreebsd branch with
svn co svn://svn.debian.org/d-i/branches/d-i/kfreebsd/
or from a Web interface at
http://svn.debian.org/viewsvn/d-i/branches/d-i/kfreebsd/


[0] http://slackydeb.blogspot.com/2009/04/previous-attempts-to-port-d-i-to.html
[1] http://slackydeb.blogspot.com/2009/04/previous-attempts-to-port-d-i-to_27.html

[kernel modules] http://slackydeb.altervista.org/files/debian_gnu_kfreebsd/20090427_d-i_kfreebsd_branch/d-i_kfreebsd_branch.packages.kernel.modules.diff
[kernel others] http://slackydeb.altervista.org/files/debian_gnu_kfreebsd/20090427_d-i_kfreebsd_branch/d-i_kfreebsd_branch.packages.kernel.others.diff

[installer] http://slackydeb.altervista.org/files/debian_gnu_kfreebsd/20090617_d-i_kfreebsd_branch/d-i_kfreebsd_branch.installer.diff
[rootskel] http://slackydeb.altervista.org/files/debian_gnu_kfreebsd/20090617_d-i_kfreebsd_branch/d-i_kfreebsd_branch.packages.rootskel.diff

20090605

kFreeBSD progress report week 2

Instead of copying and pasting it here, I prefer to link it. See:
http://lists.alioth.debian.org/pipermail/soc-coordination/2009-June/000584.html

Porting parted on GNU/kFreeBSD

As you can see at [0], partconf-find-partitions and partconf-mkfstab udebs (from partconf source package) are needed (among others).

partconf source package doesn't build because of the lack of libparted1.8-dev (from parted source package).

parted source package doesn't build.
It has a kFreeBSD patch, but it is disabled, and it doens't apply because it is referred to an old version of parted (1.7 as far as I know).

I created some trivial patches:
-[build_deps]
-[configure.ac] (from the existing kFreeBSD patch)
-[disable_devmapper] (hackish)
I got an [error], that I think is simple for more experienced developers than me.

Now I switch trying to produce a debian-installer image, even not fully functional but at least that boots.


[0] http://slackydeb.blogspot.com/2009/04/analysis-of-differences-between.html

[build_deps] http://slackydeb.altervista.org/files/debian_gnu_kfreebsd/parted/20090605_1013_parted.build_deps.diff
[configure.ac] http://slackydeb.altervista.org/files/debian_gnu_kfreebsd/parted/20090605_1043_parted.configure.ac.supported_os.diff
[disable_devmapper] http://slackydeb.altervista.org/files/debian_gnu_kfreebsd/parted/20090605_1049_parted.rules.disable_devmapper.diff

[error] http://slackydeb.altervista.org/files/debian_gnu_kfreebsd/parted/20090605_1130_parted.build_error.txt

20090602

busybox mount builds on GNU/kFreeBSD

busybox "mount" builds (I think it does not work...) on GNU/kFreeBSD with a very hackish patch [0] (Update 20090603: obsolete).

Linux "mount" has one more explicit parameter (i.e. "source") than the kFreeBSD one, as you can read from their man pages ([1] and [2]).
I should try to use nmount on kFreeBSD, using "mount" in freebsd-utils as a reference.


[0] http://slackydeb.altervista.org/files/debian_gnu_kfreebsd/busybox/mount/20090602_2218_busybox.mount.diff
[1] http://www.freebsd.org/cgi/man.cgi?query=mount&apropos=0&sektion=2&manpath=FreeBSD+7.2-RELEASE&format=html
[2] http://www.kernel.org/doc/man-pages/online/pages/man2/mount.2.html



Update 20090603:
I updated the patch:
-using nmount as in freebsd-utils
-moving platform specific code into platform.h
Now I have to test busybox "mount" with this patch.

Get the patch from
http://slackydeb.altervista.org/files/debian_gnu_kfreebsd/busybox/mount/20090603_0028_busybox.mount.diff



Update 20090604:
I updated the patch to export a useful function outside the file to "help" umount.
I enabled "umount" and made it building.
I tested busybox "mount" and "umount" with these patches (with a msdosfs filesystem).

Get the patches from
http://slackydeb.altervista.org/files/debian_gnu_kfreebsd/busybox/mount/20090604_0044_busybox.mount.hack_to_help_umout.diff
http://slackydeb.altervista.org/files/debian_gnu_kfreebsd/busybox/mount/20090604_0045_busybox.umount.diff

20090529

busybox status on GNU/kFreeBSD

To build busybox on GNU/kFreeBSD you have to apply some patches and disable some config options.


Patches to apply:
-applied upstream
-to build with CONFIG_INIT enabled (a bit hackish and to test)
-to build free (waiting for "struct sysinfo" and "sysinfo(struct sysinfo*)")
-domainname workaround
-SO_BINDTODEVICE workaround
-to build with CONFIG_SWAPONOFF enabled
-part 1
-part 2 (waiting for "struct sysinfo" and "sysinfo(struct sysinfo*)")
-to build with CONFIG_MOUNT and CONFIG_UMOUNT enabled (a bit hackish)


Config options to disable:
-as commented text file
-as patch

Please tell me if you manage to build busybox on GNU/kFreeBSD with some of these config options enabled.



Update 20090529:
CONFIG_CTTYHACK builds without further patches needed.

Update 2 20090529:
CONFIG_SWAPONOFF builds with linked patch.

Update 20090604:
Link CONFIG_MOUNT and CONFIG_UMOUNT related patches.

Update 2 20090604:
Consider that (now) RB_HALT_SYSTEM and RB_POWER_OFF is defined on Debian GNU/kFreeBSD, and link an updated patch.
Split and comment some patches in the list.

Update 20090714:
I copied all these patches to d-i svn, and I'm cleaning them.
Please use those in d-i svn because in the next weeks I hope to fix syslog there.

20090527

busybox: failed test and other config options enabled on GNU/kFreeBSD

On Monday 24 I tried to test busybox init (with CONFIG_INIT and CONFIG_FEATURE_USE_INITTAB), without success.

I created a virtual machine with Debian GNU/kFreeBSD on it.
I installed the busybox deb I had built.
I substituted /sbin/init with a symlink to busybox.
I executed on the shell "init 6" (a.k.a. "reboot"), obtaining a usage message from busybox init; pressing Ctrl+C returns to normal shell.
This is because "BusyBox init doesn't support multiple runlevels" (from busybox man page).


On Wednesday 27 I tried to enable more applets.
Some of them built without patches needed; they are:
-CONFIG_FEATURE_INIT_SCTTY
-CONFIG_FEATURE_INIT_SYSLOG
-CONFIG_FEATURE_EXTRA_QUIET
-CONFIG_HALT
Instead CONFIG_MOUNT and CONFIG_PIVOT_ROOT seem to need a lot of work...

20090526

Big picture: "Community Bonding Period" end, coding period start

As you can see at [timeline], on May 23 the "Community Bonding Period" ended, and the coding period started.

During the "Community Bonding Period", I played a bit with the boot sequence on GNU/kFreeBSD by updating [ging]. I didn't manage to make it completing the boot sequence, but it was useful.
Then I evaluated the work to do on debian-installer (a.k.a. d-i); i.e. I
-tracked previous attempts to port d-i to GNU/kFreeBSD
-played a bit with the image creation process of d-i on GNU/Linux
-looked at which udebs were missing on GNU/kFreeBSD
Then I started to port busybox (one of the udebs), producing some patches and getting some of them merged upstream.

At the moment I'm trying to build busybox enabling all its applets useful to d-i(at least a dozen more), quickly testing what builds.

Finished the work on busybox, I'll have to port all othe useful udebs.


[timeline]
http://socghop.appspot.com/document/show/program/google/gsoc2009/timeline

[ging]
http://glibc-bsd.alioth.debian.org/ging/

20090521

busybox builds with "CONFIG_FEATURE_USE_INITTAB=y" on GNU/kFreeBSD (no patch needed)

busybox builds with "CONFIG_FEATURE_USE_INITTAB=y" on GNU/kFreeBSD without further patches needed :).

busybox builds with "CONFIG_INIT=y" on GNU/kFreeBSD

I managed to build busybox on GNU/kFreeBSD with "CONFIG_INIT=y".
I couldn't test the binary because I don't know how to test it...


Here is the patch:
http://slackydeb.altervista.org/files/debian_gnu_kfreebsd/busybox/config_init/20090521_1958_busybox.config_init.diff

(old version of the patch)

20090519

free in busybox working on GNU/kFreeBSD

I managed to get free in busybox working on GNU/kFreeBSD, but heavily copying and pasting code from the procps package. The resulting free implementation is not so tiny...
I quickly tested it (busybox free), and its output looks ok.

Get the patch at:
http://slackydeb.altervista.org/files/debian_gnu_kfreebsd/busybox/free/20090519_2342_busybox.diff

20090515

busybox splitted patches

I splitted (and modified) the previous busybox patch.

The patches not sent upstream are [0] and [1].

To build busybox on Debian GNU/kFreeBSD you need:
-applying the 2 patches linked in this post
-applying the 2 patches sent upstream
-copying the "udeb" config also to "deb" and "static" ones


[0] http://slackydeb.altervista.org/files/debian_gnu_kfreebsd/busybox/20090515/20090514_2011_busybox.debian.config.diff
[1] http://slackydeb.altervista.org/files/debian_gnu_kfreebsd/busybox/20090515/20090515_1739_busybox.debian.source.diff

2 little porting fixes sent to busybox upstream

See the [request] email.

The patches I sent are:
20090515_1734_busybox.upstream.iuclc.diff (see [upstream reply] at the old version of the patch)
20090515_1618_busybox.upstream.domainname.diff (see [upstream reply] at the old version of the patch)


[request] http://lists.busybox.net/pipermail/busybox/2009-May/069323.html
[upstream reply] http://lists.busybox.net/pipermail/busybox/2009-May/069324.html


Update 20090519: sent patches generated with git, at
http://lists.busybox.net/pipermail/busybox/2009-May/069363.html


Update 2 20090519: patches applied with some edits; see
http://lists.busybox.net/pipermail/busybox/2009-May/069372.html
http://git.busybox.net/busybox/commit/?id=5a49d284a6a9f6cf2076f23561f95aebdfd44592

20090514

busybox udeb builds on GNU/kFreeBSD (in a hackish way)

I managed to build the busybox udeb on GNU/kFreeBSD in a hackish way.

See the patch at:
http://slackydeb.altervista.org/files/debian_gnu_kfreebsd/busybox/20090514_2011_busybox.diff

20090508

Targeting busybox on GNU/kFreeBSD

Busybox shouldn't be Linux-specific [0].
At the moment it doesn't build on GNU/kFreeBSD [1].
There were previous porting efforts [2][3].

I'm trying to make it building [4].
I am only considering the "udeb" config (busybox-1.13.3/debian/config/udeb).
At the moment I am having problems on libbb, and it seems to me that disabling more applets is unuseful to skip this error.
Here [5] is the build log.


[0] http://www.busybox.net/downloads/README
[1] http://buildd.debian-ports.org/status/package.php?p=busybox
[2] http://glibc-bsd.alioth.debian.org/patches/
[3] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=323670
[4] http://slackydeb.altervista.org/files/debian_gnu_kfreebsd/busybox/20090508_1659_busybox.diff
[5] http://slackydeb.altervista.org/files/debian_gnu_kfreebsd/busybox/20090508_1734_busybox_build_log.txt

20090430

Analysis of the differences between GNU/Linux and GNU/kFreeBSD on the .udeb packages

I am commenting the importance of a package considering:
installer/build/pkg-lists/{base,standard-udebs}
installer/build/pkg-lists/monolithic/{common,i386.cfg}

Useful commands:
$ cd installer/build/
$ grep PACKAGE_NAME pkg-lists/{base,standard-udebs} pkg-lists/monolithic/{common,i386.cfg}

See the analysis status.

20090429

installer/build/dest/netboot/mini.iso as an installation method

I managed to install Debian GNU/Linux on qemu using mini.iso.
And this d-i debconf6 paper deals with mini.iso as one of the normal installation methods.
It is interesting that the creation of this CD image does not involve debian-cd or similar: great!

Examining installer/build/dest/netboot/mini.iso and its initrd

$ mount -o loop mini.iso /media/test
$ ls /media/test
$ cd ~/tmp
$ cp /media/test/initrd.gz .
$ gunzip initrd.gz
$ cpio -id < initrd

References:
http://fedoraforum.org/forum/showthread.php?t=114819

20090428

.udeb packages already on GNU/kFreeBSD

My script to view the .udeb packages that are already available on GNU/kFreeBSD, compared to GNU/Linux:
missing_udeb_packages.sh (main script)
udeb_packages.sh (aux script; put this in the same folder of the previous one)

How to use them:
$ sh missing_udeb_packages.sh > missing_udeb_packages.txt

This is the output I got:
20090428_1300_missing_udeb_packages.txt

Image creation process of d-i on GNU/Linux

Go to installer/build. Look at the instructions in the README. Then:
$ fakeroot make all_build

20090427

Previous attempts to port d-i to GNU/kFreeBSD: splitted patches

I splitted in 5 small patches the previous attempts to port d-i to GNU/kFreeBSD in d-i SVN. I removed some small changes because GNU/kFreeBSD is now in the archive.

d-i_kfreebsd_branch.installer.diff
d-i_kfreebsd_branch.packages.kernel.modules.diff
d-i_kfreebsd_branch.packages.kernel.others.diff
d-i_kfreebsd_branch.packages.partman.diff (it looks like this is wrong, it seems to revert one of the last changes, instead of doing GNU/kFreeBSD specific stuff)
d-i_kfreebsd_branch.packages.rootskel.diff

Previous attempts to port d-i to GNU/kFreeBSD

Previous attempts to port d-i to GNU/kFreeBSD in d-i SVN:
svn diff svn://svn.debian.org/d-i/trunk@47541 svn://svn.debian.org/d-i/branches/d-i/kfreebsd@47541 > d-i_kfreebsd_branch.diff

20090421

Feed of posts with a tag

The feed of the posts with the "gsoc" tag:
http://slackydeb.blogspot.com/feeds/posts/default/-/gsoc

gsoc 2009

I am a selected student for Google Summer of Code 2009 with the project "Debian-Installer Support for GNU/kFreeBSD".
See http://lists.alioth.debian.org/pipermail/soc-coordination/2009-April/000564.html

Test

Test.