This patch adds ufs initrd support. It was in the previous d-i kfreebsd branch, so thanks to Robert Millan.
This code has the bad thing that mkfs.ufs must be executed as root, and I don't know how to create a ufs filesystem on kfreebsd without being root. Comments on how to create a ufs filesystem as a normal user? I use this on kfreebsd-i386. Cheers, Luca Favatella
Index: build/Makefile =================================================================== --- build/Makefile (.../trunk/installer) (revision 59247) +++ build/Makefile (.../branches/d-i/kfreebsd/installer) (revision 59256) @@ -119,6 +119,18 @@ (cd $(TREE) && find . | cpio --quiet -o -H newc) > endef +define mkfs.ufs + fs=`mktemp` ; \ + dd if=/dev/zero of=$${fs} bs=1M count=16 ; \ + md=`mdconfig -a -t vnode -f $${fs}` ; \ + mkfs.ufs /dev/$${md} ; \ + mnt=`mktemp -d` ; mount /dev/$${md} $${mnt} ; \ + cp -a $(TREE)/* $${mnt}/ ; \ + umount $${mnt} ; rmdir $${mnt} ; \ + mdconfig -d -u $${md} ; \ + mv $${fs} +endef + define e2fsck e2fsck -fy endef @@ -610,6 +622,10 @@ jffs2) \ $(mkjffs2) $(TEMP_INITRD); \ ;; \ + ufs) \ + $(mkfs.ufs) $(TEMP)/initrd; \ + gzip -v9f $(TEMP)/initrd; \ + ;; \ *) \ echo "Unsupported filesystem type"; \ exit 1 ;; \ Index: debian/changelog =================================================================== --- debian/changelog (.../trunk/installer) (revision 59247) +++ debian/changelog (.../branches/d-i/kfreebsd/installer) (revision 59256) @@ -76,6 +76,7 @@ [ Luca Favatella ] * Handle libc0.1 (GNU/kFreeBSD) and libc0.3 (GNU/Hurd) as libc6/libc6.1. + * Add ufs initrd support. Thanks to Robert Millan. -- Frans Pop <f...@debian.org> Sat, 13 Jun 2009 16:35:46 +0200