> On Wed, Jul 27, 2011 at 07:37:14PM +0100, ga ho wrote:
> > Hi All,
> >
> > On my LFS 6.4 system with Udev-130 I had to use the
> OPTIONS+="all_partitions" in a udev rule to get my Sandisk
> Cruzer Micro 8GB USB stick EXT3 partition /dev/ubb1 set up.
> >
> > However it seems that the Udev developers in their
> infinite wisdom decided to do away with the
> OPTIONS+="all_partitions" so now although udev creates the
> /dev/ubb device it no longer creates /dev/ubb1.
> >
> > Does anyone know of another work around?
> >
> > I had thought of putting a mknod command in a shell
> script and use a rule with the RUN or PROGRAM option to
> execute the shell script, but the test shell script I
> created to echo some text to a file in the /root directory
> doesn't run.
> >
> > Does Udev have log file that I could check for
> errors?
> >
> > Thanks,
> > Gary
>
> I've never heard of /dev/ubX until now. All of my
> USB sticks have
> appeared at /dev/sdX for as long as I can remember [ but, I
> think I
> didn't get any sticks until 2007 ]. A quick google
> suggests that
> /dev/ubX has been replaced by /dev/sdX in at least one
> distro, so my
> first suggestion is that you check to see if the stick
> appears as
> your next sd device. None of my usb sticks or disks,
> or indeed
> cameras, has more than one partition - but I've never had
> to worry
> about any of them showing up as a device without
> partitions.
>
> Ah - further googling found the Low Performance USB Block
> driver
> (BLK_DEV_UB) in the kernel. The driver I'm using is
> usb-storage
> (USB_STORAGE - you might perhaps want other choices below
> that, but
> I don't need any for the sticks I have.).
>
> That, of course, may raise another problem - if your stick
> used to
> be /dev/ubb then presumably you had something at /dev/uba
> and that
> too might move.
>
> I don't know of any udev logging, my devices all show up
> in sys.log
> and kern.log and I just go from there.
>
> My latest systems have udev-165, and on that the
> properties of a
> device showing up at /dev/sdX can be accessed with
> /sbin/udevadm info --name=/dev/sdX --attribute-walk
> [ again, the syntax keeps changing in different udev
> releases ].
>
> I key my rules by the subsytem (usb), kernel (sd?1), and
> ATTRS(product) with repeated rules for product values of
> USB Flash Memory, DISK 2.0, and EHCI Host Controller - in
> my case
> these are all duplicates for different sticks, so I can
> only ever
> attach one stick at a time at /dev/stick.
>
> ?en
> --
> das eine Mal als Trag?die, das andere Mal als Farce
>
>
> ------------------------------
The problem is now solved.
I think I should have mentioned that ever since LFS6.3 I have always built my
systems on USB sticks and made them bootable. In fact I have never installed
LFS on my hard drive. I'm guessing but that could be the reason why my USB
sticks always show up as /dev/ub. The bootable USB stick shows up as /dev/uba1
with subsequent USB sticks showing up as /dev/ubb1 /dev/ubc1 etc.
However this Sandisk Cruzer Micro USB stick although generating /dev/ubb has
never generated /dev/ubb1 when plugged into a PC. Hence the
OPTIONS+="all_partitions" in my rule on my LFS6.4 system.
The strange thing is that this Sandisk Cruzer Micro USB that's giving me all
this trouble is actually a bootable USB stick in it's own right with LFS6.5 on
it and it boots up ok with a perfectly good EXT3 filesystem.
Now I don't know why but everything I tried yesterday didn't work but
everything I tried today did. In my rule I use the
ATTRS{serial}=="4355555217202CF5" option to specify this particular USB stick
and the NAME option to create the /dev/cruzusb file and the shell script in the
RUN+= option, which didn't run yesterday but is now working, creates the
/dev/cruzusb1 file which means I can now mount the filesystem ok.
I didn't think there was any specific udev log file but I thought I'd ask just
too make sure.
Thanks for your help and suggestions,
Gary
--
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page