Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've got a 8gb USB drive that is not recognized by fdisk. The last time I used it, I installed Debian live on it and it worked fine on the system. However, today when I tried it again, it's not recognized by the bios and the system on my hard drive.
It appears in dmesg when it's plugged:
[13737.236125] usb 1-2: new high-speed USB device number 13 using ehci_hcd
[13737.446112] usb 1-2: New USB device found, idVendor=058f, idProduct=1234
[13737.446117] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[13737.446120] usb 1-2: Product: Mass Storage Device
[13737.446123] usb 1-2: Manufacturer: Alcor Micro
[13737.446650] scsi15 : usb-storage 1-2:1.0
[13738.445184] scsi 15:0:0:0: Direct-Access Generic USB Flash Disk 7.76 PQ: 0 ANSI: 4
[13738.449202] sd 15:0:0:0: Attached scsi generic sg2 type 0
[13738.450729] sd 15:0:0:0: [sdb] Attached SCSI removable disk
and I can see it with lsusb also
Bus 001 Device 013: ID 058f:1234 Alcor Micro Corp. Flash Drive
However, the partitions or the flash drive itself are not seen in fdisk. I tried it in Windows XP also.. same story, it appears as a card-reader, I can't format it.
what do you want to do format it or mount it. BIOS see's and has giving the Image sdb . you took a live image that is bootable and put it on a usb drive and you want it back to normal.
I am not going to trouble shoot why your system is not mounting it making a little Icon and then associating it with a file manager.
that live image is just that a image and we need to wipe it.
Alein Bob has this down to a art for slackware used it many times very powerful. Remember back back up back up.
Go here to the Slackware documentation and read the second half how to convert.
After many years I have used slackware to fix every distro there is. And a puppy on a leash.
let me know
Hey Drakeo, thanks for the input, I will check it out in a while.
Drakeo, I can't use dd because the drive is not appearing as a system-editable.
Even thought I've got
[24546.582667] sd 17:0:0:0: [sdb] Attached SCSI removable disk
dd is unhappy
root@ibm:/# dd if=/dev/zero of=/dev/sdb count=1 bs=512
dd: opening `/dev/sdb': No medium found
-----------------
237, this is ouput from fdisk -l
root@ibm:/# fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes
240 heads, 63 sectors/track, 64601 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x1ff19a0f
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 966797311 483397632 83 Linux
/dev/sda2 966799358 976771071 4985857 5 Extended
/dev/sda5 966799360 976771071 4985856 82 Linux swap / Solaris
root@ibm:/#
273, that is not silly at all, as I am considering hardware failure at the moment too
I've tried it on all three USB ports on my Thinkpad T60 without result. I also tried to mount the USB stick in Windows XP. There it's recognized as storage device but in My Computer it appears as card reader..
It's strange because the usb stick is almost brand new.. I've got it about 2 months ago, and I've hardly used it.
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
There are suggestions when googling that a low level format could repair this but I'm afraid I don't know how that would be achieved in Linux. I'm surprised you can still break hardware like this in software but perhaps you can. I think HP do some USB drive tools but I'm not sure whether they just work on their drives.
Edit: Another thing occurs. You could try using dd to put another .iso on it in case that makes it visible again?
Well.. I can't write another ISO because I will have to use either dd (which I cant use) or unetbootin (which requires the usb to be mounted). So that's not among the options.
I have another USB drive (the same one, same brand, same capacity) .. so I can try to do the same thing I did with the one that can't be booted and see if it's really a software break.. I will just have to be brave and stupid enough
either open multiple terminal(konsole) windos or use screen in split mode so that you can monitor /var/log/messages at the same time you plug the USB drive into the system. as you are watching /var/log/messages (tail -f is your friend for this) and you see /dev/sdX# if there is a number associated with it then try to manually mount the drive.
If you have run dd in the attempt to make it a bootable USB (live or otherwise) this may not work and you might have to run an other DD just to clean it up.
Code:
Apr 17 09:29:48 centos kernel: usb 1-2: new high speed USB device number 2 using ehci_hcd
Apr 17 09:29:48 centos kernel: usb 1-2: New USB device found, idVendor=1b1c, idProduct=0ab1
Apr 17 09:29:48 centos kernel: usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Apr 17 09:29:48 centos kernel: usb 1-2: Product: Flash Voyager
Apr 17 09:29:48 centos kernel: usb 1-2: Manufacturer: Corsair
Apr 17 09:29:48 centos kernel: usb 1-2: SerialNumber: 92e646a69e562a
Apr 17 09:29:48 centos kernel: usb 1-2: configuration #1 chosen from 1 choice
Apr 17 09:29:48 centos kernel: Initializing USB Mass Storage driver...
Apr 17 09:29:48 centos kernel: scsi10 : SCSI emulation for USB Mass Storage devices
Apr 17 09:29:48 centos kernel: usbcore: registered new interface driver usb-storage
Apr 17 09:29:48 centos kernel: USB Mass Storage support registered.
Apr 17 09:29:49 centos kernel: scsi 10:0:0:0: Direct-Access Corsair Flash Voyager 0.00 PQ: 0 ANSI: 2
Apr 17 09:29:49 centos kernel: sd 10:0:0:0: Attached scsi generic sg3 type 0
Apr 17 09:29:49 centos kernel: sd 10:0:0:0: [sdc] 31588352 512-byte logical blocks: (16.1 GB/15.0 GiB)
Apr 17 09:29:49 centos kernel: sd 10:0:0:0: [sdc] Write Protect is off
Apr 17 09:29:49 centos kernel: sd 10:0:0:0: [sdc] Assuming drive cache: write through
Apr 17 09:29:49 centos kernel: sd 10:0:0:0: [sdc] Assuming drive cache: write through
Apr 17 09:29:49 centos kernel: sdc: sdc1
Apr 17 09:29:50 centos kernel: sd 10:0:0:0: [sdc] Assuming drive cache: write through
Apr 17 09:29:50 centos kernel: sd 10:0:0:0: [sdc] Attached SCSI removable disk
[root@centos ~]# fdisk -l /dev/sdc
Disk /dev/sdc: 16.2 GB, 16173236224 bytes
255 heads, 63 sectors/track, 1966 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdc1 1 1967 15794131+ b W95 FAT32
As you can clearly see on my system the drive is detected as sdc without a number or /dev. the default for CentOS is to identify just the SCSI, in this case, drive letter assignment. I know it is /dev/sdc as that is how CentOS functions, your distro may read differently, but /dev/sdX is virtually a Linux standard.
The output of fdisk -l /dev/sdc clearly states I have plugged in a 16G FAT32 formatted flash drive with a single partition.
If your system is unable to identify anything about your drive after plugging it in and /var/log/messages tells you the drive letter then fdisk should also tell you what to use to identify that device as there are plenty of file systems out there that fdisk is not capable of dealing with. HFS is one of them as an example.
you can also run df -Th to see if the system automajically mounted the drive:
my CentOS server does no such thing for starters im not running a GUI and it is a server configured to NOT auto mount this specific flash drive. I do use autofs for other specific devices, just not this flash drive:
ok go into bios with the usb inserted and see what bios see's and then you will find that ubuntu as i have seem every install has set my system up as the master drive. but when you run blkid you get what the bios see's. if you look at the installed /etc/fstab you will see what I mean. this has caused me many issues with the ubuntu.
so after mounting it you still cant wipe it out ?
Quote:
LQ Newbie
Registered: Feb 2011
Posts: 13
Original Poster
Rep: Reputation: 0
Hey Drakeo, thanks for the input, I will check it out in a while.
Drakeo, I can't use dd because the drive is not appearing as a system-editable.
Even thought I've got
[24546.582667] sd 17:0:0:0: [sdb] Attached SCSI removable disk
dd is unhappy
root@ibm:/# dd if=/dev/zero of=/dev/sdb count=1 bs=512
dd: opening `/dev/sdb': No medium found
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.