I have a udev rule for USB sticks with fat32 format. The rule contains such attributes:
SUBSYSTEM=="block", KERNEL=="sd?1", ...
Normally, it works very well for USB sticks that I tested so far, since the most USB sticks are represented in the device node as
Now, I have a special USB which has a device node as
blkid command of this USB stick returns such outputs:
/dev/sda: UUID="AC9E-6C58" TYPE="vfat"
Compared to the normal one (
/dev/sda1), I miss the
Furthermore, The command
sfdisk -l /dev/sda returns these outputs:
Disk /dev/sda: 1021 cylinders, 247 heads, 62 sectors/track Units: cylinders of 7840768 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End #cyls #blocks Id System /dev/sda1 0 - 0 0 0 Empty /dev/sda2 0 - 0 0 0 Empty /dev/sda3 0 - 0 0 0 Empty /dev/sda4 0 - 0 0 0 Empty
This USB has 0 in the
/dev/sda1 row. However, the normal USB stick has such entries:
Device Boot Start End #cyls #blocks Id System /dev/sda1 0+ 2703- 2704- 7835620 b W95 FAT32 start: (c,h,s) expected (0,1,11) found (0,0,57) end: (c,h,s) expected (1023,125,46) found (975,125,46) /dev/sda2 0 - 0 0 0 Empty /dev/sda3 0 - 0 0 0 Empty /dev/sda4 0 - 0 0 0 Empty
Based on this discussion, it means that the USB stick doesn't have a partition table.
If I don't want to change my udev rules, how can I modify this USB stick? A normal re-partition either with Windows tool or Gparted doesn't change this layout.
If changing the partition layout is not possible, how can I change my udev rule so that it can deal with USB stick which either recognize on /dev/sda or /dev/sda1?
Update: I changed the term "mount" with "device node" to avoid confusion. Thanks to Austin.