/dev/sdb: No such file or directory (but /dev/sdb1 etc. exists)
On most non-embedded Linux installations, and many embedded installations, /dev
is on a RAM-backed filesystem, not on the root partition. Most current installations have /dev
as a tmpfs filesystem, with the udev daemon creating entries when notified by the kernel that some hardware is available. Recent kernel offer the possibility of having /dev
mounted as the devtmpfs filesystem, which is directly populated by the kernel.
I think Ubuntu 12.10 still uses udev. Either way, /dev
should not be on the root partition (as shown by the output of df /dev
), it should be on its own filesystem. Did you accidentally unmount /dev
?
The first thing you should try is to reboot: this should mount /dev
properly. Before that, check that you haven't added an entry for /dev
in /etc/fstab
(there should be no line with /dev
in the second column).
Even with /dev
on the root partition, you can create /dev/sdb
by running
cd /dev
sudo MAKEDEV sdb
But not having /dev
managed dynamically isn't a stable configuration, you'll run into similar problems for a lot of other hardware.