Re: [patch] installer ufs initrd support (how to create a ufs filesystem as a normal user?)
On 07/07/2009, Thorsten Glaser <tg@mirbsd.de> wrote:
> Luca Favatella dixit:
>
>>This patch adds ufs initrd support.
>
> 4.2FFS, UFS2, or both?
In the attached second version of the patch, I explicated UFS2.
UFS1 works too, but I chose to introduce only UFS2.
(I'll use UFS2 in kfreebsd-i386 commit in next days/weeks.
I think it is not good to add a feature and not use it.)
See http://svn.debian.org/viewsvn/d-i?view=rev&revision=59261
> I would very much like to be able to install Debian GNU/kFreeBSD on
> 4.2FFS (aka UFS1) filesystems, not just UFS2.
This patch is only about initrd (a.k.a. mfsroot).
I think (I didn't test) you can already install Debian GNU/kFreeBSD on
UFS1 with current hacked sysinstall
(http://glibc-bsd.alioth.debian.org/doc/installing.html).
> bye,
> //mirabilos
Thanks,
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.ufs2
+ fs=`mktemp` ; \
+ dd if=/dev/zero of=$${fs} bs=1M count=16 ; \
+ md=`mdconfig -a -t vnode -f $${fs}` ; \
+ mkfs.ufs -O2 /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); \
;; \
+ ufs2) \
+ $(mkfs.ufs2) $(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 ufs2 initrd support. Thanks to Robert Millan.
-- Frans Pop <fjp@debian.org> Sat, 13 Jun 2009 16:35:46 +0200
Reply to: