Tuesday, April 14, 2009

the /dev/socksys disappearing trick

For the past couple of months I’ve been manually creating /dev/socksys on my development virtual machine only for it to disappear when I reboot.

The reason for this is that /dev is now regarded as a virtual directory and is rebuilt by udev from scratch every time the system is rebooted.

The solution to this is to cp -R [device] /lib/udev/devices.

When you reboot you will find the device in /dev.

mknod /dev/socksys c 30 0
chmod 777 /dev/socksys
chmod +s /dev/socksys

cp -R /dev/socksys /lib/udev/devices

No comments: