home | tech | misc | code | bookmarks (broken) | contact | README

# NetBSD troubleshooting

## Error Device not configured when mounting partition

When you try to mount a partition you may get an error like Device not configured. cat'ing the partition will also not work:

# cat /dev/wd0k
cat: /dev/wd0k: Device not configured


The reasons can be totally different. If you installed a system in after NetBSD, in this computer, you probably forgot to update the disklabel(5). You can view partitions with the mbrlabel /dev/wd0 command, but you can't view them with disklabel /dev/wd0. NetBSD looks up information about partitions in its disklabel, not mbrlabel. So, all you have to do is to manually update your disklabel with:

# mbrlabel -w wd0


This link helped me with this, although the problem the guy had was different.

## tap device being created after the bridge that it should be attached to

You might have a computer with a tap(4) device and you might also want to attach it to a bridge(4) device (like in a Xen server environment.

When creating configuration files for the tap and bridge devices (the /etc/ifconfig.* files, you might achieve a configuration like the following:

# cat /etc/ifconfig.bridge0
create
!brconfig $int add tap0 up # cat /etc/ifconfig.tap0 inet 10.0.0.1 netmask 0xffffff00 up  But that is not correct. It will create bridge0 before tap0, and it will try to attach a device (tap0) that doesn't exist yet. Instead, just create the bridge and make the attachment in the tap0 configuration file: # cat /etc/ifconfig.bridge0 create # cat /etc/ifconfig.tap0 inet 10.0.0.1 netmask 0xffffff00 up !brconfig bridge0 add$int up


This entry in NetBSD mail list helped me to solve this simple problem.

## diocwdinfo: read-only file system when setting a disklabel on a cgd device

It isn't very clear for me the cause of this problem, but I was trying to setup a cgd device on the first partition on a secondary HDD in my laptop. After I set the first partition to an ordinary filesystem and let cgd on a second one, it worked fine. Maybe there are some problems setting a cgd device on the beginning of the HDD? If you have an idea about that, please, let me know.