Hi Folks,
I suspect I've done somthing foolish (OK, maybe several things).
Yesterday, browsing round Tesco, I spotted 1GB USB sticks on sale for £9.97. Looked like a bargain, so I bought one. OK, maybe a gamble, but at low stakes.
Branded "TESCO / TECHNIKA", "Manufactured in Taiwan for Tesco Stores Ltd."; the info on the front of the pack is in English, on the back in Polish, Czeck, Hungarian and Slovak.
After I got home, I gave it a whirl by plugging it in, mounting /dev/sda1 (which is where my USB sticks go) onto /flash (my mount point for this kind of thing), made a directory /Ted on it, and squirted about 300MB at it from one of my "junkbox" directories (which also has a few sub-directories of junk), using
cp -a 00_junk /flash/Ted
(Maybe "-a" was a mistake).
Lots of messages up on the console about not being able to set permissions (OK, expected, since it wouldn't be a Linux file system).
Then, after a bit a lot of messages "bad FAT"!
Also, at the same time, lots of complaints about multibyte names (which I don't have). A couple of messages about Interrupt from USB.
Hmmm. Multi bite, bad fat ... Obesity???
Finally it was done. I could read from whatever had gone in immediately under /flash/Ted, and the sub-directories were there, but if I changed into one of these I couldn't read anything in there.
Clearly a bit of a mess. So I deceided to delete everything and think again. Deleting top-level stuff OK, but the sub-directories wouldn't play.
Finally decided to start from scratch. Started fdisk on it, blew away all the partitions, planted a new Linux one (type 83), and tried to mkfs an ext2 filesystem on it. Got message that the kernel couldn't make head nor tail of it, and would continue using its stored FAT (previous version) untile the next reboot. Well the previous FAT was no good by now, so I re-booted.
Well, you've guessed it -- the thing is now totally useless. Can't do a thing with it! It won't mount on /dev/sda1 of course, since there's no filesystem.
So, to come to the point:
1. I'd be interested in any suggestions and expertise about how to set up a Linus partition on a zapped/blank [which?] USB drive. This would presumably involve addressing some /dev/usb*** just as one would for /dev/hda, say, if doing the like for a standard HDD.
No big deal if you can't be bothered -- it was only a tenner, so I'll just have to fine myself 4 pints of beer.
2. Also interested in any suggestions about whether I should have bought it in the first place (with implications about possibly ever buying another one).
With thanks, and happy weekend to all. Ted.
-------------------------------------------------------------------- E-Mail: (Ted Harding) ted.harding@nessie.mcc.ac.uk Fax-to-email: +44 (0)870 094 0861 Date: 18-Aug-07 Time: 08:41:43 ------------------------------ XFMail ------------------------------
On 8/18/07, Ted Harding ted.harding@nessie.mcc.ac.uk wrote:
Then, after a bit a lot of messages "bad FAT"!
Sounds like it might have some bad 'sectors'. Take it back for a refund.
Tim.
To be honest Ted it doesn't sound like you did much wrong (with the possible exception of the -a flag but that wouldn't break it in the way you describe)
I would suggest that you have faulty hardware, take it back and get a refund for some beer or buy one with a recognisable name (you can pick up 1GB Kingston sticks for less than the price you paid).
You seem to get a little be confused at the end /dev/sda1 is not a mount point, in this case it is a virtual device node assigned to the first partition on the stick by the USB Mass Storage controller, if things are not getting that far then either a. Your USB is broken b. The device is broken or c. The device doesn't use the standard USB Mass Storage Controller. /dev/sda is the lowest level you can talk to the device as a block device.
Seeing as it almost worked once I would suggest b, particularly now if you can't even point fdisk at /dev/sda to wipe/create a new partition.
On 18-Aug-07 11:48:59, Wayne Stallwood wrote:
To be honest Ted it doesn't sound like you did much wrong
Thanks!
(with the possible exception of the -a flag but that wouldn't break it in the way you describe)
I would suggest that you have faulty hardware, take it back and get a refund for some beer or buy one with a recognisable name (you can pick up 1GB Kingston sticks for less than the price you paid).
You seem to get a little be confused at the end /dev/sda1 is not a mount point, in this case it is a virtual device node assigned to the first partition on the stick by the USB Mass Storage controller, if things are not getting that far then either a. Your USB is broken b. The device is broken or c. The device doesn't use the standard USB Mass Storage Controller. /dev/sda is the lowest level you can talk to the device as a block device.
Ah -- subtle of you not to reject the hypothesis that I was getting a bit confused.
Now that (with it plugged in "from cold") I do an fdisk on /dev/sda. and then do a mkfs on the resulting /dev/sda1, I seem to have a Linux filesystem on the stick.
Seeing as it almost worked once I would suggest b, particularly now if you can't even point fdisk at /dev/sda to wipe/create a new partition.
So I'll try again to see how it works for reading/writing.
Thanks again, Wayne! Ted.
-------------------------------------------------------------------- E-Mail: (Ted Harding) Ted.Harding@manchester.ac.uk Fax-to-email: +44 (0)870 094 0861 Date: 18-Aug-07 Time: 15:36:50 ------------------------------ XFMail ------------------------------
On 18-Aug-07 14:37:27, Ted Harding wrote:
[...] Ah -- subtle of you not to reject the hypothesis that I was getting a bit confused.
Now that (with it plugged in "from cold") I do an fdisk on /dev/sda. and then do a mkfs on the resulting /dev/sda1, I seem to have a Linux filesystem on the stick.
Seeing as it almost worked once I would suggest b, particularly now if you can't even point fdisk at /dev/sda to wipe/create a new partition.
So I'll try again to see how it works for reading/writing.
Thanks again, Wayne! Ted.
... And I've now tested it with 'cp -a' of my "junk" directory, which seemed to go without a hitch. Had a look -- it seemed to be all there, and what I tested was readable. So then I 'rm -rf'd it, and that seems to have worked. Looks like it's OK! Nice little 1GB ext2 filesystem on it now.
I didn't mention, in my first description, that when I first looked at it with fdisk it had 4 partitions on it, each with a different kind of filesystem (I forget what they all were now), one of which was "Unknown". This may have had something to do with the misbehaviour the first time (and was what prompted me to wipe it clean in the first place, to get rid of that 'dreck').
Ah well, so it was probably /dev/sda vs /dev/sda1 all along. Silly me.
[Now beginning to ponder about booting of a USB stick ...]
Ted.
-------------------------------------------------------------------- E-Mail: (Ted Harding) Ted.Harding@manchester.ac.uk Fax-to-email: +44 (0)870 094 0861 Date: 18-Aug-07 Time: 16:05:57 ------------------------------ XFMail ------------------------------
On Sat, Aug 18, 2007 at 04:06:16PM +0100, Ted Harding wrote:
Ah well, so it was probably /dev/sda vs /dev/sda1 all along. Silly me.
You could always run badblocks on it with write destructive mode to double check.
[Now beginning to ponder about booting of a USB stick ...]
That can get a bit "interesting" I carry around 2 sticks as some machines won't boot off one but will the other (1 is partitioned to be a pretend usb zip disk) both act as my repair/recovery system.
Adam
On 18-Aug-07 14:37:27, Ted Harding wrote:
[Now beginning to ponder about booting of a USB stick ...]
Ted.
Have a look at http://fedoraproject.org/wiki/FedoraLiveCD/USBHowTo
I'm going to do this, when I have time. I have used M$ and loadlin on sticks from 64M upwards to good results for puppy, DSL and feather linux.
Keith