Hi naihe2010,
I don't know really what kind of use you want to do with it but, basically, in linux, you create file systems, not partitions. There are several types of fs you can create, ramfs, cramfs, tmpfs, squashfs, isofs but you also can create vfat and ext2.
First you have to create a space to be formatted as your example
Code:
dd if=/dev/zero of=image.dsk bs=1k count=18k
Then you need to format it:
Code:
mke2fs image.dsk # for an ext2 fs
mkisofs image.dsk # for a cd isofs
mksquashfs image.dsk # for a compressed read only fs
mkinitrd image.dsk # for an initial boot ram fs
mkfs.msdos image.dsk # for an msdos fs
Here, it will alert you that image.dsk is not a block device and you confirm for it to proceed.
Now, you only need to mount it with an special mount option:
Code:
mount -o loop image.dsk /mnt/<your-mount-point>
Now you can populate it with your files.
I don't know the purpose of the example you gave on bsd. If it is a boot device, there are other ways to create a bootable media. I can't say the differences because I don't know bsd.
Note. some of these file systems may need special packages, in special squashfs as they are not in the kernel tree yet.