Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Mar 2005 17:49:40 -0800 (PST)
From:      David Clear <>
Subject:   Re: Step-by-step instructions for MD_ROOT embedded, please?
Message-ID:  <>

Next in thread | Raw E-Mail | Index | Archive | Help

Here you go (found on the web):

1. Create a filesystem image:

# dd if=/dev/zero of=mdimage -bs=1024 count=4096
# mdconfig -a -t vnode -f mdimage -s 4096k -u 4
# disklabel -r -w md4 auto
# newfs /dev/md4c
# mount /dev/md4c /mnt
 . put stuff on it
# umount /mnt
# mdconfig -d -u 4

2. Make sure you have the kernel options:
options MD_ROOT
options MD_ROOT_SIZE=4096

...and rebuild.

3. As you said, compiling
/usr/src/release/write_mfs_in_kernel.c from
FreeBSD-4.11 with SBOFF set to 64K will work.  You'll
also need to #include <ufs/ufs/dinode.h> prior to

4. Set vfs.root.mountfrom to "ufs:md0" in

Works for me on 5.3-RELEASE.

Good luck.


Want to link to this message? Use this URL: <>