#!/bin/sh -e

# Make bootable without DevFS
mknod $TARGET/dev/ubd0 b 98 0

chroot $TARGET /bin/sh -c 'cd /dev && ./MAKEDEV ubd'

cat <<EOF > $TARGET/etc/fstab
/dev/ubd0 / $fstype defaults 0 1
proc /proc proc defaults 0 0
EOF

if [ "$install_modules" = "yes" -a -d /usr/lib/uml/modules ]; then
    cp -R /usr/lib/uml/modules/* $TARGET/lib/modules
fi
