I was trying to add a swap partition in my secondary drive, I created the partition space with fdisk and when running mkswap I was greeted with an error:
$ sudo mkswap -c /dev/sdb2
/dev/sdb2: No such file or directory
In fact the device doesn't exist:
$ ls /dev/sda*
/dev/sda /dev/sda1 /dev/sda2 /dev/sda5
$ ls /dev/sdb*
/dev/sdb /dev/sdb1
fdisk confirms me that the partition exists:
$ sudo fdisk /dev/sdb
Command (m for help): p
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 2048 419432447 209715200 83 Linux
/dev/sdb2 419432448 429918207 5242880 82 Linux swap / Solaris
I'm running Ubuntu 11.10, I thought that udev would manage the devices automatically, should I still use MAKEDEV, or there is a new method to handle this problem?