neb-cd512 - Recalulate a disklabel to be in 512 bytes/sector format


neb-cd512 device


neb-cd512 is specifically designed for NetBSD. Due to some limitations in the system, FFS filesystems will not work on disk layouts other than 512 bytes/sector. It is not possible to access an FFS filesystem on media layouted in other units (e.g. CD-ROM, 2048 b/s). neb-cd512 recalculates a disklabel of a non-512-medium to be in 512 b/s format. The purpose of it is the possibility to access CDs/DVDs with FFS or FFS inside cgd(4) filesystems.


Show usage information


neb-cd512 cd0

A slightly more complex example - Creating a CDROM with FFS filesystem:

# dd if=/dev/zero of=cd.img bs=1m count=700
# vnconfig vnd0 cd.img
# disklabel -e -I vnd0

# mount /dev/vnd0a /mnt

# umount /mnt
# vnconfig -u vnd0

# cdrecord -v dev=15,1,0 speed=10 cd.img

Now, when inserting this CD again, use neb-cd512:

# neb-cd512 cd0
# mount /dev/cd0a /mnt

Use a cgd(4) inside the vnd(4), and you have very secure removable media.


Florian Stoehr (


neb-cd512 is distributed under the terms of the BSD license.

It contains code that is Copyright (c) 1991, 1993 The Regents of the University of California. All rights reserved.


No known bugs. If you find any, please send them to me.