Addressing flash drive
This is so aggravating to me because I think I should know this but ...
I acquired a 16GB SanDisk USB flash drive at the local Target. I plugged it in and sure 'nuf' lsusb sees it: Bus 001 Device 000: ID 0781:5530 SanDisk Corp. Cruzer Its little light under the slider flashes. I tried fdisk /dev/sdc (have 2 hard drives) but that got me: No such file or directory How do I identify this so I can partition it to install some other Linuxes? If left long enough, lsusb stops recognizing its existence. Is this a problem (light still flashes)? BTW using Slackware 13.37. |
$ cat /proc/partitions
Check dmesg to see if things went as expected when you inserted a new usb device. But it should list it in /proc/partitons. Although if you have multiple usb cards you can get a bit mixed up and might need to reference UUIDs and things like that. My USB flash mediums show up as /dev/hdc if I boot with them connected. Or as /dev/sdg if I plug them in after I boot. |
My cruzer is listed under media
/media/usb0 |
If it's mounted you can use mount without parms to list it's device name and it's mount point. And df can show device capacity and remaining space which can also help ID something that's already mounted.
$ mount $ df |
Quote:
|
Member Response
Hi,
Quote:
Quote:
Quote:
Code:
# lsusb Code:
# lsusb -t |
Addressing flash drive
Thanks for all the input!!
Does anyone suspect the device is failing after reading below? When plugged in there is no initial light flashing indication on the flash drive and no indication from lsusb. When light flashes, approx. 1/sec, lsusb shows that it is there: Code:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub ls /media/* shows devices 0 and 1 for:cdrecorder, cdrom, dvd, floppy, memory, hd, and zip. cat /proc/partitions does not show the device. fdisk -l shows only my hard drives sda and sdb and when I use that command the light in the flash drive begins to rapidly flash. I unplugged it. This motherboard KT4V-L is several years old and I do not have a USB drive specifically setup for the BIOS. Could that be the reason it is not responding? I have done everything the manual says to do but have not plugged in the flash drive when doing the setup which is possibly why it does not provide it as an option for booting from. I will try this. |
I opened my MSI manual on the motherboard and rechecked my configuration. Even with the flash drive installed the BIOS did NOT show any indication of seeing the flash drive as a bootable item. The manual shows several expected options USB FDD, USB CDROM, USB hdd, or USB RMD-FDD. The only bootable devices are currently Floppy, Cdrom, and hard drive.
The "USB Legacy Support" is set to All Device as required and "Try Other Devices" to YES as described. I can live with BIOS not having USB as a bootable device by using the PLOP script or something like that but have misgivings about this flash drive with this system when after about 3 min its light goes out and is not recognized by lsusb. |
The floppy would be under hdd in bios?
In bios under boot there should be a +sign next to hdd, select it & it'll expand. Move cruzer to top of list under hdd's in boot section. |
In my experience also USB drives tend to show up under hard Drives in BIOS. This causes me a lot of annoyance because it means changing the BIOS hard drive order in order to boot from USB every time I want to try a live USB out but seems to be the way it's done nowadays.
|
F12 spamming is mostly the way to get to the boot order options on newer machines. But it can be ESC, F10 and lots of other things too. Depending on brand and age of the machine. Most of the time I just put an entry for the USB stick in the existing bootloader of the computers main HDD.
# nano /etc/grub.d/40_custom # update-grub Be sure to use the UUIDs for the partition, and the same in the /etc/fstab of the linux install it applies to. It should contain something like this in 40_custom for the grub to boot the device. Code:
menuentry 'Debian Sid i386 - PNY' --class debian --class gnu-linux --class gnu --class os { You can't really boot a usb stick unless you've installed a bootloader onto that stick. At least not via the bios options. $ cat /proc/partitions # blkid /dev/sdg1 Or whatever applies as the /dev/ name for the place in question. Automounting only happens with a system configured to do that. Some distros have that installed and configured by default and others do not. So you can't just have an expectation that it's automatic. |
Some really old machines do not support booting usb. But you can boot grub from a cdrom and then jump to the grub on the stick.
$ grub-mkrescue -o grub-el-torito.iso $ k3b grub-el-torito.iso Since there's no menu setup with that type of image you'll default to the grub commandline grub> insmod uhci grub> insmod ohci grub> insmod usb grub> ls Your grub name of the partition should be one of those listed. If all is going well anyway. grub> insmod part_msdos grub> insmod ext2 grub> configfile (usb0a,msdos2)/boot/grub/grub.cfg Where (usb0a,msdos2) is the grub name of the stick I boot my antique laptop with. And that launches the grub on that stick and I can use it's menu at that point. Otherwise you have to type in the UUID stuff which is a lot more typing. |
BIOS settings should not prevent the Flash drive from being seen (unless you totally disabled USB in the BIOS, which can't be the case, since it shows up in lsusb).
Unplug the device, launch the command Code:
tail -f /var/log/messages |
Addressing flash drive
tail -f /var/log/messages after disconnecting flash drive:
Code:
tail -f /var/log/messages Code:
Feb 26 21:22:18 polaris kernel: [ 2664.071319] usb 1-6: new high speed USB device using ehci_hcd and address 26 Would someone explain why fdisk -l did not show that drive? Also why is the flash drive's lamp blinking on/off rapidly? |
Have you run the fdisk command as root (or with sudo on distros that use sudo)?
The blinking occurs usually when data on the device is read or written, for example by an indexing program running in the background. |
All times are GMT -5. The time now is 12:27 AM. |