What is going on with my USB stick?
Hi;
I got a free 1 Gig USB stick as a promotional. I would like to install SystemRescueCD on it to make it into a "live usb stick". My computer is running Ubuntu 8.04. I am having trouble detecting the device it is on and I think there may be partition or file system issues on the stick. First issue: finding out what device the USB stick is: running this command Quote:
Quote:
Why do I get two device names? funning modprobe with the USB plugged in and automounted by Ubuntu yields nothing Quote:
Quote:
running fdisk -l on the first device sdb yields Quote:
Quote:
Attempting to mount the first device, sdb yields an error message Quote:
Quote:
Thanks much in advance for any info |
kind of a long description of a problem for such a short answer.
Some usb sticks have a virtual partition where they try to emulate a floppy drive(a: or b:) where the security lock for the main partition is located and other things. Try plugging it in to a windows computer (yea I know how that sounds) and see what happenes. If you get 2 drives, one beeing a floppy, you get your answer, if not... just format the whole thing. Fedora Development |
There is nothing wrong.
sdb is your entire drive sdb1 is the 1st partition. This contains the filesystem i.e data which is typically FAT32. In a nutshell partitions divide a drive into pieces. Lots of information on partitions can be found by googling. A flash drive can be divided into 15 partitions (since it is uses the SCSI subsystem) with 4 being called primary. A primary partition can be designated as an extended partition which can be subdivided into 11 logical partitions. A data (primary,logical) partition can not be subdivided which is why nothing is displayed on the output of fdisk for /dev/sdb1. You can only mount a data filesystem which in your case is just sdb1. If you look at the entire output of cat /proc/partitions you should see multiple partitions for the internal drive. |
Thanks for the answers guys.
Is there any way ( and do I want to ) to blow away the sdb1 partition? I would like to use the whole USB stick for a liveUSB stick |
Quote:
Use it as you wish. If you "blow it away", you'll only have to re-create it again, one way or another. |
You can use dd to completely wipe the usb stick.
dd if=/dev/random of=/dev/sdb Then use fdisk to re-create a primary partition on it. Then you can use mkfs or the like to create the type of filesystem you want on it. |
/dev/sdc is the device for the drive. /dev/sdc1 is the device for the partition on the device. Before the partition is the MBR. The partition probably starts at block 63. You can check this with "sudo /sbin/fdisk -lu /dev/sdc".
You can also get information on your pendrive with "udevinfo -q info -n /dev/sdc1". It will show what filesystem is on it, the label and UUID of the filesystem. |
Quote:
I guess the most secure way would be to do this by UUID (potentially more confusing) or if possible by the devices individual name, if set. I did a quick search to see if I can find anything on this, but I can't. I'm kind of curious myself if and how that might be possible. |
If there is a problem with the filesystem on the drive, you could simply format the filesystem on /dev/sdb1 (assuming that is what is used).
But having /dev/sdb and /dev/sdb1 for example is normal. There is nothing wrong with that. I tried to use a promotional usb drive at work and windows didn't even recognize it. The same thing happened when a Windows server was being installed. One of the installers had files he needed to install copied to a pen drive he got from Disney at NAB. Windows didn't see it. I had a laptop that I had dual booting with Mandrake Linux. I rebooted into Mandrake, inserted the pendrive and sent the files over the network. If this is a pendrive that has some promotional material on it, it may have some defects intentionally in the filesystem to make it harder to delete the promotional material. Some pendrives will simulate a hard disk for part of it. (U3 and others). You can use "udevinfo -q env -n /dev/sdb1" to determine the filesystem, label and UUID. If you wanted to add an entry in /etc/fstab for the pendrive, you would want to use "LABEL=" or "UUID=" instead of the device name in the first field of the /etc/fstab entry. Also use the "noauto" option. This will enable you to mount it (manually) even if it gets a different device assigned to it the next time you plug it in. Trickykid: You don't want to wipe a hard drive using /dev/random. You will run out of entropy very quickly. You can use /dev/urandom oro /dev/zero instead. A pen drive is flash based so you don't need to worry about previous material being extracted as can happen to one or two layers of magnetic material. |
All times are GMT -5. The time now is 01:46 PM. |