You booted to a cd and are trying to change root's password? You can't just use passwd since it's trying to write to the CD and it's not writeable. If you're trying to modify root's password on the system disk (/dev/dsk/c0t0d0s0 for example), you'll need to mount slice 0 and edit the shadow file.
Code:
# mount /dev/dsk/c0t0d0s0 /a
# cd /a/etc
# vi shadow
Delete the bit of garbage in field 2 and save the file. Then umount /a and reboot the system. Your password will be blank. Log in as root and set the password again.
Carl