Friday, July 01, 2005

NetBSD mounting CD-ROMs

Another post to spare me memorizing an entry in a config-file. If you want to mount a CD-ROM on NetBSD, you'll have to either memorize the command to do so or add an entry to /etc/fstab. The entry looks like this (provided your CD-ROM drive is at cd0a:
/dev/cd0a /cdrom cd9660 ro,noauto 0 0
The /cdrom directory has to exist for this to work, obviously. If you want to mount a CD-ROM, simply use mount /cdrom after inserting a CD in the drive.
A mount /dev/cd0a /cdrom won't do, the OS wants to know about the filesystem (and I thought the drive was broken); it complains about missing super-blocks among other things.