Ahh.. Okay. It is possible that there is already a file called /tmp/usb on that system. Verify this as follows:
ls -l /tmp/usbIn which case we can just use a different name for our temporary mount point. Let's call it "fred" instead:
modprobe usb-storage ## Ensure the driver for the USB-stick is loaded
mkdir /tmp/fred ## Create a directory for use as a mount-point
mount /dev/sda1 /tmp/fred ## Mount/attach the USB-stick at /tmp/fred
mount mtd:mfg -t jffs2 /mfg ## Mount the manufacturing partition at /mfg
cp /mfg/mfg.dat /tmp/fred/ ## Copy mfg.dat to the USB-stick. Note trailing slash.
umount /mfg ## Unmount/detach the manufacturing partition
umount /tmp/fred ## Unmount/detach the USB-stick
sync ## Ensure data is written to the USB-stick before removal
Any different?
Also, note that the purpose of the trailing slash on the "cp" line is to
ensure that the copy
fails if /tmp/fred is not present or is not a directory. Without that slash, the copy might appear to succeed, but could simply be creating a copy into a file called "fred", rather than what we intended.