The "sbd0: unknown partition table" is normal. The allocated memory is uninitialized when the
module is first loaded so it can't contain a valid partition table. You can either use sfdisk
or mkfs to create a partition table or file system in the allocated memory. If mkfs is used,
the driver may subsequently be mounted.
I had to make a few minor changes to the driver to get it to this point. I had to add the
following line to the sbd_ops structure:
".getgeo = sbd_blk_getgeo"
Then I had to create a function sbd_blk_getgeo with the code from the HDIO_GETGEO case from
the sbd_ioctl function. This was because sfdisk complained that "Disk /dev/sbd0: cannot get
The last thing I had to do was change "geo.start = 4" to geo.start = 0". This was because
sfdisk complained that "Warning: start=4 - this looks like a partition rather than the entire
disk. Using fdisk on it is probably meaningless."
Once these changes were made, I was able to use sfdisk and mkfs on the device and mount it as